public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin LaHaise <bcrl@kvack.org>
To: Zach Brown <zach.brown@oracle.com>
Cc: Ken Chen <kenchen@google.com>,
	akpm@linux-foundation.org, linux-aio@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] convert aio event reap to use atomic-op instead of spin_lock
Date: Wed, 11 Apr 2007 16:03:48 -0400	[thread overview]
Message-ID: <20070411200348.GN13621@kvack.org> (raw)
In-Reply-To: <20070411195256.GD9602@mami.zabbo.net>

On Wed, Apr 11, 2007 at 12:52:56PM -0700, Zach Brown wrote:
> I'm worried that virtual aliasing spells doom for the current
> home-brewed serialization that fs/aio.c is doing with the shared ring
> head/tail accesses.  Am I worrying about nothing here?

Adding a flush_dcache_page() should fix that, but it might also need a 
change in the layout of the ring buffer header to get things completely 
correct.  What I'm thinking of is that the head and tail bits might need 
to be on different cachelines to ensure any aliasing that does occur will 
not result in updates colliding.  I'm not that much of an expert on virtually 
aliased caches, though.

> > > I will look into this aside from this patch.
> > 
> > That's probably the case.  Also, any changes in this area *must* correctly 
> > update the compat/incompat feature flags in the ring buffer header.  That 
> > has been missed in the past...
> 
> Do you know of anyone using the current ring info ABI?
> 
> The *only* user I know of is the check of ctx->magic in libaio.

But... any libaio implementing the new sematics must be able to run on old 
kernels by falling back to the syscall when it notices that required bits 
aren't set in the header.  It's easy enough to implement the checks, they 
just need to be carefully checked before being shipped.

		-ben
-- 
"Time is of no importance, Mr. President, only life is important."
Don't Email: <zyntrop@kvack.org>.

  reply	other threads:[~2007-04-11 20:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-10 23:53 [patch] convert aio event reap to use atomic-op instead of spin_lock Ken Chen
2007-04-11  5:18 ` Andrew Morton
2007-04-11 16:54   ` Ken Chen
2007-04-11 18:15     ` Zach Brown
2007-04-11 18:29       ` Ken Chen
2007-04-11 18:00 ` Zach Brown
2007-04-11 19:11   ` Andrew Morton
2007-04-11 19:34     ` Zach Brown
2007-04-11 19:28   ` Ken Chen
2007-04-11 19:44     ` Zach Brown
2007-04-11 19:45     ` Benjamin LaHaise
2007-04-11 19:52       ` Zach Brown
2007-04-11 20:03         ` Benjamin LaHaise [this message]
2007-04-12  7:29     ` Ken Chen
2007-04-12 12:06       ` Jeff Moyer
2007-04-13  0:57         ` Ken Chen
2007-04-13  1:08           ` Ken Chen
2007-04-12  7:50   ` Ken Chen
2007-04-12 14:31     ` Benjamin LaHaise
2007-04-12 15:13       ` Benjamin LaHaise

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=20070411200348.GN13621@kvack.org \
    --to=bcrl@kvack.org \
    --cc=akpm@linux-foundation.org \
    --cc=kenchen@google.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zach.brown@oracle.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