linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: davem@davemloft.net (David Miller)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk
Date: Mon, 07 Mar 2016 12:04:10 -0500 (EST)	[thread overview]
Message-ID: <20160307.120410.1851177945150642006.davem@davemloft.net> (raw)
In-Reply-To: <CA+sq2CewOQGSiRC5m64ioYS36-WO0C5XzykZRZd+OLE1tJ-sSQ@mail.gmail.com>

From: Sunil Kovvuri <sunil.kovvuri@gmail.com>
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 'nicvf_refill_rbdr' fn() only after receive
> buffer ring is
> refilled with buffers, doorbell is issued to hardware to start using
> the new buffers.
> 
> So
> @@ -241,6 +254,8 @@ refill:
>                 new_rb++;
>         }
> 
> +       nicvf_get_page(nic);
> +
> calling 'nicvf_get_page' before issuing doorbell ensures page ref
> count is properly
> set before hw/consumer can use the buffers.

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.

  reply	other threads:[~2016-03-07 17:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  7:35 [PATCH 0/2] net: thunderx: Performance enhancement changes sunil.kovvuri at gmail.com
2016-03-07  7:35 ` [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk sunil.kovvuri at gmail.com
2016-03-07 16:15   ` David Miller
2016-03-07 16:58     ` Sunil Kovvuri
2016-03-07 17:04       ` David Miller [this message]
2016-03-07 17:23         ` Sunil Kovvuri
2016-03-10 10:43           ` Sunil Kovvuri
2016-03-10 17:44             ` David Miller
2016-03-10 18:27               ` Sunil Kovvuri
2016-03-10 19:48                 ` David Miller
2016-03-11 17:04                   ` Sunil Kovvuri
2016-03-11 17:24                     ` David Miller
2016-03-07  7:35 ` [PATCH 2/2] net: thunderx: Adjust nicvf structure to reduce cache misses sunil.kovvuri at gmail.com

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=20160307.120410.1851177945150642006.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.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).