linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Johannes Weiner <hannes@cmpxchg.org>,
	Christoph Hellwig <hch@infradead.org>
Cc: Deepanshu Kartikey <kartikey406@gmail.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: retiring laptop_mode? was Re: [PATCH] mm: vmscan: always allow writeback during memcg reclaim
Date: Mon, 15 Dec 2025 19:23:07 -0700	[thread overview]
Message-ID: <09d2d256-2eba-41ea-a397-dca4df5d5a2a@kernel.dk> (raw)
In-Reply-To: <20251215200838.GC905277@cmpxchg.org>

On 12/15/25 1:08 PM, Johannes Weiner wrote:
> On Sun, Dec 14, 2025 at 10:59:11PM -0800, Christoph Hellwig wrote:
>> On Sun, Dec 14, 2025 at 11:12:00PM -0500, Johannes Weiner wrote:
>>> That reasoning doesn't make sense to me. Reclaim is always in response
>>> to an allocation need. The laptop_mode idea applies to cgroup reclaim
>>> as much as any other reclaim.
>>>
>>> Now obviously all of this is pretty dated. Reclaim doesn't do
>>> filesystem writes anymore, and I'm not sure there are a whole lot of
>>> laptops with rotational drives left, either. Also I doubt anybody is
>>> still using zone_reclaim_mode (which is where the may_unmap is from).
>>
>> Yeah.  I wonder if we should retire laptop_mode.  It was a cute hack
>> back then, but it has it's ugly fingers in way to many places and
>> should be mostly obsolete by how writeback works these days.
> 
> Yes, that makes sense to me. How about the below?
> 
> It doesn't actually get rid of the reclaim toggles - I added comments
> for the other usecases. But it's a nice diffstat nonetheless.
> 
> Debated whether to add some sort of deprecation sysctl handler, but at
> least systemd-sysctl just prints a warning and still applies other
> settings from the same config file.
> 
> ---
> 
> From 868f67e9d0d4465a6c22d8a147084944e7569c8d Mon Sep 17 00:00:00 2001
> From: Johannes Weiner <hannes@cmpxchg.org>
> Date: Mon, 15 Dec 2025 12:57:53 -0500
> Subject: [PATCH] mm/block/fs: remove laptop_mode
> 
> Laptop mode was introduced to save battery, by delaying and
> consolidating writes and maximize the time rotating hard drives
> wouldn't have to spin. Needless to say, this is a scenario of the
> (in)glorious past.
> 
> 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 the decision-making in reclaim looks dubious. It likely
> hasn't been tested in years while the surrounding code has evolved.

From a quick glance, looks good to me:

Acked-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe



  reply	other threads:[~2025-12-16  2:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-13  8:36 Deepanshu Kartikey
2025-12-14 23:49 ` Andrew Morton
2025-12-15  4:12 ` Johannes Weiner
2025-12-15  4:51   ` Deepanshu Kartikey
2025-12-15 19:42     ` Yuanchu Xie
2025-12-15 20:22       ` Johannes Weiner
2025-12-19  5:13       ` Kairui Song
2025-12-15  6:59   ` retiring laptop_mode? was " Christoph Hellwig
2025-12-15 16:33     ` Jens Axboe
2025-12-15 20:08     ` Johannes Weiner
2025-12-16  2:23       ` Jens Axboe [this message]
2025-12-16  7:41       ` Christoph Hellwig
2025-12-16 18:52         ` Johannes Weiner
2025-12-16 18:54           ` Jens Axboe
2025-12-16 23:23           ` Shakeel Butt
2025-12-17 19:59             ` Johannes Weiner
2025-12-18  7:21               ` Shakeel Butt
2025-12-17 19:34           ` Michal Hocko
2025-12-18  6:00           ` Christoph Hellwig
2025-12-15 17:49   ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09d2d256-2eba-41ea-a397-dca4df5d5a2a@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hch@infradead.org \
    --cc=kartikey406@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox