Hi Binglei, Thank you for the patch! Yet something to improve: [auto build test ERROR on tj-wq/for-next] [also build test ERROR on linus/master v6.1-rc3 next-20221103] [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: nios2-randconfig-r014-20221103 compiler: nios2-linux-gcc (GCC) 12.1.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/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=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): kernel/workqueue.c: In function 'create_worker': >> kernel/workqueue.c:1958:25: error: assignment to 'const struct cupmask *' from incompatible pointer type 'const struct cpumask *' [-Werror=incompatible-pointer-types] 1958 | cpumask = housekeeping_cpumask(HK_TYPE_KTHREAD); | ^ kernel/workqueue.c:1959:59: warning: pointer type mismatch in conditional expression 1959 | kthread_bind_mask(worker->task, cpumask ? cpumask : pool->attrs->cpumask); | ^ cc1: some warnings being treated as errors vim +1958 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