[PATCH 17/33] PCI: Flush PCI probe workqueue on cpuset isolated partition change

Frederic Weisbecker frederic at kernel.org
Wed Dec 31 06:37:36 PST 2025


Le Fri, Dec 26, 2025 at 04:48:10PM +0800, Chen Ridong a écrit :
> > @@ -145,6 +146,7 @@ int housekeeping_update(struct cpumask *isol_mask, enum hk_type type)
> >  
> >  	synchronize_rcu();
> >  
> > +	pci_probe_flush_workqueue();
> >  	mem_cgroup_flush_workqueue();
> >  	vmstat_flush_workqueue();
> >  
> 
> I am concerned that this flush work may slow down writes to the cpuset interface. I am not sure how
> significant the impact will be.

First, writing to cpuset is not something that should be considered as a fast
path. It is a preparation work at configuration time that can tolerate a few
milliseconds of delay, which I expect to be what we should encounter most
of time here.

Second, this is not a "usual" cpuset partition write. CPU isolation is a niche
usecase (real time or Data plane). User must expect tradeoffs against the offer.

Third, about this very patch, most pci probe should happen at boot time before
cgroup is even accessible to userspace.

> I'm concerned about potential deadlock risks. While preliminary investigation hasn't uncovered any
> issues, we must ensure that the cpu write lock is not held during the work(writing cpuset interface
> needs cpu read lock).

That's what we have lockdep for :-)

Thanks.

-- 
Frederic Weisbecker
SUSE Labs



More information about the linux-arm-kernel mailing list