Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Longpeng (Mike, Cloud Infrastructure Service Product Dept.)"  <longpeng2@huawei.com>
To: Oliver O'Halloran <oohall@gmail.com>
Cc: Leon Romanovsky <leon@kernel.org>, <bhelgaas@google.com>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<jianjay.zhou@huawei.com>, <zhuangshengen@huawei.com>,
	<arei.gonglei@huawei.com>, <yechuan@huawei.com>,
	<huangzhichao@huawei.com>, <xiehong@huawei.com>
Subject: Re: [RFC 0/4] pci/sriov: support VFs dynamic addition
Date: Wed, 16 Nov 2022 08:52:28 +0800	[thread overview]
Message-ID: <726934f2-ded0-317f-2082-bf5ee08cf39d@huawei.com> (raw)
In-Reply-To: <CAOSf1CFAG7FMjm0uzKCNMxB=0Q41JoNz7vr7mHNqEP0rr124Ug@mail.gmail.com>

Hi Oliver,

在 2022/11/15 10:06, Oliver O'Halloran 写道:
> On Tue, Nov 15, 2022 at 1:08 AM Longpeng (Mike, Cloud Infrastructure
> Service Product Dept.) <longpeng2@huawei.com> wrote:
>>
>> *snip*
>>
>> Adding 2K+ VFs to the sysfs need too much time.
>>
>> Look at the bottomhalf of the hypervisor live update:
>> kexec --> add 2K VFs --> restore VMs
>>
>> The downtime can be reduced if the sequence is:
>> kexec --> add 100 VFs(the VMs used) --> resotre VMs --> add 1.9K VFs
> 
> Right, so you want to add VFs in batches rather than all at once.
> Personally I think the bitmap approach is error prone since it renders
> the meaning of pf_dev->sriov->num_VFs unclear and there's some hairy
> code in arch/powerpc/ that approach will likely break. A better

I ran a quick search in the arch/powerpc/, do you mean the 
pseries_call_allow_unfreeze ? Or would you please point the code?

> approach would be to add an attribute to control the number of VFs
> enabled in hardware and allowing sriov_numvfs to accept any number
> between the current value and sriov_hw_numvfs. e.g. your HV setup

Oh, this is a constructive suggestion, I'll try in the next step.

> would look something like:
>
> echo 2048 > sriov_hw_numvfs
> echo 100 > sriov_numvfs
> 
It's fixed to add the first 100 VFs first, maybe providing an interface 
that users can specify which id or which range of ids to be added first 
would be better?

> # time passes
> echo 2048 > sriov_numvfs
> 
> This would be fairly simple to implement and you can make it backwards
> compatible by having writes to sriov_numvfs retain their current
> semantics if sriov_hw_numvfs is zero.
> .

  reply	other threads:[~2022-11-16  0:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 14:27 [RFC 0/4] pci/sriov: support VFs dynamic addition Longpeng(Mike)
2022-11-11 14:27 ` [RFC 1/4] pci/sriov: extract sriov_numvfs common helper Longpeng(Mike)
2022-11-11 14:27 ` [RFC 2/4] pci/sriov: add vf_bitmap to mark the vf id allocation Longpeng(Mike)
2022-11-11 14:27 ` [RFC 3/4] pci/sriov: add sriov_numfs_no_scan interface Longpeng(Mike)
2022-11-11 14:27 ` [RFC 4/4] pci/sriov: add sriov_scan_vf_id interface Longpeng(Mike)
2022-11-11 16:39 ` [RFC 0/4] pci/sriov: support VFs dynamic addition Leon Romanovsky
2022-11-13 13:47   ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
2022-11-14  7:04     ` Leon Romanovsky
2022-11-14 12:38       ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
2022-11-14 13:09         ` Leon Romanovsky
2022-11-14 14:06           ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
2022-11-14 14:20             ` Leon Romanovsky
2022-11-15  1:38               ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
2022-11-15  1:50               ` Oliver O'Halloran
2022-11-15  8:32                 ` Leon Romanovsky
2022-11-15  9:36                   ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
2022-11-15 10:02                     ` Leon Romanovsky
2022-11-15 10:27                       ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
2022-11-15 12:49                   ` Oliver O'Halloran
2022-11-15  2:06             ` Oliver O'Halloran
2022-11-16  0:52               ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.) [this message]
2022-11-11 23:07 ` Bjorn Helgaas
2022-11-13 13:49   ` Longpeng (Mike, Cloud Infrastructure Service Product Dept.)

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=726934f2-ded0-317f-2082-bf5ee08cf39d@huawei.com \
    --to=longpeng2@huawei.com \
    --cc=arei.gonglei@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=huangzhichao@huawei.com \
    --cc=jianjay.zhou@huawei.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=oohall@gmail.com \
    --cc=xiehong@huawei.com \
    --cc=yechuan@huawei.com \
    --cc=zhuangshengen@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox