From: Jesper Dangaard Brouer <brouer@redhat.com>
To: "Jonathan Lemon" <jonathan.lemon@gmail.com>
Cc: netdev@vger.kernel.org, brouer@redhat.com
Subject: Re: [PATCH net-next] net: Don't return pfmemalloc pages to the page pool.
Date: Fri, 21 Dec 2018 15:42:17 +0100 [thread overview]
Message-ID: <20181221154217.0ed35c62@redhat.com> (raw)
In-Reply-To: <A7AC297F-066C-4AB0-81F7-D40BFC74BF20@gmail.com>
On Thu, 20 Dec 2018 14:11:35 -0800 "Jonathan Lemon" <jonathan.lemon@gmail.com> wrote:
> On 20 Dec 2018, at 5:03, Jesper Dangaard Brouer wrote:
>
[...]
> > I don't like adding this in the hot-path. Instead we could move this
> > to the page alloc slow-path, and reject allocating pages with
> > pgmemalloc in the first place.
>
> No real objection to that - but then why bother with pfmemalloc? If the
> driver can't obtain pages for emergency use, then they might as well
> not exist.
I've changed my mind. There is an interesting opportunity in allowing
pfmemalloc-pages to be used by the driver. (So, I'm saying I'm okay
with adding this to the hot-path. And this hopefully doesn't affect
performance (too much), as page_is_pfmemalloc() is reading from the same
cache-line).
The opportunity is that XDP can handle/operate at wirespeed. We could
allow XDP to get this info (simply via helper call, so we don't affect
users not using this). When seeing PFMEMALLOC, which indicate a bad
situation is occurring really soon, then we can react at a earlier
stage (spending less cycles on reacting).
One idea is to reduce-size of XDP frame, and use XDP_TX to send-back
the frame to the sender as a congestion/drop notification, which inform
sender to slowdown. If this is incast happening within the same
data-center then the XDP_TX-feedback can reach the sender really fast.
One example of such an approach: https://youtu.be/BO0QhaxBRr0
This is one example of how XDP can allow us to do stuff that was not
possible before...
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
prev parent reply other threads:[~2018-12-21 14:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 20:06 [PATCH net-next] net: Don't return pfmemalloc pages to the page pool Jonathan Lemon
2018-12-20 13:03 ` Jesper Dangaard Brouer
2018-12-20 22:11 ` Jonathan Lemon
2018-12-20 23:41 ` Saeed Mahameed
2018-12-21 0:56 ` Jonathan Lemon
2018-12-21 2:13 ` Saeed Mahameed
2018-12-21 2:26 ` Saeed Mahameed
2018-12-21 14:42 ` Jesper Dangaard Brouer [this message]
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=20181221154217.0ed35c62@redhat.com \
--to=brouer@redhat.com \
--cc=jonathan.lemon@gmail.com \
--cc=netdev@vger.kernel.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).