From: Tejun Heo <tj@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jens Axboe <axboe@kernel.dk>, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH percpu/for-3.17 2/2] blk-throttle: replace custom async percpu alloc mechanism with percpu_pool
Date: Mon, 21 Jul 2014 20:51:04 -0400 [thread overview]
Message-ID: <20140722005104.GI12921@htj.dyndns.org> (raw)
In-Reply-To: <20140718200834.GH13012@htj.dyndns.org>
On Fri, Jul 18, 2014 at 04:08:34PM -0400, Tejun Heo wrote:
> From 0a4bd997ba9725565883c688d7dcee8264abf71c Mon Sep 17 00:00:00 2001
> From: Tejun Heo <tj@kernel.org>
> Date: Fri, 18 Jul 2014 16:07:14 -0400
>
> throtl_pd_init() is called under the queue lock but needs to allocate
> the percpu stats area. This is currently handled by queueing it on a
> list and scheduling a work item to allocate and fill the percpu stats
> area. Now that perpcu_pool is available, this custom mechanism can be
> replaced.
>
> Add tg_stats_cpu_pool and implement tg_ensure_stats_cpu() which tries
> to make sure that tg->stats_cpu is populated to replace the custom
> async alloc mechanism. As percpu_pool allocation can fail,
> tg_ensure_stats_cpu() is invoked whenever ->stats_cpu is about to be
> accessed. This is similar to the way code was structured before as
> the custom async alloc could take arbitrary amount of time and each
> access should verify that ->stats_cpu is populated.
>
> This simplifies the code. There shouldn't be noticeable functional
> difference.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Vivek Goyal <vgoyal@redhat.com>
> Cc: Jens Axboe <axboe@kernel.dk>
Jens, can I route this patch through percpu tree?
Thanks.
--
tejun
next prev parent reply other threads:[~2014-07-22 0:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 20:08 [PATCH percpu/for-3.17 1/2] percpu: implement percpu_pool Tejun Heo
2014-07-18 20:08 ` [PATCH percpu/for-3.17 2/2] blk-throttle: replace custom async percpu alloc mechanism with percpu_pool Tejun Heo
2014-07-21 17:27 ` Vivek Goyal
2014-07-22 0:50 ` Tejun Heo
2014-07-22 0:51 ` Tejun Heo [this message]
2014-07-31 19:00 ` [PATCH percpu/for-3.17 1/2] percpu: implement percpu_pool Tejun Heo
2014-07-31 22:03 ` Andrew Morton
2014-08-01 0:44 ` Tejun Heo
2014-08-01 1:16 ` Andrew Morton
2014-08-01 1:23 ` 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=20140722005104.GI12921@htj.dyndns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).