From: Kent Overstreet <koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Zach Brown <zab-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
tytso-3s7WtUTddSA@public.gmane.org
Subject: Re: [PATCH 5/5] aio: Refactor aio_read_evt, use cmxchg(), fix bug
Date: Tue, 9 Oct 2012 17:06:00 -0700 [thread overview]
Message-ID: <20121010000600.GB26835@google.com> (raw)
In-Reply-To: <20121009231059.GV26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
On Tue, Oct 09, 2012 at 04:10:59PM -0700, Zach Brown wrote:
> > Well, the ringbuffer does have those compat flags and incompat flags.
> > Which libaio conveniently doesn't check, but for what it does it
> > shouldn't really matter I guess.
>
> Well, the presumed point of the incompat flags would be to tell an app
> that it isn't going to get what it expects! Ideally it'd abort, not
> blindly charge on ahead.
>
> > I figure if anyone else is using the ringbuffer directly and not
> > checking the flag fields... well, they deserve to have their stuff
> > broken :P
>
> Nope! I subscribe to the unpopular notion that you don't change
> interfaces just because you can.
Heh, I won't argue.
The AIO ringbuffer stuff just annoys me more than most (it wasn't until
the other day that I realized it was actually exported to userspace...
what led to figuring that out was noticing aio_context_t was a ulong,
and got truncated to 32 bits with a 32 bit program running on a 64 bit
kernel. I'd been horribly misled by the code comments and the lack of
documentation.)
> > Anyways, if we can't change the ringbuffer at all we could always create
> > a new version of the io_setup() syscall that gives you a new ringbuffer
> > format.
>
> That might be the easiest way to tweak the existing aio interface, yeah.
> Jens wants to do that in his patches as well. He used the hack of
> setting nr_events to INT_MAX to indicate not using the ring, but adding
> a flags parameter to a new syscall seems a lot less funky.
Alright. Maybe I'll start hacking on that...
> > I'm wondering what interest there is in creating a new aio interface to
> > solve these and other issues.
> >
> > I kind of feel like as long as we've got a list of complaints, we should
> > prototype something in one place that fixes all our complaints... think
> > of it as documenting all the known issues, if nothing else.
>
> I'd help out with that, yes.
>
> On my list of complaints would be how heavy the existing aio
> setup/submission/completion/teardown interface is. A better interface
> should make it trivial to just bang out a call and synchronously wait
> for it. Get that right and you don't have to mess around with aio and
> sync variants.
Hmm yeah, setup and teardown is a good point.
I never liked aio_context_t too much - in some respects it would be
cleaner if it was just implicit and per thread. But we probably can't do
that since there are legitimate use cases for one thread submitting and
iocb and another thread reaping the events.
But if we do have an explicit handle, I don't see why it shouldn't be a
file descriptor.
But an implicit per thread context might be useful for the use case you
describe... or perhaps we can add a syscall to submit an iocb and wait
for it synchronously, without any aio_context_t involved.
> One of the harder things to get right would be specifying the DIF/DIX
> checksums per sector. But I think we should. Poor Martin has hung out
> to dry for too long.
Yes, that's one of the things I want to address with the aio attributes
stuff.
>
> And perhaps obviously, I'd start with the acall stuff :). It was a lot
> lighter. We could talk about how to make it extensible without going
> all the way to the generic packed variable size duplicating or not and
> returning or not or.. attributes :).
Link? I haven't heard of acall before.
next prev parent reply other threads:[~2012-10-10 0:06 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 6:39 [PATCH 1/5] aio: Kill return value of aio_complete() Kent Overstreet
[not found] ` <1349764760-21093-1-git-send-email-koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 6:39 ` [PATCH 2/5] aio: kiocb_cancel() Kent Overstreet
[not found] ` <1349764760-21093-2-git-send-email-koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 18:26 ` Zach Brown
[not found] ` <20121009182625.GM26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-09 21:37 ` Kent Overstreet
[not found] ` <20121009213700.GF29494-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-10 11:03 ` Theodore Ts'o
[not found] ` <20121010110356.GA11468-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2012-10-10 21:20 ` Zach Brown
[not found] ` <20121010212051.GD6371-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-10 23:21 ` Theodore Ts'o
2012-10-11 2:41 ` Kent Overstreet
2012-10-09 6:39 ` [PATCH 5/5] aio: Refactor aio_read_evt, use cmxchg(), fix bug Kent Overstreet
[not found] ` <1349764760-21093-5-git-send-email-koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 18:37 ` Zach Brown
[not found] ` <20121009183753.GP26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-09 21:27 ` Kent Overstreet
[not found] ` <20121009212724.GD29494-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 22:47 ` Zach Brown
[not found] ` <20121009224703.GT26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-09 22:55 ` Kent Overstreet
[not found] ` <20121009225509.GA26835-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 23:10 ` Zach Brown
[not found] ` <20121009231059.GV26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-10 0:06 ` Kent Overstreet [this message]
[not found] ` <20121010000600.GB26835-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-10 0:26 ` Zach Brown
[not found] ` <20121010002634.GX26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-10 0:47 ` Kent Overstreet
[not found] ` <20121010004746.GF26835-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-10 21:43 ` Zach Brown
[not found] ` <20121010214315.GE6371-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-11 2:51 ` Kent Overstreet
[not found] ` <20121011025102.GE24174-jC9Py7bek1znysI04z7BkA@public.gmane.org>
2012-10-11 16:43 ` Zach Brown
2012-10-09 18:25 ` [PATCH 1/5] aio: Kill return value of aio_complete() Zach Brown
2012-10-09 6:39 ` [PATCH 3/5] aio: Rewrite refcounting Kent Overstreet
[not found] ` <1349764760-21093-3-git-send-email-koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 18:27 ` Zach Brown
[not found] ` <20121009182755.GN26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-09 22:21 ` Kent Overstreet
[not found] ` <20121009222153.GG29494-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 22:35 ` Zach Brown
[not found] ` <20121009223504.GS26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-10 0:17 ` Kent Overstreet
2012-10-09 6:39 ` [PATCH 4/5] aio: vmap ringbuffer Kent Overstreet
[not found] ` <1349764760-21093-4-git-send-email-koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 18:29 ` Zach Brown
2012-10-09 21:31 ` Kent Overstreet
[not found] ` <20121009213111.GE29494-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 22:32 ` Zach Brown
2012-10-09 22:44 ` Kent Overstreet
[not found] ` <20121009224428.GH29494-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-09 22:58 ` Zach Brown
[not found] ` <20121009225836.GU26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-10 0:16 ` Kent Overstreet
[not found] ` <20121010001630.GC26835-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-10 0:36 ` Zach Brown
[not found] ` <20121010003626.GY26187-fypN+1c5dIyjpB87vu3CluTW4wlIGRCZ@public.gmane.org>
2012-10-10 1:09 ` Kent Overstreet
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=20121010000600.GB26835@google.com \
--to=koverstreet-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
--cc=dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tytso-3s7WtUTddSA@public.gmane.org \
--cc=zab-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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).