lkml.org 
[lkml]   [2004]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rmap 24 pte_young first
rmap 25 of course

On Sat, 8 May 2004, Christoph Hellwig wrote:
> On Sat, May 08, 2004 at 10:56:26PM +0100, Hugh Dickins wrote:
> >
> > - if (ptep_test_and_clear_young(pte))
> > + if (pte_young(*pte) && ptep_test_and_clear_young(pte))
>
> stupid question - shouldn't the pte_young check simply move to
> the beginning of ptep_test_and_clear_young?

I don't think that would be a good idea. We're used to those
test_and_clear operations being atomic, putting an initial non-atomic
test inside would make it fundamentally non-atomic. We know here that
it's not the end of the world if we miss a racing transition of the
young bit, but it wouldn't be good to hide and force that on others.

Hugh

-
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:03    [W:0.043 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site