Re: [PATCH 8/8] io_uring: warn when ring exit takes too long

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

 



On 05/03/2021 04:25, Jens Axboe wrote:
> On 3/4/21 6:59 AM, Pavel Begunkov wrote:
>> We use system_unbound_wq to run io_ring_exit_work(), so it's hard to
>> monitor whether removal hang or not. Add WARN_ONCE to catch hangs.
> 
> Minor nit, but I'd just use jiffies for this. Ala:
> 
> unsigned long timeout = jiffies + 60 * HZ;
> 
> if (time_after(jiffies, timeout))
>     complain();
> 
> That's a well known idiom, and we don't need better precision than that.

And also looks much nicer, thanks

-- 
Pavel Begunkov



[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