All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ankit Jain <jankit@suse.de>
To: Zach Brown <zab@zabbo.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	bcrl@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-aio@kvack.org, linux-kernel@vger.kernel.org,
	Jan Kara <jack@suse.cz>
Subject: Re: [RFC][PATCH] Make io_submit non-blocking
Date: Thu, 26 Jul 2012 01:47:24 +0530	[thread overview]
Message-ID: <50105454.5080400@suse.de> (raw)
In-Reply-To: <20120724223702.GB6723@lenny.home.zabbo.net>

On 07/25/2012 04:07 AM, Zach Brown wrote:
> On Tue, Jul 24, 2012 at 05:11:05PM +0530, Ankit Jain wrote:
[snip]
>> With this patch, io_submit prepares all the kiocbs and then
>> adds (kicks) them to ctx->run_list (kicked) in one go and then
>> schedules the workqueue. The actual operations are not executed
>> on io_submit's process context, so it can return very quickly.
> 
> Strong nack; this isn't safe without having done the work to ensure that
> all the task_struct references under the f_op->aio_*() paths won't be
> horribly confused to find a kernel thread instead of the process that
> called io_submit().
> 
> The one-off handling of the submitters's cred is an indication that
> there might be other cases to worry about :).

Makes sense, I will try to look into this.

>> 3. Also, I tried not using aio_queue_work from io_submit call, and instead
>> depending on an already scheduled one or the iocbs being run when
>> io_getevents gets called. This seemed to give improved perfomance. But
>> does this constitute as change of api semantics?
> 
> You can't rely on io_getevents() being called for forward progress.  Its
> perfectly reasonable for a task to wait for io completion by polling an
> eventfd that aio_complete() notifies, for instance.

Ah okay, didn't realize that.

Thanks,
-- 
Ankit Jain
SUSE Labs


--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

WARNING: multiple messages have this Message-ID (diff)
From: Ankit Jain <jankit@suse.de>
To: Zach Brown <zab@zabbo.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	bcrl@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-aio@kvack.org, linux-kernel@vger.kernel.org,
	Jan Kara <jack@suse.cz>
Subject: Re: [RFC][PATCH] Make io_submit non-blocking
Date: Thu, 26 Jul 2012 01:47:24 +0530	[thread overview]
Message-ID: <50105454.5080400@suse.de> (raw)
In-Reply-To: <20120724223702.GB6723@lenny.home.zabbo.net>

On 07/25/2012 04:07 AM, Zach Brown wrote:
> On Tue, Jul 24, 2012 at 05:11:05PM +0530, Ankit Jain wrote:
[snip]
>> With this patch, io_submit prepares all the kiocbs and then
>> adds (kicks) them to ctx->run_list (kicked) in one go and then
>> schedules the workqueue. The actual operations are not executed
>> on io_submit's process context, so it can return very quickly.
> 
> Strong nack; this isn't safe without having done the work to ensure that
> all the task_struct references under the f_op->aio_*() paths won't be
> horribly confused to find a kernel thread instead of the process that
> called io_submit().
> 
> The one-off handling of the submitters's cred is an indication that
> there might be other cases to worry about :).

Makes sense, I will try to look into this.

>> 3. Also, I tried not using aio_queue_work from io_submit call, and instead
>> depending on an already scheduled one or the iocbs being run when
>> io_getevents gets called. This seemed to give improved perfomance. But
>> does this constitute as change of api semantics?
> 
> You can't rely on io_getevents() being called for forward progress.  Its
> perfectly reasonable for a task to wait for io completion by polling an
> eventfd that aio_complete() notifies, for instance.

Ah okay, didn't realize that.

Thanks,
-- 
Ankit Jain
SUSE Labs



  reply	other threads:[~2012-07-25 20:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 11:41 [RFC][PATCH] Make io_submit non-blocking Ankit Jain
2012-07-24 12:34 ` Rajat Sharma
2012-07-24 12:34   ` Rajat Sharma
2012-07-24 20:27   ` Theodore Ts'o
2012-07-24 20:27     ` Theodore Ts'o
2012-07-24 22:31 ` Dave Chinner
2012-07-24 22:50   ` Christoph Hellwig
2012-07-24 22:50     ` Christoph Hellwig
2012-07-24 23:08     ` Zach Brown
2012-07-24 23:08       ` Zach Brown
2012-07-26 19:52     ` Ankit Jain
2012-07-26 21:43       ` Zach Brown
2012-07-25 20:12   ` Ankit Jain
2012-07-24 22:37 ` Zach Brown
2012-07-24 22:37   ` Zach Brown
2012-07-25 20:17   ` Ankit Jain [this message]
2012-07-25 20:17     ` Ankit Jain

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=50105454.5080400@suse.de \
    --to=jankit@suse.de \
    --cc=bcrl@kvack.org \
    --cc=jack@suse.cz \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zab@zabbo.net \
    /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.