All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: Gu Zheng <guz.fnst@cn.fujitsu.com>,
	Benjamin LaHaise <bcrl@kvack.org>,
	linux-aio@kvack.org, linux-fsdevel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: Revert "aio: block exit_aio() until all context requests are completed"
Date: Fri, 15 May 2015 17:26:48 +0200	[thread overview]
Message-ID: <55561038.5080602@de.ibm.com> (raw)
In-Reply-To: <x49egmiyn2e.fsf@segfault.boston.devel.redhat.com>

Am 15.05.2015 um 15:42 schrieb Jeff Moyer:
> Christian Borntraeger <borntraeger@de.ibm.com> writes:
> 
>> I see a significant latency (can be minutes with 2000 disks and HZ=100)
>> when exiting a QEMU process that has lots of disk devices via aio. The
>> process sits idle doing nothing as zombie in exit_aio waiting for the
>> completion.
>>
>> Turns out that 
>> commit 6098b45b32 ("aio: block exit_aio() until all context requests are
>> completed") caused the delay.
>>
>> Patch description was:
>>
>> It seems that exit_aio() also needs to wait for all iocbs to complete (like
>> io_destroy), but we missed the wait step in current implemention, so fix
>> it in the same way as we did in io_destroy.
>>
>> Now: io_destroy requires to block until everything is cleaned up from its
>> interface description in the manpage:
>> DESCRIPTION
>> The  io_destroy()  system call will attempt to cancel all outstanding
>> asynchronous I/O operations against ctx_id, will block on the completion
>> of all operations that could not be canceled, and will destroy the ctx_id.
>>
>> Does process exit require the same full blocking? We might be able to
>> cleanup the process and let the aio data structures be freed lazily.
>> Opinions or better ideas?
> 
> This has already been fixed:
> 
> commit dc48e56d761610da4ea1088d1bea0a030b8e3e43
> Author: Jens Axboe <axboe@fb.com>
> Date:   Wed Apr 15 11:17:23 2015 -0600
> 
>     aio: fix serial draining in exit_aio()
> 
> Cheers,
> Jeff
> 
Cool thanks. As the original patch had cc stable, shouldnt the fix also be backported?

Christian

  reply	other threads:[~2015-05-15 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1431675417-30464-1-git-send-email-borntraeger@de.ibm.com>
2015-05-15  7:41 ` Revert "aio: block exit_aio() until all context requests are completed" Christian Borntraeger
2015-05-15 13:42   ` Jeff Moyer
2015-05-15 15:26     ` Christian Borntraeger [this message]
2015-05-16 15:16       ` 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=55561038.5080602@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=bcrl@kvack.org \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.