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:	Wed, 18 Jan 2012 17:11:18 -0800
From:	Tejun Heo <tj@...nel.org>
To:	axboe@...nel.dk, vgoyal@...hat.com
Cc:	ctalbott@...gle.com, rni@...gle.com, linux-kernel@...r.kernel.org
Subject: [PATCHSET] blkcg: kill policy node and blkg->dev

Hello, guys.

This is the first of three (maybe four) patchset series trying to
cleanup block cgroup API.

<rant>
The current state of blkcg API is extremely sad.  From the first
glance, it looks as though it's built with some modular design in mind
with policy registration and all but the whole thing is one giant
unholy spaghetti mess which renders the phrase "layer violation"
meaningless as it's unclear whether it exists at all from the
beginning.

I've been looking at the code for three weeks now.  I've done a lot of
code cleanups all around the kernel and seen a lot of scary/messy
stuff, but blkcg takes the worst spot without any shred of doubt.  We
really shouldn't have code like this in the kernel.
</rant>

Alright, I just needed to get that out of my system.  We all do a lot
of horrible things.  I know I've been and still am, so let's just
concentrate on getting it better from here on.

blk-cgroup, blk-throttle and cfq-iosched are pretty tightly tangled
and untangling requires seemingly unrelated changes and addition of
some transitional stuff.  Some are in this patchset but they'll be
more prominent in the second patchset.  With that said, this patchset
concentrates on removing blkio_policy_node and blkio_group->dev.

blkio_policy_node carries configuration per cgroup-request_queue
association separately from the matching blkio_group.  The goal seems
to be allowing configuration of missing devices and retaining
configuration across hot unplug/plug cycles.  Such behavior is very
different from existing conventions, misleading and unnecessary.  This
patchset moves configuration to blkio_group and removes
blkio_policy_node.

blkg->dev removal is much simpler.  blkg->dev is used to print out
device number when printing out per-device configurations or
statistics.  The device name can be easily determined by following the
associated request_queue from blkg instead.

This patchset contains the following 12 patches.

  0001-blkcg-obtaining-blkg-should-be-enclosed-inside-rcu_r.patch
  0002-cfq-don-t-register-propio-policy-if-CONFIG_CFQ_GROUP.patch
  0003-elevator-clear-auxiliary-data-earlier-during-elevato.patch
  0004-elevator-make-elevator_init_fn-return-0-errno.patch
  0005-blkcg-update-blkg-get-functions-take-blkio_cgroup-as.patch
  0006-blkcg-use-q-and-plid-instead-of-opaque-void-for-blki.patch
  0007-blkcg-add-blkio_policy-array-and-allow-one-policy-pe.patch
  0008-blkcg-use-the-usual-get-blkg-path-for-root-blkio_gro.patch
  0009-blkcg-factor-out-blkio_group-creation.patch
  0010-blkcg-don-t-allow-or-retain-configuration-of-missing.patch
  0011-blkcg-kill-blkio_policy_node.patch
  0012-blkcg-kill-the-mind-bending-blkg-dev.patch

0001 is rcu locking fix.  Applying to mainline as fix is probably a
good idea.

0002 is misc cfq prep.

0003-0004 update elevator.  Elevator switch behavior is changed once
more to simplify elevator init/exit paths.

0005-0009 prepare blkcg for further changes.  Two policy operations
and new one policy per policy ID restriction are added.  All will be
removed as cleanup progresses further.

0010-0011 move blkcg configuration into blkg and drop policy node.

0012 drops blkg->dev.

This patchset is on top of linus#master (4ba3069fea "Merge branch
'for-next' of git://../nab/target-pending") and available in the
following git branch.

  git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git blkcg-kill-pn

Thanks.

 block/blk-cgroup.c       |  635 +++++++++++++++--------------------------------
 block/blk-cgroup.h       |   91 ++----
 block/blk-core.c         |    6 
 block/blk-throttle.c     |  259 +++++--------------
 block/cfq-iosched.c      |  237 +++++------------
 block/cfq.h              |    7 
 block/deadline-iosched.c |    8 
 block/elevator.c         |   90 +++---
 block/noop-iosched.c     |    8 
 include/linux/elevator.h |    2 
 10 files changed, 436 insertions(+), 907 deletions(-)

--
tejun
--
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