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

Re: [PATCH] Use deltas to replace atomic inc

From: Christoph Lameter <hidden>
Date: 2005-08-22 04:06:25

On Sun, 21 Aug 2005, Linus Torvalds wrote:
On Sun, 21 Aug 2005, Christoph Lameter wrote:
quoted
The thing that bothers me more is that schedule() can be called both by 
handle_mm_fault as well as during unuse_mm. We may need some flag 
PF_NO_COUNTER_UPDATES or so there to insure that schedule() does not add 
deltas to the current->mm.
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). If we had PF_NO_COUNTER_UPDATES then we could force no 
counters updates to occur until get_user_pages or unuse_mm assigns the 
deltas to a specific mm using mm_counter_catchup(current, target_mm).
I think the delta approach looks quite reasonable, although I think 
somebody should check that the cache behaviour is ok (ie the deltas should 
hopefully be in a cacheline that we need to look at anyway).
I put the deltas near to exit_state which is also checked in schedule().
--
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