public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Waiman Long <longman@redhat.com>, Tejun Heo <tj@kernel.org>,
	Zefan Li <lizefan.x@bytedance.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>
Cc: kbuild-all@lists.01.org, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v5 1/6] cgroup/cpuset: Properly transition to invalid partition
Date: Sun, 15 Aug 2021 04:21:55 +0800	[thread overview]
Message-ID: <202108150418.2ORAqLSj-lkp@intel.com> (raw)
In-Reply-To: <20210814173848.11540-2-longman@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 11708 bytes --]

Hi Waiman,

I love your patch! Perhaps something to improve:

[auto build test WARNING on cgroup/for-next]
[also build test WARNING on next-20210813]
[cannot apply to kselftest/next v5.14-rc5]
[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]

url:    https://github.com/0day-ci/linux/commits/Waiman-Long/cgroup-cpuset-Add-new-cpuset-partition-type-empty-effecitve-cpus/20210815-014333
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: ia64-defconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/56ec7dd271c77e3cc92f0df6fd766004a7a0aa88
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Waiman-Long/cgroup-cpuset-Add-new-cpuset-partition-type-empty-effecitve-cpus/20210815-014333
        git checkout 56ec7dd271c77e3cc92f0df6fd766004a7a0aa88
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   kernel/cgroup/cpuset.c: In function 'update_prstate':
>> kernel/cgroup/cpuset.c:2068:1: warning: the frame size of 3072 bytes is larger than 2048 bytes [-Wframe-larger-than=]
    2068 | }
         | ^


vim +2068 kernel/cgroup/cpuset.c

^1da177e4c3f41 kernel/cpuset.c        Linus Torvalds 2005-04-16  1966  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1967  /*
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1968   * update_prstate - update partititon_root_state
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1969   * cs: the cpuset to update
0f3adb8a1e5f36 kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1970   * new_prs: new partition root state
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1971   *
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1972   * Call with cpuset_mutex held.
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1973   */
0f3adb8a1e5f36 kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1974  static int update_prstate(struct cpuset *cs, int new_prs)
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1975  {
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1976  	int err, old_prs = cs->partition_root_state;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1977  	struct cpuset *parent = parent_cs(cs);
0f3adb8a1e5f36 kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1978  	struct tmpmasks tmpmask;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1979  
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1980  	if (old_prs == new_prs)
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1981  		return 0;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1982  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1983  	/*
3881b86128d0be kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1984  	 * Cannot force a partial or invalid partition root to a full
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1985  	 * partition root.
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1986  	 */
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1987  	if (new_prs && (old_prs == PRS_ERROR))
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1988  		return -EINVAL;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1989  
0f3adb8a1e5f36 kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1990  	if (alloc_cpumasks(NULL, &tmpmask))
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1991  		return -ENOMEM;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1992  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1993  	err = -EINVAL;
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  1994  	if (!old_prs) {
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1995  		/*
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1996  		 * Turning on partition root requires setting the
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1997  		 * CS_CPU_EXCLUSIVE bit implicitly as well and cpus_allowed
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1998  		 * cannot be NULL.
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  1999  		 */
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2000  		if (cpumask_empty(cs->cpus_allowed))
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2001  			goto out;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2002  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2003  		err = update_flag(CS_CPU_EXCLUSIVE, cs, 1);
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2004  		if (err)
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2005  			goto out;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2006  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2007  		err = update_parent_subparts_cpumask(cs, partcmd_enable,
0f3adb8a1e5f36 kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2008  						     NULL, &tmpmask);
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2009  		if (err) {
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2010  			update_flag(CS_CPU_EXCLUSIVE, cs, 0);
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2011  			goto out;
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2012  		}
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2013  	} else {
3881b86128d0be kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2014  		/*
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2015  		 * Switch back to member is always allowed even if it
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2016  		 * causes child partitions to become invalid.
3881b86128d0be kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2017  		 */
3881b86128d0be kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2018  		err = 0;
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2019  		update_parent_subparts_cpumask(cs, partcmd_disable, NULL,
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2020  					       &tmpmask);
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2021  		/*
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2022  		 * If there are child partitions, we have to make them invalid.
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2023  		 */
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2024  		if (unlikely(cs->nr_subparts_cpus)) {
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2025  			struct tmpmasks tmp;
3881b86128d0be kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2026  
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2027  			spin_lock_irq(&callback_lock);
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2028  			cs->nr_subparts_cpus = 0;
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2029  			cpumask_clear(cs->subparts_cpus);
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2030  			compute_effective_cpumask(cs->effective_cpus, cs, parent);
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2031  			spin_unlock_irq(&callback_lock);
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2032  
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2033  			/*
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2034  			 * If alloc_cpumasks() fails, we are running out
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2035  			 * of memory and there isn't much we can do.
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2036  			 */
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2037  			if (!alloc_cpumasks(NULL, &tmp)) {
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2038  				update_cpumasks_hier(cs, &tmp);
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2039  				free_cpumasks(NULL, &tmp);
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2040  			}
56ec7dd271c77e kernel/cgroup/cpuset.c Waiman Long    2021-08-14  2041  		}
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2042  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2043  		/* Turning off CS_CPU_EXCLUSIVE will not return error */
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2044  		update_flag(CS_CPU_EXCLUSIVE, cs, 0);
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2045  	}
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2046  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2047  	/*
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2048  	 * Update cpumask of parent's tasks except when it is the top
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2049  	 * cpuset as some system daemons cannot be mapped to other CPUs.
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2050  	 */
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2051  	if (parent != &top_cpuset)
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2052  		update_tasks_cpumask(parent);
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2053  
4716909cc5c566 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2054  	if (parent->child_ecpus_count)
0f3adb8a1e5f36 kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2055  		update_sibling_cpumasks(parent, cs, &tmpmask);
4716909cc5c566 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2056  
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2057  	rebuild_sched_domains_locked();
ee8dde0cd2ce78 kernel/cgroup/cpuset.c Waiman Long    2018-11-08  2058  out:
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2059  	if (!err) {
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2060  		spin_lock_irq(&callback_lock);
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2061  		cs->partition_root_state = new_prs;
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2062  		spin_unlock_irq(&callback_lock);
e7cc9888dc5792 kernel/cgroup/cpuset.c Waiman Long    2021-08-10  2063  		notify_partition_change(cs, old_prs, new_prs);
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2064  	}
6ba34d3c73674e kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2065  
0f3adb8a1e5f36 kernel/cgroup/cpuset.c Waiman Long    2021-07-20  2066  	free_cpumasks(NULL, &tmpmask);
645fcc9d2f6946 kernel/cpuset.c        Li Zefan       2009-01-07  2067  	return err;
^1da177e4c3f41 kernel/cpuset.c        Linus Torvalds 2005-04-16 @2068  }
^1da177e4c3f41 kernel/cpuset.c        Linus Torvalds 2005-04-16  2069  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 19829 bytes --]

  reply	other threads:[~2021-08-14 20:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 17:38 [PATCH-cgroup v5 0/6] cgroup/cpuset: Add new cpuset partition type & empty effecitve cpus Waiman Long
2021-08-14 17:38 ` [PATCH v5 1/6] cgroup/cpuset: Properly transition to invalid partition Waiman Long
2021-08-14 20:21   ` kernel test robot [this message]
2021-08-14 20:54     ` Waiman Long
2021-08-14 17:38 ` [PATCH v5 2/6] cgroup/cpuset: Show invalid partition reason string Waiman Long
2021-08-14 17:38 ` [PATCH v5 3/6] cgroup/cpuset: Add a new isolated cpus.partition type Waiman Long
     [not found] ` <20210814173848.11540-1-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-08-14 17:38   ` [PATCH v5 4/6] cgroup/cpuset: Allow non-top parent partition to distribute out all CPUs Waiman Long
2021-08-14 17:38   ` [PATCH v5 6/6] kselftest/cgroup: Add cpuset v2 partition root state test Waiman Long
2021-08-14 17:38 ` [PATCH v5 5/6] cgroup/cpuset: Update description of cpuset.cpus.partition in cgroup-v2.rst Waiman Long

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=202108150418.2ORAqLSj-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=longman@redhat.com \
    --cc=skhan@linuxfoundation.org \
    --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