public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Nitesh Narayan Lal <nitesh@redhat.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
	frederic@kernel.org, mtosatti@redhat.com, juri.lelli@redhat.com,
	abelits@marvell.com, bhelgaas@google.com,
	linux-pci@vger.kernel.org, rostedt@goodmis.org, mingo@kernel.org,
	peterz@infradead.org, tglx@linutronix.de
Subject: Re: [Patch v1 2/3] PCI: prevent work_on_cpu's probe to execute on isolated CPUs
Date: Tue, 16 Jun 2020 18:03:14 -0400	[thread overview]
Message-ID: <562ce033-50d6-37f0-57a6-de3dd6623c5c@redhat.com> (raw)
In-Reply-To: <20200616200550.GA1977307@bjorn-Precision-5520>


[-- Attachment #1.1: Type: text/plain, Size: 2610 bytes --]


On 6/16/20 4:05 PM, Bjorn Helgaas wrote:
> "git log --oneline drivers/pci/pci-driver.c" tells you that the
> subject should be something like:
>
>   PCI: Restrict probe functions to housekeeping CPUs
>
> On Wed, Jun 10, 2020 at 12:12:25PM -0400, Nitesh Narayan Lal wrote:
>> From: Alex Belits <abelits@marvell.com>
>>
>> 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 Physical device.
>> This patch replaces 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.
> s/Physical/PF/ (since you used "VF" earlier, this should match that)
>
> s/This patch replaces/Replace the/
>
> Please rewrap this to fill a 75 column line (so it doesn't overflow 80
> columns when "git log" adds 4 spaces).
>
> This should be two paragraphs; add a blank line between them.

Thanks for pointing these out.
I will correct it in the next posting before that I will wait for any comments
on other patches.

>
>> Signed-off-by: Alex Belits <abelits@marvell.com>
>> Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.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 da6510af1221..449466f71040 100644
>> --- a/drivers/pci/pci-driver.c
>> +++ b/drivers/pci/pci-driver.c
>> @@ -12,6 +12,7 @@
>>  #include <linux/string.h>
>>  #include <linux/slab.h>
>>  #include <linux/sched.h>
>> +#include <linux/sched/isolation.h>
>>  #include <linux/cpu.h>
>>  #include <linux/pm_runtime.h>
>>  #include <linux/suspend.h>
>> @@ -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);
>> -- 
>> 2.18.4
>>
-- 
Nitesh


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-06-16 22:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 16:12 [PATCH v1 0/3] Preventing job distribution to isolated CPUs Nitesh Narayan Lal
2020-06-10 16:12 ` [Patch v1 1/3] lib: restricting cpumask_local_spread to only houskeeping CPUs Nitesh Narayan Lal
2020-06-10 16:12 ` [Patch v1 2/3] PCI: prevent work_on_cpu's probe to execute on isolated CPUs Nitesh Narayan Lal
2020-06-16 20:05   ` Bjorn Helgaas
2020-06-16 22:03     ` Nitesh Narayan Lal [this message]
2020-06-16 23:22   ` Frederic Weisbecker
2020-06-10 16:12 ` [Patch v1 3/3] net: restrict queuing of receive packets to housekeeping CPUs Nitesh Narayan Lal
2020-06-16 17:26 ` [PATCH v1 0/3] Preventing job distribution to isolated CPUs Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=562ce033-50d6-37f0-57a6-de3dd6623c5c@redhat.com \
    --to=nitesh@redhat.com \
    --cc=abelits@marvell.com \
    --cc=bhelgaas@google.com \
    --cc=frederic@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox