From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Ming Lei <ming.lei@canonical.com>, Zach Brown <zab@zabbo.net>
Cc: Jens Axboe <axboe@kernel.dk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Benjamin LaHaise <bcrl@kvack.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
open@kvack.org, list@kvack.org:AIO <linux-aio@kvack.org>,
Kent Overstreet <kmo@daterainc.com>
Subject: Re: [PATCH 7/9] aio: add aio_kernel_() interface
Date: Thu, 24 Jul 2014 10:16:19 -0500 [thread overview]
Message-ID: <53D12343.8050507@oracle.com> (raw)
In-Reply-To: <CACVXFVPXTQyipPLrQML6ONwD3b4g4nHWc=OVjkUMZOiv5daevg@mail.gmail.com>
On 07/23/2014 08:57 PM, Ming Lei wrote:
> On Thu, Jul 24, 2014 at 7:16 AM, Zach Brown <zab@zabbo.net> wrote:
>> On Thu, Jul 24, 2014 at 06:55:28AM +0800, Ming Lei wrote:
>>> From: Dave Kleikamp <dave.kleikamp@oracle.com>
>>>
>>> This adds an interface that lets kernel callers submit aio iocbs without
>>> going through the user space syscalls. This lets kernel callers avoid
>>> the management limits and overhead of the context. It will also let us
>>> integrate aio operations with other kernel apis that the user space
>>> interface doesn't have access to.
>>>
>>> This patch is based on Dave's posts in below links:
>>>
>>> https://lkml.org/lkml/2013/10/16/365
>>> https://groups.google.com/forum/#!topic/linux.kernel/l7mogGJZoKQ
>>
>> This was originally written a billion years ago when dinosaurs roamed
>> the earth. Also, notably, before Kent and Ben reworked a bunch of the
>
> Not so far away, this patch is based on Dave's last version of V9, which
> was posted in Oct, 2013, :-)
Which was based on a much earlier patch from Zach. I regret that I left
aio_kernel_submit entangled with aio_run_iocb when I reworked his patches.
>> aio core. I'd want them to take a look at this patch to make sure that
>> it doesn't rely on any assumptions that have changed.
>
> Looks I missed to Cc Ken, :-(
>
>>
>>> +/* opcode values not exposed to user space */
>>> +enum {
>>> + IOCB_CMD_READ_ITER = 0x10000,
>>> + IOCB_CMD_WRITE_ITER = 0x10001,
>>> +};
>>
>> And I think the consensus was that this isn't good enough. Find a way
>> to encode the kernel caller ops without polluting the uiocb cmd name
>> space.
>
> That is easy, since the two cmd names are only for kernel AIO, whatever
> should be OK, but looks I didn't see such comment.
Agreed. These were added because the flags had been interpreted by
aio_run_iocb(). I'm happy that is no longer the case.
>>
>> (I've now come to think that this entire approach of having loop use aio
>> is misguided and that the way forward is to have dio consume what loop
>> naturally produces -- bios, blk-mq rqs, whatever -- but I'm on to other
>
> Yes, that is what these patches are doing, and actually AIO's
> model is a good match to driver's interface. Lots of drivers
> use the asynchronous model(submit, complete, ...).
>
>> things these days.)
>
> At least, loop can improve its throughput much by kernel AIO
> without big changes to fs/direct-io(attribute much to ITER_BVEC),
> and vhost-scsi should benefit from it too.
>
> Thanks,
>
--
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>
next prev parent reply other threads:[~2014-07-24 15:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 22:55 [PATCH 0/9] block/aio: loop mq conversion and kernel aio Ming Lei
2014-07-23 22:55 ` [PATCH 1/9] blk-mq: export blk_mq_freeze_queue and blk_mq_unfreeze_queue Ming Lei
2014-07-23 22:55 ` [PATCH 2/9] blk-mq: introduce init_flush_rq_fn callback in 'blk_mq_ops' Ming Lei
2014-07-23 22:55 ` [PATCH 3/9] block: loop: convert to blk-mq Ming Lei
2014-07-23 22:55 ` [PATCH 4/9] block: loop: say goodby to bio Ming Lei
2014-07-23 22:55 ` [PATCH 5/9] block: loop: introduce lo_discard() and lo_req_flush() Ming Lei
2014-07-23 22:55 ` [PATCH 6/9] block: loop: don't handle REQ_FUA explicitly Ming Lei
2014-07-23 22:55 ` [PATCH 7/9] aio: add aio_kernel_() interface Ming Lei
2014-07-23 22:55 ` Ming Lei
2014-07-23 23:16 ` Zach Brown
2014-07-24 1:57 ` Ming Lei
2014-07-24 15:16 ` Dave Kleikamp [this message]
2014-07-25 1:25 ` Ming Lei
2014-07-23 22:55 ` [PATCH 8/9] fd/direct-io: introduce should_dirty for kernel aio Ming Lei
2014-07-23 22:55 ` [PATCH 9/9] block: loop: support to submit I/O via kernel aio based Ming Lei
2014-07-24 3:08 ` Ming Lei
2014-08-06 11:58 ` [PATCH 0/9] block/aio: loop mq conversion and kernel aio Ming Lei
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=53D12343.8050507@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bcrl@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=list@kvack.org \
--cc=ming.lei@canonical.com \
--cc=open@kvack.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.