Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/vmpressure: remove window size TODO
@ 2026-08-31 13:42 Lorenzo Stoakes (ARM)
  2026-08-31 17:16 ` Andrew Morton
  2026-09-01 14:14 ` Vlastimil Babka (SUSE)
  0 siblings, 2 replies; 4+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-08-31 13:42 UTC (permalink / raw)
  To: Andrew Morton, David Hildenbrand, Liam R. Howlett,
	Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko
  Cc: linux-mm, linux-kernel, ljs

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.

Link: https://lore.kernel.org/all/20260831130316.448-1-tahasezer.is@gmail.com/
Link: https://lore.kernel.org/linux-mm/20260724054305.516126-1-cui.tao@linux.dev/
Link: https://lore.kernel.org/linux-mm/20260715143646.15828-1-gaikwad.dcg@gmail.com/
Link: https://lore.kernel.org/all/20260227221555.29969-1-mcq@disroot.org/
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
---
 mm/vmpressure.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 9629240d77ad..3de99fef3928 100644
--- 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;
 

---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260831-remove-vmpressure-todo-2d764f42059a

Cheers,
-- 
Lorenzo Stoakes (ARM) <ljs@kernel.org>



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/vmpressure: remove window size TODO
  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)
  2026-09-01 14:14 ` Vlastimil Babka (SUSE)
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2026-08-31 17:16 UTC (permalink / raw)
  To: Lorenzo Stoakes (ARM)
  Cc: David Hildenbrand, Liam R. Howlett, Vlastimil Babka,
	Mike Rapoport, Suren Baghdasaryan, Michal Hocko, linux-mm,
	linux-kernel

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/vmpressure: remove window size TODO
  2026-08-31 17:16 ` Andrew Morton
@ 2026-08-31 17:33   ` Lorenzo Stoakes (ARM)
  0 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-08-31 17:33 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Hildenbrand, Liam R. Howlett, Vlastimil Babka,
	Mike Rapoport, Suren Baghdasaryan, Michal Hocko, linux-mm,
	linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/vmpressure: remove window size TODO
  2026-08-31 13:42 [PATCH] mm/vmpressure: remove window size TODO Lorenzo Stoakes (ARM)
  2026-08-31 17:16 ` Andrew Morton
@ 2026-09-01 14:14 ` Vlastimil Babka (SUSE)
  1 sibling, 0 replies; 4+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-09-01 14:14 UTC (permalink / raw)
  To: Lorenzo Stoakes (ARM), Andrew Morton, David Hildenbrand,
	Liam R. Howlett, Mike Rapoport, Suren Baghdasaryan, Michal Hocko
  Cc: linux-mm, linux-kernel

On 8/31/26 15:42, Lorenzo Stoakes (ARM) 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.
> 
> Link: https://lore.kernel.org/all/20260831130316.448-1-tahasezer.is@gmail.com/
> Link: https://lore.kernel.org/linux-mm/20260724054305.516126-1-cui.tao@linux.dev/
> Link: https://lore.kernel.org/linux-mm/20260715143646.15828-1-gaikwad.dcg@gmail.com/
> Link: https://lore.kernel.org/all/20260227221555.29969-1-mcq@disroot.org/
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>

Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>

> ---
>  mm/vmpressure.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/mm/vmpressure.c b/mm/vmpressure.c
> index 9629240d77ad..3de99fef3928 100644
> --- 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;
>  
> 
> ---
> base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
> change-id: 20260831-remove-vmpressure-todo-2d764f42059a
> 
> Cheers,



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-01 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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)
2026-09-01 14:14 ` Vlastimil Babka (SUSE)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox