dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Kent Overstreet <koverstreet@google.com>
To: Zach Brown <zab@redhat.com>
Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org,
	dm-devel@redhat.com, tytso@mit.edu
Subject: Re: [PATCH 4/5] aio: vmap ringbuffer
Date: Tue, 9 Oct 2012 15:44:28 -0700	[thread overview]
Message-ID: <20121009224428.GH29494@google.com> (raw)
In-Reply-To: <20121009223210.GR26187@lenny.home.zabbo.net>

On Tue, Oct 09, 2012 at 03:32:10PM -0700, Zach Brown wrote:
> > If it is measurable I'll take another stab at using memory from
> > __get_free_pages() for the ringbuffer. That really would be the ideal
> > solution.
> 
> No, then you'll run into high order allocation failures with rings that
> don't fit in a single page.

Not if we decouple the ringbuffer size from max_requests.

This would be useful to do anyways because right now, allocating a kiocb
has to take a global refcount and check head and tail in the ringbuffer
just so it can avoid overflowing the ringbuffer.

If we change aio_complete() so that if the ringbuffer is full then the
kiocb just goes on a linked list - we can size the ringbuffer so this
doesn't happen normally and avoid the global synchronization in the fast
path.

> > The other reason I wanted to do this was for the aio attributes stuff -
> > for return values, I think the only sane way is for the return values to
> > go in the ringbuffer, which means records are no longer fixed size so
> > dealing with pages is even more of a pain.
> 
> Then let's see that, please.

I was starting on that, but then I got sidetracked with refactoring...
:P

> And can we please stop calling them attributes?  They're inputs and
> outputs that change behaviour -- they're interfaces.

Attributes isn't a good name but neither is interfaces, because they
don't exist on their own; they're always attached to some other
interface.

I dunno.

> And no, just for the record, I don't think generic packed variable size
> structs are worth the trouble.
> 
> If we're going to do a generic interface extension mechanism then we
> should put it in its own well thought out system calls, not staple it on
> to the side of aio because it's there.  It's a really crummy base to
> work from.

Not arguing with you about aio, but most of the use cases I have for it
want aio.

So unless we're going to deprecate the existing aio interfaces and make
something better (I wouldn't complain about that!) I do need to make it
work with aio.

Not that I'm opposed to new syscalls passing attributes to sync versions
of read/write/etc, I just haven't started that yet or really thought
about it.

  reply	other threads:[~2012-10-09 22:44 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
     [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 [this message]
     [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=20121009224428.GH29494@google.com \
    --to=koverstreet@google.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=zab@redhat.com \
    /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).