From: Olivier Langlois <[email protected]>
To: Hao Xu <[email protected]>, Jens Axboe <[email protected]>,
[email protected]
Subject: Re: napi_busy_poll
Date: Wed, 16 Feb 2022 14:19:26 -0500 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On Wed, 2022-02-16 at 11:12 +0800, Hao Xu wrote:
>
> >
> I read your code, I guess the thing is the sk->napi_id is set from
> skb->napi_id and the latter is set when the net device received some
> packets.
> > With my current knowledge, it makes little sense why busy polling
> > would
> > not be possible with RPS. Also, what exactly is a NAPI device is
> > quite
> > nebulous to me... Looking into the Intel igb driver code, it seems
> > like
> > 1 NAPI device is created for each interrupt vector/Rx buffer of the
> > device.
> AFAIK, yes, each Rx ring has its own NAPI.
> >
> > Bottomline, it seems like I have fallen into a new rabbit hole. It
> > may
> > take me a day or 2 to figure it all... you are welcome to enlight
> > me if
> > you know a thing or 2 about those topics... I am kinda lost right
> > now...
> >
>
My dive into the net/core code has been beneficial!
I have found out that the reason why I did not have napi_id for my
sockets is because I have introduced a local SOCKS proxy into my setup.
By using the loopback device, this is de facto removing NAPI out of the
picture.
After having fixed this issue, I have started to test my code.
The modified io_cqring_wait() code does not work. With a pending recv()
request, the moment napi_busy_loop() is called, the recv() request
fails with an EFAULT error.
I suspect this might be because io_busy_loop_end() is doing something
that is not allowed while inside napi_busy_loop().
The simpler code change inside __io_sq_thread() might work but I still
have to validate.
I'll update later today or tomorrow with the latest result and
discovery!
Greetings,
next prev parent reply other threads:[~2022-02-16 19:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 14:58 napi_busy_poll Olivier Langlois
2022-02-08 17:05 ` napi_busy_poll Jens Axboe
2022-02-09 3:34 ` napi_busy_poll Hao Xu
2022-02-12 19:51 ` napi_busy_poll Olivier Langlois
2022-02-13 18:47 ` napi_busy_poll Jens Axboe
2022-02-14 17:13 ` napi_busy_poll Hao Xu
2022-02-15 8:37 ` napi_busy_poll Olivier Langlois
2022-02-15 18:05 ` napi_busy_poll Olivier Langlois
2022-02-16 3:12 ` napi_busy_poll Hao Xu
2022-02-16 19:19 ` Olivier Langlois [this message]
2022-02-16 12:14 ` napi_busy_poll Hao Xu
2022-02-17 20:28 ` napi_busy_poll Olivier Langlois
2022-02-18 8:06 ` napi_busy_poll Hao Xu
2022-02-19 7:14 ` napi_busy_poll Olivier Langlois
2022-02-21 4:52 ` napi_busy_poll Hao Xu
2022-02-17 23:18 ` napi_busy_poll Olivier Langlois
2022-02-17 23:25 ` napi_busy_poll Jens Axboe
2022-02-18 7:21 ` napi_busy_poll Hao Xu
2022-02-18 5:05 ` napi_busy_poll Olivier Langlois
2022-02-18 7:41 ` napi_busy_poll Hao Xu
2022-02-19 7:02 ` napi_busy_poll Olivier Langlois
2022-02-21 5:03 ` napi_busy_poll Hao Xu
2022-02-25 4:42 ` napi_busy_poll Olivier Langlois
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=e0f54d9aabcfbdf605856608a30b64ad8a8842aa.camel@trillion01.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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