All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>,
	"jonathan.lemon@gmail.com" <jonathan.lemon@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kernel-team@fb.com" <kernel-team@fb.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"ilias.apalodimas@linaro.org" <ilias.apalodimas@linaro.org>,
	Li RongQing <lirongqing@baidu.com>
Subject: Re: [PATCH] page_pool: use irqsave/irqrestore to protect ring access.
Date: Tue, 10 Mar 2020 14:09:51 -0700	[thread overview]
Message-ID: <20200310140951.64a3a7dc@kicinski-fedora-PC1C0HJN> (raw)
In-Reply-To: <20200310110412.66b60677@carbon>

On Tue, 10 Mar 2020 11:04:12 +0100 Jesper Dangaard Brouer wrote:
> On Tue, 10 Mar 2020 02:30:34 +0000
> Saeed Mahameed <saeedm@mellanox.com> wrote:
> > On Mon, 2020-03-09 at 17:55 -0700, David Miller wrote:  
> > > From: Jonathan Lemon <jonathan.lemon@gmail.com>
> > > Date: Mon, 9 Mar 2020 12:49:29 -0700
> > >     
> > > > netpoll may be called from IRQ context, which may access the
> > > > page pool ring.  The current _bh variants do not provide sufficient
> > > > protection, so use irqsave/restore instead.
> > > > 
> > > > Error observed on a modified mlx4 driver, but the code path exists
> > > > for any driver which calls page_pool_recycle from napi poll.  
> 
> Netpoll calls into drivers are problematic, nasty and annoying. Drivers
> usually catch netpoll calls via seeing NAPI budget is zero, and handle
> the situation inside the driver e.g.[1][2]. (even napi_consume_skb
> catch it this way).

I'm probably just repeating what you said, but would it be reasonable
to expect page_pool users to special-case XDP rings to not be cleaned?
netpoll has no use for them.

Perhaps that would not solve the issue for those funky drivers which
use the same rings for both XDP and the stack. Sigh. Do we care about
them?

  parent reply	other threads:[~2020-03-10 21:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 19:49 [PATCH] page_pool: use irqsave/irqrestore to protect ring access Jonathan Lemon
2020-03-10  0:55 ` David Miller
2020-03-10  2:30   ` Saeed Mahameed
2020-03-10 10:04     ` Jesper Dangaard Brouer
2020-03-10 17:52       ` Jonathan Lemon
2020-03-10 21:09       ` Jakub Kicinski [this message]
2020-03-10 23:53         ` Saeed Mahameed
2020-03-10 17:07     ` Jonathan Lemon
2020-03-10 23:34       ` Saeed Mahameed
2020-03-10 16:52   ` Jonathan Lemon

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=20200310140951.64a3a7dc@kicinski-fedora-PC1C0HJN \
    --to=kuba@kernel.org \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jonathan.lemon@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=lirongqing@baidu.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.