lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZfDTxhn34fihYQ_o@slm.duckdns.org>
Date: Tue, 12 Mar 2024 12:14:30 -1000
From: Tejun Heo <tj@...nel.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Jakub Kicinski <kuba@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Johannes Thumshirn <johannes.thumshirn@....com>,
	davem@...emloft.net, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, pabeni@...hat.com,
	bpf@...r.kernel.org
Subject: Re: [GIT PULL] Networking for v6.9

Hello,

On Tue, Mar 12, 2024 at 04:02:08PM -0600, Jens Axboe wrote:
> diff --git a/block/blk.h b/block/blk.h
> index a19b7b42e650..5cac4e29ae17 100644
> --- a/block/blk.h
> +++ b/block/blk.h
> @@ -534,7 +534,7 @@ static inline u64 blk_time_get_ns(void)
>  {
>  	struct blk_plug *plug = current->plug;
>  
> -	if (!plug)
> +	if (!plug || !in_task())
>  		return ktime_get_ns();

Late to the party but I think the following is what iocost is doing:

1. A cgroup overspends and needs to wait before issuing further IOs. It
   takes the current time, add the duratoin that it'd need to wait to issue
   further IOs and then schedules the hrtimer.

2. The timer triggers and runs iocg_waitq_timer_fn() which takes the current
   time and calculates its current budget (which gets replenished as time
   passes). If the pending IOs fit in the current budget, it issues them. If
   there are still pending IOs, it calculates the next timer wakeup point as
   the read current time + the time needed to resume IO processing.

3. If the read current time is sufficiently in the past, the hrtimer
   scheduled in #2 would expire immediately and if it still reads the same
   cached current time, the calculated budget would be zero. It won't be
   able to issue any more IOs and will schedule the hrtimer on the same
   exact expire time as before, falling into an infinite loop.

So, whatever that can feed actual time to iocg_wait_timer_fn() should fix
the issue.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ