Re: [PATCH v2 3/3] io_uring/napi: add static napi tracking strategy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux