linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jesper Dangaard Brouer <hawk@kernel.org>,
	tj@kernel.org, cgroups@vger.kernel.org, yosryahmed@google.com,
	shakeel.butt@linux.dev
Cc: oe-kbuild-all@lists.linux.dev,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	hannes@cmpxchg.org, lizefan.x@bytedance.com, longman@redhat.com,
	kernel-team@cloudflare.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V10] cgroup/rstat: Avoid flushing if there is an ongoing root flush
Date: Fri, 6 Sep 2024 04:20:21 +0800	[thread overview]
Message-ID: <202409060400.Z4B69Z8T-lkp@intel.com> (raw)
In-Reply-To: <172547884995.206112.808619042206173396.stgit@firesoul>

Hi Jesper,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on axboe-block/for-next akpm-mm/mm-everything linus/master v6.11-rc6 next-20240905]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jesper-Dangaard-Brouer/cgroup-rstat-Avoid-flushing-if-there-is-an-ongoing-root-flush/20240905-034221
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
patch link:    https://lore.kernel.org/r/172547884995.206112.808619042206173396.stgit%40firesoul
patch subject: [PATCH V10] cgroup/rstat: Avoid flushing if there is an ongoing root flush
config: parisc-defconfig (https://download.01.org/0day-ci/archive/20240906/202409060400.Z4B69Z8T-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240906/202409060400.Z4B69Z8T-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409060400.Z4B69Z8T-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/cgroup/rstat.c:321: warning: Function parameter or struct member 'strict' not described in 'cgroup_rstat_trylock_flusher'


vim +321 kernel/cgroup/rstat.c

   308	
   309	/**
   310	 * cgroup_rstat_trylock_flusher - Trylock that checks for on ongoing flusher
   311	 * @cgrp: target cgroup
   312	 *
   313	 * Function return value follow trylock semantics. Returning true when lock is
   314	 * obtained. Returning false when not locked and it detected flushing can be
   315	 * skipped as another ongoing flusher is taking care of the flush.
   316	 *
   317	 * For callers that depend on flush completing before returning a strict option
   318	 * is provided.
   319	 */
   320	static bool cgroup_rstat_trylock_flusher(struct cgroup *cgrp, bool strict)
 > 321	{
   322		struct cgroup *ongoing;
   323	
   324		if (strict)
   325			goto lock;
   326	
   327		/*
   328		 * Check if ongoing flusher is already taking care of this.  Descendant
   329		 * check is necessary due to cgroup v1 supporting multiple root's.
   330		 */
   331		ongoing = READ_ONCE(cgrp_rstat_ongoing_flusher);
   332		if (ongoing && cgroup_is_descendant(cgrp, ongoing))
   333			return false;
   334	
   335		/* Grab right to be ongoing flusher */
   336		if (!ongoing && cgroup_is_root(cgrp)) {
   337			struct cgroup *old;
   338	
   339			old = cmpxchg(&cgrp_rstat_ongoing_flusher, NULL, cgrp);
   340			if (old) {
   341				/* Lost race for being ongoing flusher */
   342				if (cgroup_is_descendant(cgrp, old))
   343					return false;
   344			}
   345			/* Due to lock yield combined with strict mode record ID */
   346			WRITE_ONCE(cgrp_rstat_ongoing_flusher_ID, current);
   347		}
   348	lock:
   349		__cgroup_rstat_lock(cgrp, -1);
   350	
   351		return true;
   352	}
   353	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


  parent reply	other threads:[~2024-09-05 20:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 19:41 [PATCH V10] cgroup/rstat: Avoid flushing if there is an ongoing root flush Jesper Dangaard Brouer
2024-09-04 21:10 ` Yosry Ahmed
2024-09-05 14:08   ` Jesper Dangaard Brouer
2024-09-05 17:31     ` Yosry Ahmed
2024-09-10 14:16       ` Jesper Dangaard Brouer
2024-09-10 18:55         ` Yosry Ahmed
2024-09-12 15:41           ` Jesper Dangaard Brouer
2024-09-12 16:34             ` Yosry Ahmed
     [not found]               ` <CAKEwX=PTA0OxisvY12Wa95s5KqzvQTXe1rZ7nw29nP+wR2dxkA@mail.gmail.com>
     [not found]                 ` <CAJD7tkbMph337XbBTbWfF8kp_fStP3-rN77vfR5tcn2+wYfJPQ@mail.gmail.com>
2024-09-12 18:24                   ` Nhat Pham
2024-09-12 18:50                     ` Yosry Ahmed
2024-09-05 20:20 ` kernel test robot [this message]
2024-09-10  5:23 ` kernel test robot

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=202409060400.Z4B69Z8T-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=hawk@kernel.org \
    --cc=kernel-team@cloudflare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=longman@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=tj@kernel.org \
    --cc=yosryahmed@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).