Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1354999
| From | Sunil Kovvuri <sunil.kovvuri@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk |
| Date | 2016-03-10 11:50 +0100 |
| Message-ID | <rb6kh-5OL-13@gated-at.bofh.it> (permalink) |
| References | <r9XVL-8i3-9@gated-at.bofh.it> <ra630-57L-19@gated-at.bofh.it> <ra6FI-5oi-11@gated-at.bofh.it> <ra6Po-5Ig-15@gated-at.bofh.it> <ra78K-5Qh-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 in fn() niu_rbr_refill()
static void niu_rbr_refill(struct niu *np, struct rx_ring_info *rp, gfp_t mask)
{
int index = rp->rbr_index;
rp->rbr_pending++;
if ((rp->rbr_pending % rp->rbr_blocks_per_page) == 0) {
Here it's been checked whether rbr_pending is a exact multiple of page
split count.
And hence updating page count based on fixed calculation is right.
On my platform driver receives a interrupt when free buffer count
falls below a threshold
and by the time SW reads count of buffers to be refilled it can be any
number i.e
may or may not be a exact multiple of page split count.
When interface is being brought down and while freeing unused receive
buffers one
page's count will go wrong and hence will disappear completely. In the
patch i am
updating page->count before issuing doorbell to HW irrespective of
full page utilised
or not. So there is no mismatch while doing put_page(unused buffer).
Thanks,
Sunil.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] net: thunderx: Performance enhancement changes sunil.kovvuri@gmail.com - 2016-03-07 08:40 +0100
[PATCH 2/2] net: thunderx: Adjust nicvf structure to reduce cache misses sunil.kovvuri@gmail.com - 2016-03-07 08:40 +0100
[PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk sunil.kovvuri@gmail.com - 2016-03-07 08:40 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk David Miller <davem@davemloft.net> - 2016-03-07 17:20 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2016-03-07 18:00 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk David Miller <davem@davemloft.net> - 2016-03-07 18:10 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2016-03-07 18:30 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2016-03-10 11:50 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk David Miller <davem@davemloft.net> - 2016-03-10 18:50 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2016-03-10 19:30 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk David Miller <davem@davemloft.net> - 2016-03-10 20:50 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk Sunil Kovvuri <sunil.kovvuri@gmail.com> - 2016-03-11 18:10 +0100
Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk David Miller <davem@davemloft.net> - 2016-03-11 18:30 +0100
csiph-web