Re: [patch 2/3] mm: speculative get_page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux