From: Jeff Moyer <jmoyer@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>,
kent.overstreet@gmail.com, Benjamin LaHaise <bcrl@kvack.org>,
linux-kernel@vger.kernel.org
Subject: Re: serial percpu_ref draining in exit_aio()
Date: Thu, 19 Mar 2015 16:58:33 -0400 [thread overview]
Message-ID: <x494mpg66x2.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <550B30D5.9080207@kernel.dk> (Jens Axboe's message of "Thu, 19 Mar 2015 14:25:57 -0600")
Jens Axboe <axboe@kernel.dk> writes:
> On 03/19/2015 11:34 AM, Tejun Heo wrote:
>> Hello,
>>
>> So, Jens noticed that fio process exiting takes seconds when there are
>> multiple aio contexts and the culprit seems to be the serial
>> percpu_ref draining in exit_aio(). It's generally a bad idea to
>> expose RCU latencies to userland because they add up really quickly
>> and are unrelated to other performance parameters. Can you guys
>> please at least update the code so that it waits for all percpu_refs
>> to drain at the same time rather than one after another? That should
>> resolve the worst part of the problem.
>
> This works for me. Before:
>
> real 0m5.872s
> user 0m0.020s
> sys 0m0.040s
>
> after
>
> real 0m0.246s
> user 0m0.020s
> sys 0m0.040s
>
> It solves the exit_aio() issue, but if the app calls io_destroy(),
> then we are back to square one...
Do you really want to do memory allocation in the exit path? That
sounds like a bad idea to me. (Of course, now you're going to point out
all the places that currently happens, right? ;-)
-Jeff
next prev parent reply other threads:[~2015-03-19 20:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 17:34 Tejun Heo
2015-03-19 20:25 ` Jens Axboe
2015-03-19 20:58 ` Jeff Moyer [this message]
2015-03-19 21:00 ` Tejun Heo
2015-03-19 21:27 ` Jens Axboe
2015-03-19 21:43 ` Jens Axboe
2015-03-20 18:56 ` Jeff Moyer
2015-03-20 19:21 ` Jens Axboe
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=x494mpg66x2.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=axboe@kernel.dk \
--cc=bcrl@kvack.org \
--cc=kent.overstreet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.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
all inboxes | Powered by JetHome®