Re: [PATCH] io_uring/fdinfo: add timeout_list to fdinfo

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

 



On 8/11/24 8:00 PM, Ruyi Zhang wrote:
> io_uring fdinfo contains most of the runtime information,
> which is helpful for debugging io_uring applications;
> However, there is currently a lack of timeout-related
> information, and this patch adds timeout_list information.

Please wrap this at 72 chars, lines are too short right now.

> @@ -219,9 +221,19 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *file)
>  
>  		seq_printf(m, "  user_data=%llu, res=%d, flags=%x\n",
>  			   cqe->user_data, cqe->res, cqe->flags);
> -
>  	}
> -
>  	spin_unlock(&ctx->completion_lock);

Some unrelated whitespace changes here?

> +
> +	seq_puts(m, "TimeoutList:\n");
> +	spin_lock(&ctx->timeout_lock);
> +	list_for_each_entry(timeout, &ctx->timeout_list, list) {
> +		struct io_kiocb *req = cmd_to_io_kiocb(timeout);
> +		struct io_timeout_data *data = req->async_data;
> +
> +		seq_printf(m, "  off=%d, target_seq=%d, repeats=%x,  ts.tv_sec=%lld, ts.tv_nsec=%ld\n",
> +			   timeout->off, timeout->target_seq, timeout->repeats,
> +			   data->ts.tv_sec, data->ts.tv_nsec);
> +	}
> +	spin_unlock(&ctx->timeout_lock);

That seq_printf() line is way too long, please wrap like what is done
for the overflow printing above.

Outside of that, please also rebase on the for-6.12/io_uring branch, as
this one would not apply there.

Thanks!

-- 
Jens Axboe





[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