Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-11 Thread David Miller
From: Sunil Kovvuri Date: Fri, 11 Mar 2016 22:34:19 +0530 > On Fri, Mar 11, 2016 at 1:18 AM, David Miller wrote: >> From: Sunil Kovvuri >> Date: Thu, 10 Mar 2016 23:57:48 +0530 >> >>> Difference between NIU driver and this patch is there it's >>> calculate split count, increment page count and

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-11 Thread Sunil Kovvuri
On Fri, Mar 11, 2016 at 1:18 AM, David Miller wrote: > From: Sunil Kovvuri > Date: Thu, 10 Mar 2016 23:57:48 +0530 > >> Difference between NIU driver and this patch is there it's >> calculate split count, increment page count and then divide page into >> buffers. Here it's divide page into buffer

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-10 Thread David Miller
From: Sunil Kovvuri Date: Thu, 10 Mar 2016 23:57:48 +0530 > Difference between NIU driver and this patch is there it's > calculate split count, increment page count and then divide page into > buffers. Here it's divide page into buffers, have a counter which increments > at every split and then a

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-10 Thread Sunil Kovvuri
> > So calculate the modulus on the page split count and optimize the > increment ahead of time when possible, and for the sub page split > pieces do it one at a time. > Patch does almost the same with a negligible overhead of a counter for page->_count increment at a later time but still before HW

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-10 Thread David Miller
From: Sunil Kovvuri Date: Thu, 10 Mar 2016 16:13:28 +0530 > Hi David, > > >>> So if you know ahead of time how the page will be split up, just >>> calculate that when you get the page and increment the page count >>> appropriately. >>> >>> That's what we do in the NIU driver. >> >> Thanks for t

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-10 Thread Sunil Kovvuri
Hi David, >> So if you know ahead of time how the page will be split up, just >> calculate that when you get the page and increment the page count >> appropriately. >> >> That's what we do in the NIU driver. > > Thanks for the suggestion, will check and get back. > I looked at the NIU driver and

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-07 Thread Sunil Kovvuri
On Mon, Mar 7, 2016 at 10:34 PM, David Miller wrote: > From: Sunil Kovvuri > Date: Mon, 7 Mar 2016 22:28:39 +0530 > >> Hi David, >> you create a window of time during which the consumer can release the page and prematurely free it. >> Okay, but here the consumer i.e HW is notified only

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-07 Thread David Miller
From: Sunil Kovvuri Date: Mon, 7 Mar 2016 22:28:39 +0530 > Hi David, > >>> you create a window of time during which the consumer >>> can release the page and prematurely free it. > Okay, but here the consumer i.e HW is notified only after page count > is incremented. > For example if you check '

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-07 Thread Sunil Kovvuri
Hi David, >> you create a window of time during which the consumer >> can release the page and prematurely free it. Okay, but here the consumer i.e HW is notified only after page count is incremented. For example if you check 'nicvf_refill_rbdr' fn() only after receive buffer ring is refilled with

Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-07 Thread David Miller
From: sunil.kovv...@gmail.com Date: Mon, 7 Mar 2016 13:05:56 +0530 > From: Sunil Goutham > > Instead of calling get_page() for every receive buffer carved out > of page, set page's usage count at the end, to reduce no of atomic > calls. > > Signed-off-by: Sunil Goutham > --- > drivers/net/et

[PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk

2016-03-06 Thread sunil . kovvuri
From: Sunil Goutham Instead of calling get_page() for every receive buffer carved out of page, set page's usage count at the end, to reduce no of atomic calls. Signed-off-by: Sunil Goutham --- drivers/net/ethernet/cavium/thunder/nic.h |1 + drivers/net/ethernet/cavium/thunder/nicv