Re: [PATCH 2/7] workqueue: Share the same PWQ for the CPUs of a pod

From: Lai Jiangshan
Date: Wed Jan 03 2024 - 04:01:54 EST


On Wed, Jan 3, 2024 at 10:55 AM kernel test robot <oliver.sang@xxxxxxxxx> wrote:


Hello 0-DAY CI Kernel Test Team

> 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 <oliver.sang@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-lkp/202401031025.95761451-oliver.sang@xxxxxxxxx
>
>
> [ 30.471685][ T1] ------------[ cut here ]------------
> [ 30.476998][ T1] WARNING: CPU: 111 PID: 1 at kernel/workqueue.c:4842 destroy_workqueue (kernel/workqueue.c:4842 (discriminator 1))

It hits the check here

if ((pwq != pwq->wq->dfl_pwq) && (pwq->refcnt > 1))
return true;

Not only is the default pwq installed multiple times, but also other pwqs
with this patch.

Maybe pwq->installed_refcnt needs to be introduced to fix it.

Thanks
Lai