--On Monday, March 03, 2003 14:15:18 -0800 Andrew Morton <akpm@digeo.com>
wrote:
> Well why not make mapcount an "int" and move the places where it is
> modified inside pte_chain_lock()?
>
> That does not increase the number of atomic operations, and it makes me
> stop wondering if this:
>
> if (atomic_read(&page->pte.mapcount) == 0)
> inc_page_state(nr_mapped);
>
> is racy ;)
That would be entirely too easy a solution :)
You're entirely right, of course. Here's the patch that makes it an int
instead of atomic, with the appropriate locking.
Dave
======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059
-
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/
This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:25 EST