lkml.org 
[lkml]   [2004]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Unnecessary barrier in sync_page()?
On Wed, Jul 07, 2004 at 08:42:02PM +0200, Andrea Arcangeli wrote:
> On Wed, Jul 07, 2004 at 11:29:53AM -0700, Andrew Morton wrote:
> > Andrea Arcangeli <andrea@suse.de> wrote:
> > >
> > > however the smp_mb() isn't needed in sync_page, simply because it's
> > > perfectly ok if we start running sync_page before reading pagelocked.
> > > All we care about is to run sync_page _before_ io_schedule() and that we
> > > read PageLocked _after_ prepare_to_wait_exclusive.
> > >
> > > So the locking in between PageLocked and sync_page is _absolutely_
> > > worthless and the smp_mb() can go away.
> >
> > IIRC, Chris added that barrier (and several similar) for the reads in
> > page_mapping().
>
> how does it help to know the page is not locked before executing
> page_mapped?

(I expressed it a bit bad, I mean not locked by us)

I mean the lock on the page can go from under us anytime. the the very
best you can try to hide a race condition with such smp_mb, but sure not
fix it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2011 Jasper Spaans