Messages in this thread | | | Date | Wed, 05 Apr 2006 10:22:30 +1000 | From | Nick Piggin <> | Subject | Re: [patch 2/3] mm: speculative get_page |
| |
Christoph Lameter wrote: > Looks like the NoNewRefs flag is mostly == > spin_is_locked(mapping->tree_lock)? Would it not be better to check the > tree_lock? >
Well there are other uses for the tree_lock (eg. tag operations) which do not need the "no new references" guarantee.
> > >>--- linux-2.6.orig/mm/migrate.c >>+++ linux-2.6/mm/migrate.c >> >>+ SetPageNoNewRefs(page); >> write_lock_irq(&mapping->tree_lock); > > > A dream come true! If this is really working as it sounds then we can > move the SetPageNoNewRefs up and avoid the final check under > mapping->tree_lock. Then keep SetPageNoNewRefs until the page has been > copied. It would basically play the same role as locking the page. >
Yes we could do that but at this stage I wouldn't like to seperate SetPageNoNewRefs from tree_lock, as it is replacing a traditional guarantee that tree_lock no longer provides.
-- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com
- 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/
| |