From: Jens Axboe <axboe@kernel.dk>
To: Jeff Moyer <jmoyer@redhat.com>
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: Fri, 20 Mar 2015 13:21:43 -0600 [thread overview]
Message-ID: <550C7347.9080206@kernel.dk> (raw)
In-Reply-To: <x49619vts57.fsf@segfault.boston.devel.redhat.com>
On 03/20/2015 12:56 PM, Jeff Moyer wrote:
> Jens Axboe <axboe@kernel.dk> writes:
>
>> On 03/19/2015 03:27 PM, Jens Axboe wrote:
>>> On 03/19/2015 03:00 PM, Tejun Heo wrote:
>>>> On Thu, Mar 19, 2015 at 04:58:33PM -0400, Jeff Moyer wrote:
>>>>> 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? ;-)
>>>>
>>>> I think we just need a counter there - let everyone count down as they
>>>> exit and the last one trigger the completion, no?
>>>
>>> Yeah that's a good point, that'd be cleaner too. I'll change it and test
>>> that.
>>
>> Here's a cleaner variant that pairs the completion even with an atomic
>> count. Works for me as well.
>
> I like this version. I ran it though the libaio test harness and
> xfstests aio tests and it passed.
>
> Thanks, Jens!
>
> Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Thanks for testing, Jeff! I'll send out a proper patch with your
reviewed-by as well.
--
Jens Axboe
prev parent reply other threads:[~2015-03-20 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 17:34 serial percpu_ref draining in exit_aio() Tejun Heo
2015-03-19 20:25 ` Jens Axboe
2015-03-19 20:58 ` Jeff Moyer
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 [this message]
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=550C7347.9080206@kernel.dk \
--to=axboe@kernel.dk \
--cc=bcrl@kvack.org \
--cc=jmoyer@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).