linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] cfq-iosched: Fair cross-group preemption
@ 2011-03-22  1:10 Chad Talbott
  2011-03-22  1:10 ` [PATCH 1/3] cfq-iosched: Fair cross-group preemption (interface and documentation) Chad Talbott
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Chad Talbott @ 2011-03-22  1:10 UTC (permalink / raw)
  To: jaxboe, vgoyal; +Cc: linux-kernel, mrubin, teravest, Chad Talbott

This patchset introduces fair cross-group preemption.  Right now, we
don't have strict isolation between processes in different cgroups.
For example: currently an RT ioprio thread in one group can preempt a
BE ioprio thread in another group.  We would like to have an
application specify the relative priorities of its threads, but still
allow strict isolation between applications.

With this patch series, we can configure an entire cgroup as needing
low-latency service.  Then that group will be able to preempt another
group.  To prevent a runaway application from starving other
applications, we allow this preemption only until it has exceeded its
fair share (as specified by its relative weight).  So a rate-limited,
but latency sensative application (like streaming audio or video) can
get front-of-the-line service without fear of it hogging a whole
disk's IO.

Note that this series is targeted to shallow-queue devices (e.g. a
single spinning disk).  Without hardware support, it is much more
difficult to provide low-latency on a device with a deep request
queue.

The following bash script demonstrates the feature:

cd /dev/cgroup
mkdir c1 c2

(
    echo '8:16 900' > c1/blkio.weight_device
    echo '8:16 2' > c1/blkio.class
    echo $BASHPID > c1/tasks
    dd if=/dev/sdb of=/dev/null bs=1M iflag=direct
) & 
(
    echo '8:16 100' > c2/blkio.weight_device
    echo '8:16 1' > c2/blkio.class
    echo $BASHPID > c2/tasks
    while : ; do dd if=/dev/sdb of=/dev/null bs=1M count=1 iflag=direct; sleep .1 ; done
) &
sleep 10
kill %1 %2

grep 8:16 c?/blkio*
# end

Since the c2 reader is "well behaved" and only reads 10MB/s, it will
be able to consistenly preempt c1, and therefore see low latency for
its requests.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-03-28 17:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-22  1:10 [PATCH 0/3] cfq-iosched: Fair cross-group preemption Chad Talbott
2011-03-22  1:10 ` [PATCH 1/3] cfq-iosched: Fair cross-group preemption (interface and documentation) Chad Talbott
2011-03-22 10:03   ` Gui Jianfeng
2011-03-22 18:07     ` Chad Talbott
2011-03-22  1:10 ` [PATCH 2/3] cfq-iosched: Fair cross-group preemption (implementation) Chad Talbott
2011-03-22  1:10 ` [PATCH 3/3] cfq-iosched: Fair cross-group preemption (stats) Chad Talbott
2011-03-22 15:09 ` [PATCH 0/3] cfq-iosched: Fair cross-group preemption Vivek Goyal
2011-03-22 17:39   ` Chad Talbott
2011-03-22 18:12     ` Vivek Goyal
2011-03-22 23:46       ` Chad Talbott
2011-03-23  1:43         ` Vivek Goyal
2011-03-23 20:10       ` Chad Talbott
2011-03-23 20:41         ` Vivek Goyal
2011-03-24 21:47           ` Chad Talbott
2011-03-25  5:43             ` Gui Jianfeng
2011-03-25 21:32             ` Vivek Goyal
2011-03-25 23:53               ` Chad Talbott
2011-03-28 13:15                 ` Vivek Goyal
2011-03-28 16:59                   ` Chad Talbott
2011-03-28 17:24                     ` Vivek Goyal
2011-03-28 13:17                 ` Vivek Goyal
2011-03-28 17:02                   ` Chad Talbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).