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 01/10] blkcg: __blkg_lookup_create() doesn't need radix preload
Date: Mon, 4 Jun 2012 14:57:02 -0400	[thread overview]
Message-ID: <20120604185702.GK4458@redhat.com> (raw)
In-Reply-To: <1338793697-10735-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

On Mon, Jun 04, 2012 at 12:08:08AM -0700, Tejun Heo wrote:
> There's no point in calling radix_tree_preload() if preloading doesn't
> use more permissible GFP mask.  Drop preloading from
> __blkg_lookup_create().
> 
> While at it, drop sparse locking annotation which no longer applies.
> 
> v2: Vivek pointed out the odd preload usage.  Instead of updating,
>     just drop it.
> 
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Looks good to me.

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

Vivek

> ---
>  block/blk-cgroup.c |   10 +---------
>  1 files changed, 1 insertions(+), 9 deletions(-)
> 
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index 4ab7420..af61db0 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -177,7 +177,6 @@ EXPORT_SYMBOL_GPL(blkg_lookup);
>  
>  static struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg,
>  					     struct request_queue *q)
> -	__releases(q->queue_lock) __acquires(q->queue_lock)
>  {
>  	struct blkcg_gq *blkg;
>  	int ret;
> @@ -203,10 +202,6 @@ static struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg,
>  		goto err_put;
>  
>  	/* insert */
> -	ret = radix_tree_preload(GFP_ATOMIC);
> -	if (ret)
> -		goto err_free;
> -
>  	spin_lock(&blkcg->lock);
>  	ret = radix_tree_insert(&blkcg->blkg_tree, q->id, blkg);
>  	if (likely(!ret)) {
> @@ -215,14 +210,11 @@ static struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg,
>  	}
>  	spin_unlock(&blkcg->lock);
>  
> -	radix_tree_preload_end();
> -
>  	if (!ret)
>  		return blkg;
> -err_free:
> -	blkg_free(blkg);
>  err_put:
>  	css_put(&blkcg->css);
> +	blkg_free(blkg);
>  	return ERR_PTR(ret);
>  }
>  
> -- 
> 1.7.7.3

  parent reply	other threads:[~2012-06-04 18:57 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 [this message]
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
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:40   ` [PATCH 01/10] blkcg: __blkg_lookup_create() doesn't need radix preload 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=20120604185702.GK4458@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