Thread (47 messages) 47 messages, 8 authors, 2005-08-22

Re: [PATCH] Use deltas to replace atomic inc

From: Linus Torvalds <torvalds@osdl.org>
Date: 2005-08-22 04:18:08

On Sun, 21 Aug 2005, Christoph Lameter wrote:
quoted
Why? I don't think it's ever wrong to do the thing. We should be holding 
no locks at the point (and we haven't grabbed he RQ lock yet), so it 
should always be safe to get the page table lock. 
get_user_pages and unuse_mm may be working on an mm that is not 
current->mm. If schedule is called then the deltas are added to the wrong 
mm (current->mm).
Hmm. But we already hold (and _have_ to hold) the mm lock there, don't we?

Why not make the rule be that we only use the delta stuff when we don't 
hold the mm lock. Which is pretty seldom, but the big one is obviously 
anon page faults.

Whenever we already -do- hold the page table lock for other reasons, 
there's no actual upside to using the delta representation. In fact, 
there's only downsides, since it just makes the things like scheduling 
slower.

Or did I miss some clever thing?

			Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help