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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZuC31sqB6qUd_Gut@slm.duckdns.org>
Date: Tue, 10 Sep 2024 11:19:18 -1000
From: Tejun Heo <tj@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: josef@...icpanda.com, axboe@...nel.dk, cgroups@...r.kernel.org,
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
	yukuai3@...wei.com, yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH for-6.12 2/2] blk-throttle: support prioritized
 processing of metadata

On Tue, Sep 03, 2024 at 09:51:49PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@...wei.com>
> 
> Currently, blk-throttle handle all IO fifo, hence if data IO is
> throttled and then meta IO is dispatched, the meta IO will have to wait
> for the data IO, causing priority inversion problems.
> 
> This patch support to handle metadata first and then pay debt while
> throttling data.
> 
> Test script: use cgroup v1 to throttle root cgroup, then create new
> dir and file while write back is throttled
> 
> test() {
>   mkdir /mnt/test/xxx
>   touch /mnt/test/xxx/1
>   sync /mnt/test/xxx
>   sync /mnt/test/xxx
> }
> 
> mkfs.ext4 -F /dev/nvme0n1 -E lazy_itable_init=0,lazy_journal_init=0
> mount /dev/nvme0n1 /mnt/test
> 
> echo "259:0 $((1024*1024))" > /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
> dd if=/dev/zero of=/mnt/test/foo1 bs=16M count=1 conv=fdatasync status=none &
> sleep 4
> 
> time test
> echo "259:0 0" > /sys/fs/cgroup/blkio/blkio.throttle.write_bps_device
> 
> sleep 1
> umount /dev/nvme0n1
> 
> Test result: time cost for creating new dir and file
> before this patch:  14s
> after this patch:   0.1s
> 
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>

This is a lot simpler than I expected. Great.

 Acked-by: Tejun Heo <tj@...nel.org>

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ