linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Or Gerlitz <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Mitko Haralanov
	<mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Leon Romanovsky <leon-2ukJVAZIZ/Y@public.gmane.org>,
	Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 00/16] IB/hfi1: Add a page pinning cache for PSM sdma
Date: Tue, 22 Mar 2016 07:46:44 -0400	[thread overview]
Message-ID: <20160322114644.GA20139@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <CAJ3xEMg5OPBT63=VV4EKnZUWSHGatDRL0n7O4iBVrN9bMUw5dg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Tue, Mar 22, 2016 at 09:33:55AM +0200, Or Gerlitz wrote:
>On Wed, Mar 16, 2016 at 7:23 PM, Dennis Dalessandro
><dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
>> On Wed, Mar 16, 2016 at 05:53:37PM +0200, Or Gerlitz wrote:
>
>>> The cache comes to amortize the cost of pin/unpin and such, correct? this means
>>> that over longs runs, if there's nice locality of the same process
>>> using the same pages, you pay the register/pin cost once, later use lazy
>>> de-registration/pinning, and only do that
>>> when MMU notifier tells you this is a must, or under some eviction policy.
>
>>> Since the cost is amortized, the system calls over-head should be negligible
>>> (also, the same system call can be used to evict X and register Y), do you
>>> have performance data that shows otherwise?
>
>> I don't personally have the data but will check with some folks here.
>
>Dennis, didn't see a reply from you here...

I have been on out of the office for a few days. I did check into the 
performance aspect here and have been assured there is a performance problem 
with the increased number of system calls. Though I do not have any 
published data to point you to. 

We are particularly worried about the eviction case which is where the 
amortization argument doesn't hold up. If the eviction policy is set to 
evict buffers which have not been used recently in favor of a new buffer 
(which is a very common policy), this happens more often than you realize.  
We do not want any additional cost in this case.

Another reason we do not want this in user space is that it changes the 
semantic of the SDMA transfer call. Normally user space applications don't 
care what needs to be done under the covers to transfer a buffer. The user 
application/library calls into the kernel which takes care of the details, 
including pinning the pages while the underlying hardware pulls the data 
from the buffer. The user application does not (and should not) care about 
that. This is how SDMA transfers work as well.

However, if we move the cache into user space all of that changes. Now user 
space has to start caring about the state of the buffer. The normal SDMA 
transfer request cannot be used as it will, or might, pin/unpin pages it 
shouldn't. The kernel will have to provide effectively two semantically 
different versions of the calls - one which pins/unpins and one which does 
not. This is yet another complication that is being unnecessarily pushed 
into user space.

> Doug, as this is still review discussion in progress, I guess you'll wait 
> with
> finalizing the talks before adding this into your 2nd 4.6 pull request?

I think our position is clear why we do not want to put this in user space.  
Can we? Yes. But just because we could doesn't mean we should. So what is 
your technical reason that makes you feel so strongly this doesn't belong in 
our particular driver? Is there some way this impacts any other RDMA 
drivers, the IB core, or anything else?

-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-03-22 11:46 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08 19:14 [PATCH 00/16] IB/hfi1: Add a page pinning cache for PSM sdma Dennis Dalessandro
     [not found] ` <20160308191210.30542.91885.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2016-03-08 19:14   ` [PATCH 01/16] IB/hfi1: Re-factor MMU notification code Dennis Dalessandro
2016-03-08 19:14   ` [PATCH 02/16] IB/hfi1: Allow MMU function execution in IRQ context Dennis Dalessandro
2016-03-08 19:14   ` [PATCH 03/16] IB/hfi1: Prevent NULL pointer dereference Dennis Dalessandro
2016-03-08 19:14   ` [PATCH 04/16] IB/hfi1: Allow remove MMU callbacks to free nodes Dennis Dalessandro
2016-03-08 19:14   ` [PATCH 05/16] IB/hfi1: Remove the use of add/remove RB function pointers Dennis Dalessandro
2016-03-08 19:14   ` [PATCH 06/16] IB/hfi1: Notify remove MMU/RB callback of calling context Dennis Dalessandro
2016-03-08 19:14   ` [PATCH 07/16] IB/hfi1: Use interval RB trees Dennis Dalessandro
2016-03-08 19:14   ` [PATCH 08/16] IB/hfi1: Add MMU tracing Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 09/16] IB/hfi1: Remove compare callback Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 10/16] IB/hfi1: Add filter callback Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 11/16] IB/hfi1: Adjust last address values for intervals Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 12/16] IB/hfi1: Implement SDMA-side buffer caching Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 13/16] IB/hfi1: Add pin query function Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 14/16] IB/hfi1: Specify mm when releasing pages Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 15/16] IB/hfi1: Switch to using the pin query function Dennis Dalessandro
2016-03-08 19:15   ` [PATCH 16/16] IB/hfi1: Add SDMA cache eviction algorithm Dennis Dalessandro
2016-03-08 20:56   ` [PATCH 00/16] IB/hfi1: Add a page pinning cache for PSM sdma Or Gerlitz
     [not found]     ` <CAJ3xEMj8gz6Xw1bqA677fC8=U2ktLQ6b4W20SeNrztN7u6UKZg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-09  0:21       ` Dennis Dalessandro
     [not found]         ` <20160309002157.GA20105-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-03-09  5:07           ` Leon Romanovsky
     [not found]             ` <20160309050731.GM13396-2ukJVAZIZ/Y@public.gmane.org>
2016-03-09 19:21               ` Dennis Dalessandro
     [not found]                 ` <20160309192109.GB15031-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-03-10  4:56                   ` Leon Romanovsky
     [not found]                     ` <20160310045609.GC1977-2ukJVAZIZ/Y@public.gmane.org>
2016-03-14  7:09                       ` Leon Romanovsky
     [not found]                         ` <20160314070951.GB26456-2ukJVAZIZ/Y@public.gmane.org>
2016-03-14 12:01                           ` Dennis Dalessandro
     [not found]                             ` <20160314120152.GA30838-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-03-14 12:27                               ` Leon Romanovsky
2016-03-14 21:19                               ` Or Gerlitz
     [not found]                                 ` <CAJ3xEMiSgXFT46r0Y7DZGr3mpJFSLrtYrMdz+DbCXDozbMYZRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-15  1:20                                   ` Dennis Dalessandro
     [not found]                                     ` <20160315012049.GA30055-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-03-15  7:03                                       ` Or Gerlitz
     [not found]                                         ` <CAJ3xEMhToYOBMo_nNi2fFpTexUmUqb3zBX7zWWYjCDfPWpWn-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-15 19:37                                           ` Dennis Dalessandro
     [not found]                                             ` <20160315193731.GA20662-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-03-16 15:53                                               ` Or Gerlitz
     [not found]                                                 ` <CAJ3xEMjWxdwM0wQR85_-wHpPhYSWz1W0T8H_nDjnp2JS7G29Qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-16 17:23                                                   ` Dennis Dalessandro
     [not found]                                                     ` <20160316172309.GB26530-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-03-22  7:33                                                       ` Or Gerlitz
     [not found]                                                         ` <CAJ3xEMg5OPBT63=VV4EKnZUWSHGatDRL0n7O4iBVrN9bMUw5dg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-22 11:46                                                           ` Dennis Dalessandro [this message]
2016-03-10  7:11                   ` Or Gerlitz
2016-03-09 14:47           ` Or Gerlitz
     [not found]             ` <CAJ3xEMhcs-6vDzsNk9nJKoNxTWnfaUtDmNHhLp1EPyerjnw2Xg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-09 15:19               ` Dennis Dalessandro

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=20160322114644.GA20139@phlsvsds.ph.intel.com \
    --to=dennis.dalessandro-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=leon-2ukJVAZIZ/Y@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mitko.haralanov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).