Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>,
	 "Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	 Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	 Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmpressure: remove window size TODO
Date: Mon, 31 Aug 2026 18:33:37 +0100	[thread overview]
Message-ID: <apW6fJZ-i_JdJejI@lucifer> (raw)
In-Reply-To: <20260831101636.a714f7171af108d520d4848c@linux-foundation.org>

On Mon, Aug 31, 2026 at 10:16:36AM -0700, Andrew Morton wrote:
> On Mon, 31 Aug 2026 14:42:11 +0100 "Lorenzo Stoakes (ARM)" <ljs@kernel.org> wrote:
>
> > There has been a steady stream of patches that have been submitted by
> > newcomers to core mm 'fixing' this TODO, with all but the original having
> > very likely been generated by LLMs.
> >
> > It appears that TODOs to LLMs are like red rags to a bull.
> >
> > In addition, TODOs in code often bitrot and are distracting - those who
> > understand the code know what could be improved in future.
> >
> > Therefore remove the TODO.
> >
> > The work required to actually fix this TODO requires somebody who both has
> > understanding of the code and significant real-world data to back their
> > changes.
> >
> > Such a person doesn't require a TODO prompt to implement this change, so
> > nothing of value is being lost here.
> >
> > ...
> >
> > --- a/mm/vmpressure.c
> > +++ b/mm/vmpressure.c
> > @@ -30,9 +30,6 @@
> >   *
> >   * As the vmscan reclaimer logic works with chunks which are multiple of
> >   * SWAP_CLUSTER_MAX, it makes sense to use it for the window size as well.
> > - *
> > - * TODO: Make the window size depend on machine size, as we do for vmstat
> > - * thresholds. Currently we set it to 512 pages (2MB for 4KB pages).
> >   */
> >  const unsigned long vmpressure_win = SWAP_CLUSTER_MAX * 16;
>
> otoh, we could enhance the TODO to explain these considerations.  This
> might result in the LLM warriors submitting more usable work.
>
> It would be a strange place to socialize these things but as you said,
> red rags.

I don't think it'd help anything, I doubt the LLMs are going to read what
amounts to 'experts only' and sit back, they're not known for their
humility.

I also think, in general, we really should try to avoid adding TODOs - it's
bitrot bait and if it's important enough to do, that should be abundantly
clear to smart developers.

And if people REALLY want to signal that, put it in the commit msg (and
yeah that risks LLM incursion too but we do have to stop somewhere :)

>

--
Cheers, Lorenzo


  reply	other threads:[~2026-08-31 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 13:42 [PATCH] mm/vmpressure: remove window size TODO Lorenzo Stoakes (ARM)
2026-08-31 17:16 ` Andrew Morton
2026-08-31 17:33   ` Lorenzo Stoakes (ARM) [this message]
2026-09-01 14:14 ` Vlastimil Babka (SUSE)

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=apW6fJZ-i_JdJejI@lucifer \
    --to=ljs@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@kernel.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