Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-03-01 Thread Max Gurtovoy
On 2/28/2018 8:55 PM, Doug Ledford wrote: On Wed, 2018-02-28 at 11:50 +0200, Max Gurtovoy wrote: On 2/28/2018 2:21 AM, Bart Van Assche wrote: On 02/27/18 14:15, Max Gurtovoy wrote: -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc) +static int

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-03-01 Thread Max Gurtovoy
On 2/28/2018 8:55 PM, Doug Ledford wrote: On Wed, 2018-02-28 at 11:50 +0200, Max Gurtovoy wrote: On 2/28/2018 2:21 AM, Bart Van Assche wrote: On 02/27/18 14:15, Max Gurtovoy wrote: -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc) +static int

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-28 Thread Doug Ledford
On Wed, 2018-02-28 at 11:50 +0200, Max Gurtovoy wrote: > > On 2/28/2018 2:21 AM, Bart Van Assche wrote: > > On 02/27/18 14:15, Max Gurtovoy wrote: > > > -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc > > > *poll_wc) > > > +static int __ib_process_cq(struct ib_cq *cq, int

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-28 Thread Doug Ledford
On Wed, 2018-02-28 at 11:50 +0200, Max Gurtovoy wrote: > > On 2/28/2018 2:21 AM, Bart Van Assche wrote: > > On 02/27/18 14:15, Max Gurtovoy wrote: > > > -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc > > > *poll_wc) > > > +static int __ib_process_cq(struct ib_cq *cq, int

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-28 Thread Max Gurtovoy
On 2/28/2018 2:21 AM, Bart Van Assche wrote: On 02/27/18 14:15, Max Gurtovoy wrote: -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc) +static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc, +  int batch)   { -   

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-28 Thread Max Gurtovoy
On 2/28/2018 2:21 AM, Bart Van Assche wrote: On 02/27/18 14:15, Max Gurtovoy wrote: -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc) +static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc, +  int batch)   { -   

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-27 Thread Bart Van Assche
On 02/27/18 14:15, Max Gurtovoy wrote: -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc) +static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc, +  int batch)  { -   int i, n, completed = 0; -   struct

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-27 Thread Bart Van Assche
On 02/27/18 14:15, Max Gurtovoy wrote: -static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc) +static int __ib_process_cq(struct ib_cq *cq, int budget, struct ib_wc *poll_wc, +  int batch)  { -   int i, n, completed = 0; -   struct

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-27 Thread Max Gurtovoy
On 2/28/2018 12:09 AM, Jason Gunthorpe wrote: On Thu, Feb 22, 2018 at 05:39:09PM +0200, Sagi Grimberg wrote: The only reason why I added this array on-stack was to allow consumers that did not use ib_alloc_cq api to call it, but that seems like a wrong decision when thinking it over again

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-27 Thread Max Gurtovoy
On 2/28/2018 12:09 AM, Jason Gunthorpe wrote: On Thu, Feb 22, 2018 at 05:39:09PM +0200, Sagi Grimberg wrote: The only reason why I added this array on-stack was to allow consumers that did not use ib_alloc_cq api to call it, but that seems like a wrong decision when thinking it over again

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-27 Thread Jason Gunthorpe
On Thu, Feb 22, 2018 at 05:39:09PM +0200, Sagi Grimberg wrote: > > >>The only reason why I added this array on-stack was to allow consumers > >>that did not use ib_alloc_cq api to call it, but that seems like a > >>wrong decision when thinking it over again (as probably these users > >>did not

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-27 Thread Jason Gunthorpe
On Thu, Feb 22, 2018 at 05:39:09PM +0200, Sagi Grimberg wrote: > > >>The only reason why I added this array on-stack was to allow consumers > >>that did not use ib_alloc_cq api to call it, but that seems like a > >>wrong decision when thinking it over again (as probably these users > >>did not

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-22 Thread Sagi Grimberg
The only reason why I added this array on-stack was to allow consumers that did not use ib_alloc_cq api to call it, but that seems like a wrong decision when thinking it over again (as probably these users did not set the wr_cqe correctly). How about we make ib_process_cq_direct use the cq wc

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-22 Thread Sagi Grimberg
The only reason why I added this array on-stack was to allow consumers that did not use ib_alloc_cq api to call it, but that seems like a wrong decision when thinking it over again (as probably these users did not set the wr_cqe correctly). How about we make ib_process_cq_direct use the cq wc

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Chuck Lever
> On Feb 21, 2018, at 8:44 AM, Sagi Grimberg wrote: > > >>> On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH 16 +#define IB_POLL_BATCH

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Chuck Lever
> On Feb 21, 2018, at 8:44 AM, Sagi Grimberg wrote: > > >>> On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH 16 +#define IB_POLL_BATCH 8 >>> >>>

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Max Gurtovoy
On 2/21/2018 3:44 PM, Sagi Grimberg wrote: On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH    16 +#define IB_POLL_BATCH    8 The purpose of batch polling is to minimize contention on

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Max Gurtovoy
On 2/21/2018 3:44 PM, Sagi Grimberg wrote: On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH    16 +#define IB_POLL_BATCH    8 The purpose of batch polling is to minimize contention on

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Sagi Grimberg
On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH 16 +#define IB_POLL_BATCH 8 The purpose of batch polling is to minimize contention on the cq spinlock. Reducing the

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Sagi Grimberg
On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH 16 +#define IB_POLL_BATCH 8 The purpose of batch polling is to minimize contention on the cq spinlock. Reducing the

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Max Gurtovoy
On 2/20/2018 11:47 PM, Chuck Lever wrote: On Feb 20, 2018, at 4:14 PM, Bart Van Assche wrote: On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH 16 +#define

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-21 Thread Max Gurtovoy
On 2/20/2018 11:47 PM, Chuck Lever wrote: On Feb 20, 2018, at 4:14 PM, Bart Van Assche wrote: On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: /* # of WCs to poll for with a single call to ib_poll_cq */ -#define IB_POLL_BATCH 16 +#define IB_POLL_BATCH

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Arnd Bergmann
On Tue, Feb 20, 2018 at 10:14 PM, Parav Pandit wrote: > Hi Arnd Bergmann, > >> -Original Message- >> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- >> ow...@vger.kernel.org] On Behalf Of Arnd Bergmann >> Sent: Tuesday, February 20, 2018 2:59 PM >> To: Doug

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Arnd Bergmann
On Tue, Feb 20, 2018 at 10:14 PM, Parav Pandit wrote: > Hi Arnd Bergmann, > >> -Original Message- >> From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- >> ow...@vger.kernel.org] On Behalf Of Arnd Bergmann >> Sent: Tuesday, February 20, 2018 2:59 PM >> To: Doug Ledford ; Jason

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Chuck Lever
> On Feb 20, 2018, at 4:14 PM, Bart Van Assche wrote: > > On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: >> /* # of WCs to poll for with a single call to ib_poll_cq */ >> -#define IB_POLL_BATCH 16 >> +#define IB_POLL_BATCH

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Chuck Lever
> On Feb 20, 2018, at 4:14 PM, Bart Van Assche wrote: > > On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: >> /* # of WCs to poll for with a single call to ib_poll_cq */ >> -#define IB_POLL_BATCH 16 >> +#define IB_POLL_BATCH 8 > > The purpose

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Bart Van Assche
On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: > /* # of WCs to poll for with a single call to ib_poll_cq */ > -#define IB_POLL_BATCH16 > +#define IB_POLL_BATCH8 The purpose of batch polling is to minimize contention on the cq spinlock.

Re: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Bart Van Assche
On Tue, 2018-02-20 at 21:59 +0100, Arnd Bergmann wrote: > /* # of WCs to poll for with a single call to ib_poll_cq */ > -#define IB_POLL_BATCH16 > +#define IB_POLL_BATCH8 The purpose of batch polling is to minimize contention on the cq spinlock.

RE: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Parav Pandit
Hi Arnd Bergmann, > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Arnd Bergmann > Sent: Tuesday, February 20, 2018 2:59 PM > To: Doug Ledford ; Jason Gunthorpe > Cc: Arnd Bergmann

RE: [PATCH] RDMA/core: reduce IB_POLL_BATCH constant

2018-02-20 Thread Parav Pandit
Hi Arnd Bergmann, > -Original Message- > From: linux-rdma-ow...@vger.kernel.org [mailto:linux-rdma- > ow...@vger.kernel.org] On Behalf Of Arnd Bergmann > Sent: Tuesday, February 20, 2018 2:59 PM > To: Doug Ledford ; Jason Gunthorpe > Cc: Arnd Bergmann ; Leon Romanovsky > ; Sagi Grimberg