All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "SJ Park" <sj@kernel.org>
Cc: damon@lists.linux.dev
Subject: Re: [PATCH 6.12.y] mm/damon/core: move static variable last_nr_regions to damon_ctx
Date: Tue, 10 Nov 2026 02:35:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-206056@kernel.org> (raw)
In-Reply-To: <20261110022924.115699-1-sj@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mm/damon: last_nr_regions placed in public section of struct
  damon_ctx
--

commit eb0ad0bdecede5a2fbbdad016dac644dd4b389f4
Author: SJ Park <sj@kernel.org>

mm/damon/core: move static variable last_nr_regions to damon_ctx

This commit moves the static last_nr_regions variable from
kdamond_split_regions() into struct damon_ctx so parallel kdamond threads
do not race on region split state.

Link: https://lore.kernel.org/20261025164808.152048-3-sj@kernel.org

> diff --git a/include/linux/damon.h b/include/linux/damon.h
> index 4688a10eca89b..dfd0295104d37 100644
> --- a/include/linux/damon.h
> +++ b/include/linux/damon.h
> @@ -641,6 +641,11 @@ struct damon_ctx {
>  
>  	struct list_head adaptive_targets;
>  	struct list_head schemes;
> +	/*
> +	 * number of regions after last merge.  Read kdamond_split_regions()
> +	 * for more details.
> +	 */
> +	unsigned long last_nr_regions;
>  };
>  
>  static inline struct damon_region *damon_next_region(struct damon_region *r)

[Severity: Low]
Should last_nr_regions be placed inside the /* private: internal use only */
section of struct damon_ctx (or preceded by a /* private: */ marker)?

In this tree, the end of struct damon_ctx is after /* public: */, so adding
last_nr_regions here without a kernel-doc entry causes scripts/kernel-doc
(via Documentation/mm/damon/api.rst) to warn:

  Function parameter or struct member 'last_nr_regions' not described in 'damon_ctx'

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110022924.115699-1-sj@kernel.org?part=1

  reply	other threads:[~2026-11-10  2:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  1:08 FAILED: patch "[PATCH] mm/damon/core: move static variable last_nr_regions to damon_ctx" failed to apply to 6.12-stable tree Sasha Levin
2026-11-10  2:29 ` [PATCH 6.12.y] mm/damon/core: move static variable last_nr_regions to damon_ctx SJ Park
2026-11-10  2:35   ` sashiko-bot [this message]
2026-11-10  2:46     ` SJ Park
2026-11-10 15:02 ` [PATCH 6.12.y v2] " SJ Park
2026-11-10 15:04   ` sashiko-bot
2026-11-10 20:59   ` Sasha Levin

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=sashiko-outbox-206056@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.