On Mon, Jun 03, 2002 at 02:27:39AM -0700, David S. Miller wrote:
> Such as the fact that none of these operations need to
> be atomic :-)
After looking around a little bit the unique reference guarantee
plus various memory barriers surrounding it appear to suffice. But
I'm still left quite uneasy by the usage of non-atomic operations
on an atomically updated lock word. At the very least making the
operand shifted an unsigned long is needed. So this ensues:
Cheers,
Bill
===== mm/page_alloc.c 1.63 vs edited =====
--- 1.63/mm/page_alloc.c Tue May 28 16:57:49 2002
+++ edited/mm/page_alloc.c Mon Jun 3 03:58:59 2002
@@ -110,8 +110,8 @@
BUG();
if (PageWriteback(page))
BUG();
- ClearPageDirty(page);
- page->flags &= ~(1<<PG_referenced);
+
+ page->flags &= ~((1UL << PG_referenced) | (1UL << PG_dirty));
if (current->flags & PF_FREE_PAGES)
goto local_freelist;
-
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/