Linux Trace Kernel
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ridong Chen" <ridong.chen@linux.dev>
Cc: hannes@cmpxchg.org, linux-trace-kernel@vger.kernel.org,
	tj@kernel.org, mkoutny@suse.com
Subject: Re: [PATCH RFC v2 7/7] mm/vmscan: pass scan_control to mm_vmscan_balance_pgdat_end
Date: Mon, 28 Sep 2026 11:58:26 +0000	[thread overview]
Message-ID: <20260928115827.18B291F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260928114625.3609130-8-ridong.chen@linux.dev>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] mm: BPF raw tracepoint ABI breakage and commit message mismatch in mm_vmscan_balance_pgdat_end
--

commit eb8bc6091aab714af4b68f316fecfc08d43c39dc
Author: Ridong Chen <chenridong@xiaomi.com>

mm/vmscan: pass scan_control to mm_vmscan_balance_pgdat_end

This commit updates the mm_vmscan_balance_pgdat_end tracepoint to receive
a struct scan_control pointer rather than passing individual struct fields.
It updates the TP_PROTO and TP_ARGS while leaving the exported event format
unchanged.

>     balance_pgdat() passes sc.order and sc.nr_reclaimed to
>     mm_vmscan_balance_pgdat_end as bare arguments. Pass the enclosing
>     struct scan_control instead and read the fields out in TP_fast_assign,
>     mirroring mm_vmscan_balance_pgdat_begin. highest_zoneidx stays a

[Severity: Medium]
The commit message states this change is "mirroring
mm_vmscan_balance_pgdat_begin." Is this description accurate?

Looking at mm_vmscan_balance_pgdat_begin in mm/trace_vmscan.h, it still takes
individual arguments and was not updated to take struct scan_control *sc:

TRACE_EVENT(mm_vmscan_balance_pgdat_begin,
        TP_PROTO(int nid, int order, int highest_zoneidx),

Could the commit message be more precise about the rationale?

> diff --git a/mm/trace_vmscan.h b/mm/trace_vmscan.h
> index 04f285e776596..c27bc7cc60630 100644
> --- a/mm/trace_vmscan.h
> +++ b/mm/trace_vmscan.h
[ ... ]
> @@ -124,10 +124,9 @@ TRACE_EVENT(mm_vmscan_balance_pgdat_begin,
>  
>  TRACE_EVENT(mm_vmscan_balance_pgdat_end,
>  
> -	TP_PROTO(int nid, int order, int highest_zoneidx,
> -		 unsigned long nr_reclaimed),
> +	TP_PROTO(int nid, struct scan_control *sc, int highest_zoneidx),
>  
> -	TP_ARGS(nid, order, highest_zoneidx, nr_reclaimed),
> +	TP_ARGS(nid, sc, highest_zoneidx),

[Severity: Medium]
The commit message mentions there is "No functional change", but could this
modification break existing BPF programs hooked to this tracepoint?

While standard trace events parse the formatted output, BPF raw tracepoints
consume the TP_PROTO arguments directly via ctx->args. Changing the number
and type of arguments alters the BPF raw tracepoint ABI for this event.

Does this inadvertently break user space tools that attach to this raw
tracepoint and expect the 4 original arguments?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260928114625.3609130-1-ridong.chen@linux.dev?part=7

  reply	other threads:[~2026-09-28 11:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 11:46 [PATCH RFC v2 0/7] mm/vmscan: move vmscan tracepoints to a local header Ridong Chen
2026-09-28 11:46 ` [PATCH RFC v2 1/7] mm/memcontrol: drop unused vmscan tracepoint include Ridong Chen
2026-09-28 12:08   ` Muchun Song
2026-09-29  1:23     ` Ridong Chen
2026-09-28 11:46 ` [PATCH RFC v2 2/7] mm/vmscan: move vmscan tracepoints to a local header Ridong Chen
2026-09-28 11:46 ` [PATCH RFC v2 3/7] mm/vmscan: move struct scan_control to a dedicated header Ridong Chen
2026-09-28 11:46 ` [PATCH RFC v2 4/7] mm/vmscan: pass scan_control to the reclaim-begin tracepoints Ridong Chen
2026-09-28 11:46 ` [PATCH RFC v2 5/7] mm/vmscan: pass scan_control to the LRU isolate/shrink tracepoints Ridong Chen
2026-09-28 11:46 ` [PATCH RFC v2 6/7] mm/vmscan: pass scan_control to mm_vmscan_reclaim_pages Ridong Chen
2026-09-28 11:46 ` [PATCH RFC v2 7/7] mm/vmscan: pass scan_control to mm_vmscan_balance_pgdat_end Ridong Chen
2026-09-28 11:58   ` sashiko-bot [this message]
2026-09-29  2:01     ` Ridong Chen

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=20260928115827.18B291F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=ridong.chen@linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tj@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