Re: [PATCH v2 19/20] IB/rdmavt, IB/qib, IB/hfi1: Make percpu refcount optional for user MRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 06, 2017 at 09:00:12AM -0400, Dennis Dalessandro wrote:
> On 04/06/2017 08:37 AM, Leon Romanovsky wrote:
> > On Thu, Apr 06, 2017 at 07:45:16AM -0400, Dennis Dalessandro wrote:
> > > On 04/06/2017 03:49 AM, Leon Romanovsky wrote:
> > > > On Wed, Apr 05, 2017 at 08:09:16PM +0000, Marciniszyn, Mike wrote:
> > > > >  > Is there a another way we should be looking at for setting things like this?
> > > > > >
> > > > > > Use vendor channel interface to configure your driver.
> > > > > >
> > > > >
> > > > > What is that? configfs or something else?
> > > >
> > > > An immediate answer without digging into your code is Matan's KABI work.
> > > > https://github.com/matanb10/linux/tree/abi-devel-latest
> > >
> > > Until that code is formally accepted and actually in the kernel we can't
> > > base our changes that are ready to go now (for 4.12) on it.
> >
> > And we can't accept module parameters. I already presented my setup,
> > which I know in use by many people. Standalone kernel with everything
> > compiled in, everything runs in read-only small image without distro bloat.
> > it gives very small footprint, very fast execution and system
> > protection.
> >
> > In such case, we'll be required to rebuild whole image to update command
> > line for one module parameter and we will need to do it just for
> > specific application, which is insane.
>
> In the very rare case that if you care more about making mem dereg faster at
> the expense of the data path you would have to do just that. But for the
> vast majority of use cases the default is what you want, keep performance
> benefits to the data path at the cost of memory dereg.

I have very strong feelings that these module parameters won't work in
secured boot environment too.

>
> > I'm glad that you realize now the importance of Matan's work and how it
> > can help overcome your current problems, You (Intel) are invited to help
> > him to make it faster.
>
> This is the same stuff that a year ago was claimed it would only take a
> couple weeks. In my opinion it's still more than one release out. When it's
> done and Linus has accepted it, it's a different story.

I can put money on it, if Doug didn't accept your ioctl patches at the
beginning, we would converge much faster. I have a confidence that Doug
won't put RDMA subsystem in the confrontation with kernel core
development, just because it is easiest/fastest track.

>
> > >
> > > > However, I have an question, how do you ensure that user memory has no
> > > > users without refcounts? Will it be possible to dereg the memory despite
> > > > the fact that there are users?
> > >
> > > Mike can correct me if I'm wrong but it is still refcounted. Just not per
> > > CPU, global if you will.
> >
> > IMHO, global will be always more expensive than percpu, due to locality.
> > However your patch presents different picture. You are claiming that removing
> > percpu_refcnt and leaving global will make work faster. How will it be?
>
> Mike can explain better I'm sure but the gist of it is there is an implicit
> RCU delay waiting for the async per CPU model to quiesce ref counts to zero
> in the de-reg.
>
> So while in the per CPU case, other things can be going on which helps
> packet reception and posting of sends, the benefit to the data path. However
> this comes at a cost to the de-reg.
>
> So in the rare event that you want the de-reg to be faster and are willing
> to take the data path hit, it's better to do it atomically across all CPUs.

Again, it is application hint and not hint to whole kernel as module
parameter was intended.

Thanks

>
> -Denny

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux