From: Olivier Langlois <[email protected]>
To: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
[email protected]
Subject: Re: [PATCH v2 3/3] io_uring/napi: add static napi tracking strategy
Date: Tue, 17 Sep 2024 10:58:57 -0400 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On Mon, 2024-09-16 at 21:09 -0600, Jens Axboe wrote:
> On 9/16/24 1:20 PM, Olivier Langlois wrote:
> >
> > +static void napi_show_fdinfo(struct io_ring_ctx *ctx, struct
> > seq_file *m)
> > +{
> > + switch (READ_ONCE(ctx->napi_track_mode)) {
> > + case IO_URING_NAPI_TRACKING_INACTIVE:
> > + seq_puts(m, "NAPI:\tdisabled\n");
> > + break;
> > + case IO_URING_NAPI_TRACKING_DYNAMIC:
> > + common_tracking_show_fdinfo(ctx, m, "dynamic");
> > + break;
> > + case IO_URING_NAPI_TRACKING_STATIC:
> > + common_tracking_show_fdinfo(ctx, m, "static");
> > + break;
> > + }
> > +}
>
> Maybe add an "unknown" default entry here, just in case it ever
> changes
> and someone forgets to update the fdinfo code.
ok
>
> > +static inline bool __io_napi_do_busy_loop(struct io_ring_ctx *ctx,
> > + void *loop_end_arg)
> > +{
> > + if (READ_ONCE(ctx->napi_track_mode) ==
> > IO_URING_NAPI_TRACKING_STATIC)
> > + return static_tracking_do_busy_loop(ctx,
> > loop_end_arg);
> > + else
> > + return dynamic_tracking_do_busy_loop(ctx,
> > loop_end_arg);
> > +}
> > +
>
> Minor style nit:
>
> if (READ_ONCE(ctx->napi_track_mode) ==
> IO_URING_NAPI_TRACKING_STATIC)
> return static_tracking_do_busy_loop(ctx,
> loop_end_arg);
> return dynamic_tracking_do_busy_loop(ctx, loop_end_arg);
>
> would do.
>
will do.
Also, after looking at Pavel work at
https://github.com/isilence/linux/commits/manual-napi/
I have found a way to improve patch #2 of this serie...
v3 is going to be sweet!
prev parent reply other threads:[~2024-09-17 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 19:19 [PATCH v2 0/3] napi tracking strategy Olivier Langlois
2024-09-16 19:20 ` [PATCH v2 1/3] io_uring/napi: protect concurrent io_napi_entry timeout accesses Olivier Langlois
2024-09-16 19:20 ` [PATCH v2 2/3] io_uring/napi: fix io_napi_entry RCU accesses Olivier Langlois
2024-09-16 19:20 ` [PATCH v2 3/3] io_uring/napi: add static napi tracking strategy Olivier Langlois
2024-09-17 3:09 ` Jens Axboe
2024-09-17 14:58 ` Olivier Langlois [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=80e6166b162521d9ef1ac32d547f1209f2bc505e.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