Linux Container Development
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org,
	ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 10/10] blkcg: implement per-blkg request allocation
Date: Mon, 4 Jun 2012 16:26:20 -0400	[thread overview]
Message-ID: <20120604202620.GM4458@redhat.com> (raw)
In-Reply-To: <1338793697-10735-11-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On Mon, Jun 04, 2012 at 12:08:17AM -0700, Tejun Heo wrote:
> Currently, request_queue has one request_list to allocate requests
> from regardless of blkcg of the IO being issued.  When the unified
> request pool is used up, cfq proportional IO limits become meaningless
> - whoever grabs the next request being freed wins the race regardless
> of the configured weights.
> 
> This can be easily demonstrated by creating a blkio cgroup w/ very low
> weight, put a program which can issue a lot of random direct IOs there
> and running a sequential IO from a different cgroup.  As soon as the
> request pool is used up, the sequential IO bandwidth crashes.
> 
> This patch implements per-blkg request_list.  Each blkg has its own
> request_list and any IO allocates its request from the matching blkg
> making blkcgs completely isolated in terms of request allocation.
> 
> * Root blkcg uses the request_list embedded in each request_queue,
>   which was renamed to @q->root_rl from @q->rq.  While making blkcg rl
>   handling a bit harier, this enables avoiding most overhead for root
>   blkcg.
> 
> * Queue fullness is properly per request_list but bdi isn't blkcg
>   aware yet, so congestion state currently just follows the root
>   blkcg.  As writeback isn't aware of blkcg yet, this works okay for
>   async congestion but readahead may get the wrong signals.  It's
>   better than blkcg completely collapsing with shared request_list but
>   needs to be improved with future changes.

Hi Tejun,

It might be worth to update Documentation/block/queue-sysfs.txt and update
nr_requests description to reflect that fact that it is now a per queue
per cgroup/group limit and not per queue limit.

Also it will be good to explicitly mention in changelog that after this
patch allowing non-priviliged users to create blkio cgroups is dangerous
as they can create tons of cgroups, doing IO in those cgroups and locking
non-reclaimable kernel memory.

Otherwise this patch and series looks good to me.

Acked-by: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Thanks
Vivek

  parent reply	other threads:[~2012-06-04 20:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04  7:08 [PATCHSET] block: implement per-blkg request allocation Tejun Heo
     [not found] ` <1338793697-10735-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-06-04  7:08   ` [PATCH 01/10] blkcg: __blkg_lookup_create() doesn't need radix preload Tejun Heo
     [not found]     ` <1338793697-10735-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-06-04 18:57       ` Vivek Goyal
2012-06-04  7:08   ` [PATCH 02/10] blkcg: make root blkcg allocation use %GFP_KERNEL Tejun Heo
     [not found]     ` <1338793697-10735-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-06-04 18:57       ` Vivek Goyal
2012-06-04  7:08   ` [PATCH 03/10] mempool: add @gfp_mask to mempool_create_node() Tejun Heo
2012-06-04  7:08   ` [PATCH 04/10] block: drop custom queue draining used by scsi_transport_{iscsi|fc} Tejun Heo
2012-06-04  7:08   ` [PATCH 05/10] block: refactor get_request[_wait]() Tejun Heo
2012-06-04  7:08   ` [PATCH 06/10] block: allocate io_context upfront Tejun Heo
2012-06-04  7:08   ` [PATCH 07/10] blkcg: inline bio_blkcg() and friends Tejun Heo
2012-06-04  7:08   ` [PATCH 08/10] block: add q->nr_rqs[] and move q->rq.elvpriv to q->nr_rqs_elvpriv Tejun Heo
2012-06-04  7:08   ` [PATCH 09/10] block: prepare for multiple request_lists Tejun Heo
2012-06-04  7:08   ` [PATCH 10/10] blkcg: implement per-blkg request allocation Tejun Heo
     [not found]     ` <1338793697-10735-11-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-06-04 20:26       ` Vivek Goyal [this message]
2012-06-04 20:30   ` [PATCHSET] block: " Vivek Goyal
     [not found]     ` <20120604203004.GN4458-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-06-05  2:02       ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2012-06-05  3:40 [PATCHSET] block: implement per-blkg request allocation, take#2 Tejun Heo
     [not found] ` <1338867660-4689-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-06-05  3:41   ` [PATCH 10/10] blkcg: implement per-blkg request allocation Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120604202620.GM4458@redhat.com \
    --to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox