]> git.ipfire.org Git - thirdparty/linux.git/commit
mm/block/fs: remove laptop_mode
authorJohannes Weiner <hannes@cmpxchg.org>
Mon, 15 Dec 2025 17:57:53 +0000 (12:57 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Jan 2026 03:24:47 +0000 (19:24 -0800)
commit64dd89ae01f2708a508e028c28b7906e4702a9a7
tree2b1db1723e1b9c55d35e6e7dc04b8d6cd7fb2082
parent657a81fe3b41bd58c63e15ae282f992dda5c8eee
mm/block/fs: remove laptop_mode

Laptop mode was introduced to save battery, by delaying and consolidating
writes and thereby maximize the time rotating hard drives wouldn't have to
spin.

Luckily, rotating hard drives, with their high spin-up times and power
draw, are a thing of the past for battery-powered devices.  Reclaim has
also since changed to not write single filesystem pages anymore, and
regular filesystem writeback is lumpy by design.

The juice doesn't appear worth the squeeze anymore.  The footprint of the
feature is small, but nevertheless it's a complicating factor in mm,
block, filesystems.  Developers don't think about it, and it likely hasn't
been tested with new reclaim and writeback changes in years.

Let's sunset it.  Keep the sysctl with a deprecation warning around for a
few more cycles, but remove all functionality behind it.

[akpm@linux-foundation.org: fix Documentation/admin-guide/laptops/index.rst]
Link: https://lkml.kernel.org/r/20251216185201.GH905277@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Deepanshu Kartikey <kartikey406@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
14 files changed:
Documentation/admin-guide/laptops/index.rst
Documentation/admin-guide/laptops/laptop-mode.rst [deleted file]
Documentation/admin-guide/sysctl/vm.rst
block/blk-mq.c
fs/ext4/inode.c
fs/sync.c
fs/xfs/xfs_super.c
include/linux/backing-dev-defs.h
include/linux/writeback.h
include/trace/events/writeback.h
include/uapi/linux/sysctl.h
mm/backing-dev.c
mm/page-writeback.c
mm/vmscan.c