Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PCI: Remove superfluous HK_TYPE_WQ check

It doesn't make sense to use nohz_full without also isolating the
related CPUs from the domain topology, either through the use of
isolcpus= or cpuset isolated partitions.

And now HK_TYPE_DOMAIN includes all kinds of domain isolated CPUs.

This means that HK_TYPE_DOMAIN should always be a subset of
HK_TYPE_KERNEL_NOISE (of which HK_TYPE_WQ is only an alias).

Therefore sane configurations verify:

HK_TYPE_KERNEL_NOISE & HK_TYPE_DOMAIN == HK_TYPE_DOMAIN

Simplify the PCI probe target election accordingly.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Marco Crivellari <marco.crivellari@suse.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Waiman Long <longman@redhat.com>
Cc: linux-pci@vger.kernel.org

+3 -14
+3 -14
drivers/pci/pci-driver.c
··· 384 384 pci_physfn_is_probed(dev)) { 385 385 error = local_pci_probe(&ddi); 386 386 } else { 387 - cpumask_var_t wq_domain_mask; 388 387 struct pci_probe_arg arg = { .ddi = &ddi }; 389 388 390 - if (!zalloc_cpumask_var(&wq_domain_mask, GFP_KERNEL)) { 391 - error = -ENOMEM; 392 - goto out; 393 - } 394 - 395 389 INIT_WORK_ONSTACK(&arg.work, local_pci_probe_callback); 396 - 397 390 /* 398 391 * The target election and the enqueue of the work must be within 399 392 * the same RCU read side section so that when the workqueue pool ··· 395 402 * targets. 396 403 */ 397 404 rcu_read_lock(); 398 - cpumask_and(wq_domain_mask, 399 - housekeeping_cpumask(HK_TYPE_WQ), 400 - housekeeping_cpumask(HK_TYPE_DOMAIN)); 401 - 402 405 cpu = cpumask_any_and(cpumask_of_node(node), 403 - wq_domain_mask); 406 + housekeeping_cpumask(HK_TYPE_DOMAIN)); 407 + 404 408 if (cpu < nr_cpu_ids) { 405 409 struct workqueue_struct *wq = pci_probe_wq; 406 410 ··· 412 422 error = local_pci_probe(&ddi); 413 423 } 414 424 415 - free_cpumask_var(wq_domain_mask); 416 425 destroy_work_on_stack(&arg.work); 417 426 } 418 - out: 427 + 419 428 dev->is_probed = 0; 420 429 cpu_hotplug_enable(); 421 430 return error;