From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEE69C433E1 for ; Thu, 9 Jul 2020 08:46:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F91E20672 for ; Thu, 9 Jul 2020 08:46:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OPrwnloV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fL8jnR/5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726475AbgGIIqA (ORCPT ); Thu, 9 Jul 2020 04:46:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbgGIIp5 (ORCPT ); Thu, 9 Jul 2020 04:45:57 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83CDAC08C5DC; Thu, 9 Jul 2020 01:45:57 -0700 (PDT) Date: Thu, 09 Jul 2020 08:45:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1594284355; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=koy880jM+8wZIf6dy8++q1pIXuqSYgx+jagYglVg8Gg=; b=OPrwnloVqtl34zo4wPO/OmRCH5rjM+yVg5RPs8Gao+4HktG2t8rS2VVW+U+yvG5GQeq/3P xtw2GHGE0MH62AmGaTDsEp8mSxfTGeZhUs1MKB1CAp7/+18LYlT7pqs4Al2T07MmMl4HUW ArMfVhzjzBzSNvXWEdpJZVK/A+hQ98Y333S/ncwCrB5TPce/HN5+dvGwMvcFa2a/brVkrt NGmGR54bKPgtuCGJ3haSwtlxsjRer7SZJfEnAtW88hGCuSiGvp8FPXqLYXA41gReRQ+OGg AdWj4fRayD90VbIt6L4FCh4MzawBij0y5ew+D7f6mLnjzBMOib/8SES2HWZj3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1594284355; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=koy880jM+8wZIf6dy8++q1pIXuqSYgx+jagYglVg8Gg=; b=fL8jnR/5DNkr9EZdAt6h7zVDNVGDMQt7q5wt1cnT36/vcyJS3APrPlGkxRBQdcrNnlwV+h rf6I6QuIiCmhXXAw== From: "tip-bot2 for Alex Belits" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] PCI: Restrict probe functions to housekeeping CPUs Cc: Alex Belits , Nitesh Narayan Lal , "Peter Zijlstra (Intel)" , Frederic Weisbecker , Bjorn Helgaas , x86 , LKML In-Reply-To: <20200625223443.2684-3-nitesh@redhat.com> References: <20200625223443.2684-3-nitesh@redhat.com> MIME-Version: 1.0 Message-ID: <159428435541.4006.9239442030926752019.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 69a18b18699b59654333651d95f8ca09d01048f8 Gitweb: https://git.kernel.org/tip/69a18b18699b59654333651d95f8ca09d01048f8 Author: Alex Belits AuthorDate: Thu, 25 Jun 2020 18:34:42 -04:00 Committer: Peter Zijlstra CommitterDate: Wed, 08 Jul 2020 11:39:01 +02:00 PCI: Restrict probe functions to housekeeping CPUs pci_call_probe() prevents the nesting of work_on_cpu() for a scenario where a VF device is probed from work_on_cpu() of the PF. Replace the cpumask used in pci_call_probe() from all online CPUs to only housekeeping CPUs. This is to ensure that there are no additional latency overheads caused due to the pinning of jobs on isolated CPUs. Signed-off-by: Alex Belits Signed-off-by: Nitesh Narayan Lal Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker Acked-by: Bjorn Helgaas Link: https://lkml.kernel.org/r/20200625223443.2684-3-nitesh@redhat.com --- drivers/pci/pci-driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index da6510a..449466f 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -333,6 +334,7 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, const struct pci_device_id *id) { int error, node, cpu; + int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; struct drv_dev_and_id ddi = { drv, dev, id }; /* @@ -353,7 +355,8 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev, pci_physfn_is_probed(dev)) cpu = nr_cpu_ids; else - cpu = cpumask_any_and(cpumask_of_node(node), cpu_online_mask); + cpu = cpumask_any_and(cpumask_of_node(node), + housekeeping_cpumask(hk_flags)); if (cpu < nr_cpu_ids) error = work_on_cpu(cpu, local_pci_probe, &ddi);