[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202211050252.EkAgLEwd-lkp@intel.com>
Date: Sat, 5 Nov 2022 02:18:38 +0800
From: kernel test robot <lkp@...el.com>
To: Binglei Wang <l3b2w1@...il.com>, tj@...nel.org,
jiangshanlai@...il.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, Binglei Wang <l3b2w1@...il.com>
Subject: Re: [PATCH] workqueue: make workers threads stick to HK_TYPE_KTHREAD
cpumask
Hi Binglei,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tj-wq/for-next]
[also build test WARNING on linus/master v6.1-rc3 next-20221104]
[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/Binglei-Wang/workqueue-make-workers-threads-stick-to-HK_TYPE_KTHREAD-cpumask/20221103-111140
base: https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-next
patch link: https://lore.kernel.org/r/20221103030933.840989-1-l3b2w1%40gmail.com
patch subject: [PATCH] workqueue: make workers threads stick to HK_TYPE_KTHREAD cpumask
config: arm64-randconfig-r032-20221102
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/96d045fb333d1098f273ad89d6a7215d8ea02ac4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Binglei-Wang/workqueue-make-workers-threads-stick-to-HK_TYPE_KTHREAD-cpumask/20221103-111140
git checkout 96d045fb333d1098f273ad89d6a7215d8ea02ac4
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
kernel/workqueue.c:1958:11: error: incompatible pointer types assigning to 'const struct cupmask *' from 'const struct cpumask *' [-Werror,-Wincompatible-pointer-types]
cpumask = housekeeping_cpumask(HK_TYPE_KTHREAD);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/workqueue.c:1959:42: warning: pointer type mismatch ('const struct cupmask *' and 'cpumask_var_t' (aka 'struct cpumask *')) [-Wpointer-type-mismatch]
kthread_bind_mask(worker->task, cpumask ? cpumask : pool->attrs->cpumask);
^ ~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +1959 kernel/workqueue.c
1913
1914 /**
1915 * create_worker - create a new workqueue worker
1916 * @pool: pool the new worker will belong to
1917 *
1918 * Create and start a new worker which is attached to @pool.
1919 *
1920 * CONTEXT:
1921 * Might sleep. Does GFP_KERNEL allocations.
1922 *
1923 * Return:
1924 * Pointer to the newly created worker.
1925 */
1926 static struct worker *create_worker(struct worker_pool *pool)
1927 {
1928 struct worker *worker;
1929 int id;
1930 char id_buf[16];
1931 const struct cupmask *cpumask = NULL;
1932
1933 /* ID is needed to determine kthread name */
1934 id = ida_alloc(&pool->worker_ida, GFP_KERNEL);
1935 if (id < 0)
1936 return NULL;
1937
1938 worker = alloc_worker(pool->node);
1939 if (!worker)
1940 goto fail;
1941
1942 worker->id = id;
1943
1944 if (pool->cpu >= 0)
1945 snprintf(id_buf, sizeof(id_buf), "%d:%d%s", pool->cpu, id,
1946 pool->attrs->nice < 0 ? "H" : "");
1947 else
1948 snprintf(id_buf, sizeof(id_buf), "u%d:%d", pool->id, id);
1949
1950 worker->task = kthread_create_on_node(worker_thread, worker, pool->node,
1951 "kworker/%s", id_buf);
1952 if (IS_ERR(worker->task))
1953 goto fail;
1954
1955 set_user_nice(worker->task, pool->attrs->nice);
1956
1957 if (housekeeping_enabled(HK_TYPE_KTHREAD))
1958 cpumask = housekeeping_cpumask(HK_TYPE_KTHREAD);
> 1959 kthread_bind_mask(worker->task, cpumask ? cpumask : pool->attrs->cpumask);
1960
1961 /* successful, attach the worker to the pool */
1962 worker_attach_to_pool(worker, pool);
1963
1964 /* start the newly created worker */
1965 raw_spin_lock_irq(&pool->lock);
1966 worker->pool->nr_workers++;
1967 worker_enter_idle(worker);
1968 wake_up_process(worker->task);
1969 raw_spin_unlock_irq(&pool->lock);
1970
1971 return worker;
1972
1973 fail:
1974 ida_free(&pool->worker_ida, id);
1975 kfree(worker);
1976 return NULL;
1977 }
1978
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (170568 bytes)
Powered by blists - more mailing lists