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-next>] [day] [month] [year] [list]
Date:	Mon, 21 Mar 2011 18:10:42 -0700
From:	Chad Talbott <ctalbott@...gle.com>
To:	jaxboe@...ionio.com, vgoyal@...hat.com
Cc:	linux-kernel@...r.kernel.org, mrubin@...gle.com,
	teravest@...gle.com, Chad Talbott <ctalbott@...gle.com>
Subject: [PATCH 0/3] cfq-iosched: Fair cross-group preemption

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ