> Il giorno 25 dic 2017, alle ore 03:44, xuejiufei <xuejiufei@xxxxxxxxx> ha scritto: > > Hi all, > > Cgroup writeback is supported since v4.2. I found there exists a > problem in the following case. > > A cgroup may send both buffer and direct/sync IOs. The foreground > thread will be stalled when periodic writeback IOs is flushed because > the service queue already has a plenty of writeback IOs, then > foreground IOs should be enqueued with its FIFO policy. > > I wonder if we can distinguish foreground and background IOs in block > throttle to fix the above problem. > > Any suggestion are always appreciated. > Hi, to address similar issues, I have just sent a patch [1] for the BFQ I/O scheduler. If you want to give it a try, it might solve, or at least mitigate, your problem (the patch does not involve groups, though, at least for the moment). There are still pending patches related to the low_latency mode of BFQ, so I suggest you to try with low_latency disabled, i.e., as root: echo bfq > /sys/block/<your-device>/queue/scheduler echo 0 > /sys/block/<your-device>/queue/iosched/low_latency For your possible convenience, I have attached the patch, gzipped, to this email too. Thanks, Paolo [1] https://www.spinics.net/lists/kernel/msg2684463.html
Attachment:
0001-block-bfq-limit-tags-for-writes-and-async-I-O.patch.gz
Description: GNU Zip compressed data
> > Thanks, > Jiufei