[PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race

SeongJae Park posted 2 patches 3 days, 17 hours ago
Documentation/admin-guide/mm/damon/lru_sort.rst | 4 ++++
Documentation/admin-guide/mm/damon/reclaim.rst  | 4 ++++
2 files changed, 8 insertions(+)
[PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by SeongJae Park 3 days, 17 hours ago
Writing 'Y' to the commit_inputs parameter of DAMON_RECLAIM and
DAMON_LRU_SORT, and writing other parameters before the commit_inputs
request is completely processed can cause race conditions.  While the
consequence can be bad, the documentation is not clearly describing
that.  Add clear warnings.

The issue was discovered [1,2] by sashiko.

[1] https://lore.kernel.org/20260319161620.189392-3-objecting@objecting.org
[2] https://lore.kernel.org/20260319161620.189392-2-objecting@objecting.org

Changes from RFC
(https://lore.kernel.org/20260328172415.49940-1-sj@kernel.org)
- Wordsmith.
- Rebase to latest mm-new.

SeongJae Park (2):
  Docs/admin-guide/mm/damon/reclaim: warn commit_inputs vs param updates
    race
  Docs/admin-guide/mm/damon/lru_sort: warn commit_inputs vs param
    updates race

 Documentation/admin-guide/mm/damon/lru_sort.rst | 4 ++++
 Documentation/admin-guide/mm/damon/reclaim.rst  | 4 ++++
 2 files changed, 8 insertions(+)


base-commit: b761d53965a239abe1469f2e4e2d4f7d69fac9bd
-- 
2.47.3
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by SeongJae Park 3 days, 17 hours ago
Forwarding sashiko.dev review status for this thread.

# review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org

- [PATCH 1/2] Docs/admin-guide/mm/damon/reclaim: warn commit_inputs vs param updates race
  - status: Reviewed
  - review: ISSUES MAY FOUND
- [PATCH 2/2] Docs/admin-guide/mm/damon/lru_sort: warn commit_inputs vs param updates race
  - status: Reviewed
  - review: ISSUES MAY FOUND

# hkml [1] generated a draft of this mail.  It can be regenerated
# using below command:
#
#     hkml patch sashiko_dev --thread_status --for_forwarding \
#             20260329153052.46657-1-sj@kernel.org
#
# [1] https://github.com/sjp38/hackermail

Sent using hkml (https://github.com/sjp38/hackermail)
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by Greg KH 3 days, 15 hours ago
On Sun, Mar 29, 2026 at 08:49:16AM -0700, SeongJae Park wrote:
> Forwarding sashiko.dev review status for this thread.
> 
> # review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org

Why are you doing this?  If we want to see the review, can't we just go
and look at the tool itself?  sending it back to all of us feels odd,
especially when it is your own patches.

confused,

greg k-h
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by SeongJae Park 3 days, 13 hours ago
+ Roman for a case he has any opinion about my sashiko usage.

Hello Greg,

On Sun, 29 Mar 2026 20:05:53 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:

> On Sun, Mar 29, 2026 at 08:49:16AM -0700, SeongJae Park wrote:
> > Forwarding sashiko.dev review status for this thread.
> > 
> > # review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org
> 
> Why are you doing this?  If we want to see the review, can't we just go
> and look at the tool itself?

We can.  But it is bit cumbersome to opening web browser and moving my focus to
there.  Reading everything on the mailing tool is easier for some people like
me.  Like some test bots send reports are replying to patches, or we sometimes
forwarding bugzilla reports to mailing lists in a form of a plain text mail.

Secondly, I have to share my opinions about the reviews, as many times AI
reviews need human's opinions.  There is no good way to do that on the web ui
of the tool (sashiko) for now, and I think this mail based flow is the best.

And anyway I'm supposed to share at least my review of AI reviews, in mm
community.  If I ignore, I will only make Andrew have to reply asking that.

I used to share only my review of the AI reviews as replies, instead of
forwarding AI reviews and then replies to those.  But it was
1. cumbersome for me (should summarize AI review and then my review; feeling
   doing work twice), and
2. feeling not optimal at sharing all concerning comments with others.  My
   summary might miss some points of AI review but other reviewers might just
   believe me and don't read the full review due to the additional web browser
   opening work.  Also some other reivewers might kindly review AI reviews
   before I do, and save my (or their) time.

Hence I ended up to do this bit odd workflow:  Forwarding the full AI review on
the mailing list first, then reply my responses.

> sending it back to all of us feels odd,

If this is polluting your inbox and/or distract you, I'm so sorry for that.
Please let me know if this is distracting you.  Maybe I can filtering people
who don't want this kind of replies out of the recipients for the forwarding
mails.  Or, if you have a suggestion about what need to be changed, please let
me know.

> especially when it is your own patches.

Unfortuantely sashiko cannot send email on its own (yet).  So I'm doing that
until it can.

> 
> confused,

I hope my above explanation helps you.


Thanks,
SJ

[...]
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by Andrew Morton 2 days, 11 hours ago
On Sun, 29 Mar 2026 12:32:26 -0700 SeongJae Park <sj@kernel.org> wrote:

> On Sun, 29 Mar 2026 20:05:53 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> > On Sun, Mar 29, 2026 at 08:49:16AM -0700, SeongJae Park wrote:
> > > Forwarding sashiko.dev review status for this thread.
> > > 
> > > # review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org
> > 
> > Why are you doing this?  If we want to see the review, can't we just go
> > and look at the tool itself?
> 
> We can.  But it is bit cumbersome to opening web browser and moving my focus to
> there.  Reading everything on the mailing tool is easier for some people like
> me.  Like some test bots send reports are replying to patches, or we sometimes
> forwarding bugzilla reports to mailing lists in a form of a plain text mail.
> 
> Secondly, I have to share my opinions about the reviews, as many times AI
> reviews need human's opinions.  There is no good way to do that on the web ui
> of the tool (sashiko) for now, and I think this mail based flow is the best.

I do agree with Greg that it's all a bit excessive.  Thanks for your
your diligence, but perhaps dial it back a bit?  It's OK - we're all
trying to figure out how best to utilize this tool.

I view Sashiko as primarily an author tool.  Sometimes I call it
checkpatch++.  In a better world, author would be able to sort out
Sashiko issues before ever sending out the patchset.  But in this
world, a public send is needed to obtain that review.

So what we're presently seeing is author development activity which is
unfortunately and inappropriately being conducted on a public list.

Personally, I pay only a little attention to author's Sashiko activity.
Just enough to see whether I should pay more attention.  If author
says "oops, let me redo" then fine, I'll await the next spin.  If
author says "that was all nonsense" then fine, time to take a closer
look.
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by Theodore Tso 1 day, 20 hours ago
On Mon, Mar 30, 2026 at 02:22:05PM -0700, Andrew Morton wrote:
> 
> I view Sashiko as primarily an author tool.  Sometimes I call it
> checkpatch++.  In a better world, author would be able to sort out
> Sashiko issues before ever sending out the patchset.  But in this
> world, a public send is needed to obtain that review.

Note that Sashiko is fully open source and the prompts are available
in third_party/prompts in the git repo:

	https://github.com/sashiko-dev/sashiko

So people can run it privately, although they will need to provide
their own LLM credits.  This also means that you can use some other
LLM besides Gemini 3.1 Pro.

Cheers,

						- Ted
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by SeongJae Park 1 day, 17 hours ago
On Tue, 31 Mar 2026 08:19:43 -0400 "Theodore Tso" <tytso@mit.edu> wrote:

> On Mon, Mar 30, 2026 at 02:22:05PM -0700, Andrew Morton wrote:
> > 
> > I view Sashiko as primarily an author tool.  Sometimes I call it
> > checkpatch++.  In a better world, author would be able to sort out
> > Sashiko issues before ever sending out the patchset.  But in this
> > world, a public send is needed to obtain that review.
> 
> Note that Sashiko is fully open source and the prompts are available
> in third_party/prompts in the git repo:
> 
> 	https://github.com/sashiko-dev/sashiko
> 
> So people can run it privately, although they will need to provide
> their own LLM credits.

That's unfortunately a barrier to some people.  To me, what makes sashiko
special and different from other AI review tools is the fact that it is
automatically reviewing nearly every kernel patch for free and publicly sharing
the results.


Thanks,
SJ

[...]
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by SeongJae Park 2 days, 4 hours ago
On Mon, 30 Mar 2026 14:22:05 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:

> On Sun, 29 Mar 2026 12:32:26 -0700 SeongJae Park <sj@kernel.org> wrote:
> 
> > On Sun, 29 Mar 2026 20:05:53 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:
> > 
> > > On Sun, Mar 29, 2026 at 08:49:16AM -0700, SeongJae Park wrote:
> > > > Forwarding sashiko.dev review status for this thread.
> > > > 
> > > > # review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org
> > > 
> > > Why are you doing this?  If we want to see the review, can't we just go
> > > and look at the tool itself?
> > 
> > We can.  But it is bit cumbersome to opening web browser and moving my focus to
> > there.  Reading everything on the mailing tool is easier for some people like
> > me.  Like some test bots send reports are replying to patches, or we sometimes
> > forwarding bugzilla reports to mailing lists in a form of a plain text mail.
> > 
> > Secondly, I have to share my opinions about the reviews, as many times AI
> > reviews need human's opinions.  There is no good way to do that on the web ui
> > of the tool (sashiko) for now, and I think this mail based flow is the best.
> 
> I do agree with Greg that it's all a bit excessive.  Thanks for your
> your diligence, but perhaps dial it back a bit?  It's OK - we're all
> trying to figure out how best to utilize this tool.

Thank you for your kind words, Andrew.  I understand and admit the fact that
this looks excessive.

> 
> I view Sashiko as primarily an author tool.  Sometimes I call it
> checkpatch++.

Thank you for sharing your perspective.  This is helpful at what you want from
the use of the tool, thank you.

My view of sashiko was a human reviewer that having very odd characteristic and
cannot answer to my feedback for a reason, but still being useful in many
cases.  Hence I wanted to help the special reviewer be able to communicate with
others on the mailing list.  And I was thinking anyway that's what sashiko will
do, because I saw sending review as mail as one of TODO items for sashiko, from
the public announcement, and I onboarded DAMON for that.

But apparently not everyone is sharing same view.  My understanding of the TODO
item in sashiko public announcement may also be biased.  Maybe being a
subsystem's sole maintainer that looking for a reviewer made such uncautiously
biased perspectives.

> In a better world, author would be able to sort out
> Sashiko issues before ever sending out the patchset.  But in this
> world, a public send is needed to obtain that review.
> 
> So what we're presently seeing is author development activity which is
> unfortunately and inappropriately being conducted on a public list.

Makes sense.  Now I understand why you and Roman were discussing having a
separate mailing list for sharing the reviews via mail as a path forward, and
I agree that could be a good option.

> 
> Personally, I pay only a little attention to author's Sashiko activity.
> Just enough to see whether I should pay more attention.  If author
> says "oops, let me redo" then fine, I'll await the next spin.  If
> author says "that was all nonsense" then fine, time to take a closer
> look.

Makes sense.  I will try to keep sharing necessary information, but for only
targetted audiences, with less traffic.


Thanks,
SJ
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by Greg KH 3 days, 3 hours ago
On Sun, Mar 29, 2026 at 12:32:26PM -0700, SeongJae Park wrote:
> + Roman for a case he has any opinion about my sashiko usage.
> 
> Hello Greg,
> 
> On Sun, 29 Mar 2026 20:05:53 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> > On Sun, Mar 29, 2026 at 08:49:16AM -0700, SeongJae Park wrote:
> > > Forwarding sashiko.dev review status for this thread.
> > > 
> > > # review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org
> > 
> > Why are you doing this?  If we want to see the review, can't we just go
> > and look at the tool itself?
> 
> We can.  But it is bit cumbersome to opening web browser and moving my focus to
> there.  Reading everything on the mailing tool is easier for some people like
> me.  Like some test bots send reports are replying to patches, or we sometimes
> forwarding bugzilla reports to mailing lists in a form of a plain text mail.

Sure, but are you going to now forward all random tool reviews that are
run on your subsystem to all of these lists (your distribution cc: is
quite large here)?

> Secondly, I have to share my opinions about the reviews, as many times AI
> reviews need human's opinions.  There is no good way to do that on the web ui
> of the tool (sashiko) for now, and I think this mail based flow is the best.

That is assuming that you can fix up the AI reviews, is that happening
here?

> And anyway I'm supposed to share at least my review of AI reviews, in mm
> community.  If I ignore, I will only make Andrew have to reply asking that.
> 
> I used to share only my review of the AI reviews as replies, instead of
> forwarding AI reviews and then replies to those.  But it was
> 1. cumbersome for me (should summarize AI review and then my review; feeling
>    doing work twice), and
> 2. feeling not optimal at sharing all concerning comments with others.  My
>    summary might miss some points of AI review but other reviewers might just
>    believe me and don't read the full review due to the additional web browser
>    opening work.  Also some other reivewers might kindly review AI reviews
>    before I do, and save my (or their) time.
> 
> Hence I ended up to do this bit odd workflow:  Forwarding the full AI review on
> the mailing list first, then reply my responses.
> 
> > sending it back to all of us feels odd,
> 
> If this is polluting your inbox and/or distract you, I'm so sorry for that.
> Please let me know if this is distracting you.  Maybe I can filtering people
> who don't want this kind of replies out of the recipients for the forwarding
> mails.  Or, if you have a suggestion about what need to be changed, please let
> me know.

It just seemed odd, and might get crazy over time if this happens for
all random AI tools that happen to be popping up now, right?  If this is
the "official" one for -mm, that's fine, but consider the distribution
and intended audience a bit please.

thanks,

greg k-h
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by SeongJae Park 2 days, 4 hours ago
On Mon, 30 Mar 2026 07:47:54 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:

> On Sun, Mar 29, 2026 at 12:32:26PM -0700, SeongJae Park wrote:
> > + Roman for a case he has any opinion about my sashiko usage.
> > 
> > Hello Greg,
> > 
> > On Sun, 29 Mar 2026 20:05:53 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:
> > 
> > > On Sun, Mar 29, 2026 at 08:49:16AM -0700, SeongJae Park wrote:
> > > > Forwarding sashiko.dev review status for this thread.
> > > > 
> > > > # review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org
> > > 
> > > Why are you doing this?  If we want to see the review, can't we just go
> > > and look at the tool itself?
> > 
> > We can.  But it is bit cumbersome to opening web browser and moving my focus to
> > there.  Reading everything on the mailing tool is easier for some people like
> > me.  Like some test bots send reports are replying to patches, or we sometimes
> > forwarding bugzilla reports to mailing lists in a form of a plain text mail.
> 
> Sure, but are you going to now forward all random tool reviews that are
> run on your subsystem to all of these lists (your distribution cc: is
> quite large here)?

Obviously not for random tools.  But if there are a few tools that (nearly)
everyone agrees useful and worthy to integrate with the mailing lists workflow,
I would like to.

Now it seems I was much more optimistic that others.

> 
> > Secondly, I have to share my opinions about the reviews, as many times AI
> > reviews need human's opinions.  There is no good way to do that on the web ui
> > of the tool (sashiko) for now, and I think this mail based flow is the best.
> 
> That is assuming that you can fix up the AI reviews, is that happening
> here?

What I mean with the required human opinions for the AI reviews are not
necessarily only for fixups, but also sharing of reviews that the human and the
tool are aligned.

But in this case, I was sharing the review results seems incorrect, or doesn't
need deep dive at least:
https://lore.kernel.org/20260329163102.58683-1-sj@kernel.org

> 
> > And anyway I'm supposed to share at least my review of AI reviews, in mm
> > community.  If I ignore, I will only make Andrew have to reply asking that.
> > 
> > I used to share only my review of the AI reviews as replies, instead of
> > forwarding AI reviews and then replies to those.  But it was
> > 1. cumbersome for me (should summarize AI review and then my review; feeling
> >    doing work twice), and
> > 2. feeling not optimal at sharing all concerning comments with others.  My
> >    summary might miss some points of AI review but other reviewers might just
> >    believe me and don't read the full review due to the additional web browser
> >    opening work.  Also some other reivewers might kindly review AI reviews
> >    before I do, and save my (or their) time.
> > 
> > Hence I ended up to do this bit odd workflow:  Forwarding the full AI review on
> > the mailing list first, then reply my responses.
> > 
> > > sending it back to all of us feels odd,
> > 
> > If this is polluting your inbox and/or distract you, I'm so sorry for that.
> > Please let me know if this is distracting you.  Maybe I can filtering people
> > who don't want this kind of replies out of the recipients for the forwarding
> > mails.  Or, if you have a suggestion about what need to be changed, please let
> > me know.
> 
> It just seemed odd, and might get crazy over time if this happens for
> all random AI tools that happen to be popping up now, right?

As I also mentioned above, I agree.  And seems in this case I was much more
optimistic that others, or hallucinated ;)

> If this is
> the "official" one for -mm, that's fine, but consider the distribution
> and intended audience a bit please.

Andrew replied this is not such official and recommended action for mm.  I once
thought this could be the official one for DAMON only.  But in any case, I now
understand this can look crazy, odd or excessive to some people including those
that I believe.  I will think about a better way to use this tool, while
keeping your inputs in my mind.

Thank you so much for sharing your opinions, Greg.


Thanks,
SJ

[...]
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by Andrew Morton 3 days, 2 hours ago
On Mon, 30 Mar 2026 07:47:54 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:

> > And anyway I'm supposed to share at least my review of AI reviews, in mm
> > community.  If I ignore, I will only make Andrew have to reply asking that.

Actually no.  I see you're using Sashiko extensively so great, you'll
hear nothing more on Sashiko-vs-DAMON from me!
Re: (sashiko status) [PATCH 0/2] Docs/admin-guide/mm/damon: warn commit_inputs vs other params race
Posted by SeongJae Park 3 days, 16 hours ago
On Sun, 29 Mar 2026 08:49:16 -0700 SeongJae Park <sj@kernel.org> wrote:

> Forwarding sashiko.dev review status for this thread.
> 
> # review url: https://sashiko.dev/#/patchset/20260329153052.46657-1-sj@kernel.org
> 
> - [PATCH 1/2] Docs/admin-guide/mm/damon/reclaim: warn commit_inputs vs param updates race
>   - status: Reviewed
>   - review: ISSUES MAY FOUND
> - [PATCH 2/2] Docs/admin-guide/mm/damon/lru_sort: warn commit_inputs vs param updates race
>   - status: Reviewed
>   - review: ISSUES MAY FOUND

TL; DR: I believe those are not issues.


Thanks,
SJ

[...]