All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bodong Wang <bodong@mellanox.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: <bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <saeedm@mellanox.com>,
	Eli Cohen <eli@mellanox.com>
Subject: Re: [v2] PCI: Add an option to control probing of VFs before enabling SR-IOV
Date: Wed, 12 Apr 2017 11:00:06 -0500	[thread overview]
Message-ID: <601c08f0-ccc9-984f-0fce-5fc6012fe1f9@mellanox.com> (raw)
In-Reply-To: <20170412152216.GA25197@bhelgaas-glaptop.roam.corp.google.com>

On 4/12/2017 10:22 AM, Bjorn Helgaas wrote:
> On Wed, Apr 12, 2017 at 09:37:22AM -0500, Bodong Wang wrote:
>> On 4/11/2017 4:12 PM, Bjorn Helgaas wrote:
>>> Hi Bodong,
>>>
>>> On Wed, Mar 22, 2017 at 05:53:58PM +0200, bodong@mellanox.com wrote:
>>>> From: Bodong Wang <bodong@mellanox.com>
>>>>
>>>> Sometimes it is not desirable to probe the virtual functions after
>>>> SRIOV is enabled. This can save host side resource usage by VF
>>>> instances which would be eventually probed to VMs.
>>>>
>>>> Add a new PCI sysfs interface "sriov_probe_vfs" to control that
>>> >from the PF, all current callers still retain the same functionality.
>>>> To modify it, echo 0/n/N (disable probe) or 1/y/Y (enable probe) to
>>>>
>>>> /sys/bus/pci/devices/<DOMAIN:BUS:DEVICE.FUNCTION>/sriov_probe_vfs
>>> Is this basically the same functionality as /sys/bus/pci/drivers_autoprobe,
>>> but limited to a specific PF?  I.e., could we accomplish the same thing
>>> with the following?
>>>
>>>    # echo 0 > /sys/bus/pci/devices/DDDD:BB:dd.f/sriov_numvfs
>>>    # echo 0 > /sys/bus/pci/drivers_autoprobe
>>>    # echo 2 > /sys/bus/pci/devices/DDDD:BB:dd.f/sriov_numvfs
>>>    # echo 1 > /sys/bus/pci/drivers_autoprobe
>>>
>>> If not, can you contrast the above with drivers_autoprobe?  If we need
>>> both, should they be named more similarly?
>> Hi Bjorn,
>>
>> I agree with Alex about not using driver_autoprobe to achieve this.
>> It will affect all pci related device once it's disabled(probably in
>> a bad way).
> Alex mooted the idea of a generic driver core knob for devices that
> create child devices.  That's intriguing.  What other situations
> besides SR-IOV do this?  Maybe we could add a "drivers_autoprobe"
> inside the directory of each device that's capable of having child
> devices?
This seems interesting to me as well. Not sure if USB driver is 
applicable or not. And, drivers_autoprobe might work for USB if it 
doesn't probe the sub-device as default like sriov. Worth to take a look.
> If we continue with the current approach (instead of Alex's idea),
> I propose that you:
>
>    - Name your new knob "sriov_drivers_autoprobe" to be consistent with
>      other sriov sysfs files while also being parallel to
>      "drivers_autoprobe"
>
>    - Update Documentation/ABI/testing/sysfs-bus-pci to document your
>      new knob
>
>    - Update Documentation/ABI/... to document drivers_autoprobe
Ack, will send v3.

Thanks,

Bodong

  reply	other threads:[~2017-04-12 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 15:53 [v2] PCI: Add an option to control probing of VFs before enabling SR-IOV bodong
2017-03-27 15:11 ` Bodong Wang
2017-03-31 15:07   ` Bodong Wang
2017-04-11 21:12 ` Bjorn Helgaas
2017-04-11 21:51   ` Alex Williamson
2017-04-12 14:34   ` Bodong Wang
2017-04-12 14:37   ` Bodong Wang
2017-04-12 15:22     ` Bjorn Helgaas
2017-04-12 16:00       ` Bodong Wang [this message]
2017-04-11 21:51 ` Alex Williamson

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=601c08f0-ccc9-984f-0fce-5fc6012fe1f9@mellanox.com \
    --to=bodong@mellanox.com \
    --cc=bhelgaas@google.com \
    --cc=eli@mellanox.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.