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 03:32:37

On Sat, 20 Aug 2005, Andrew Morton wrote:
Christoph Lameter [off-list ref] wrote:
quoted
 @@ -508,6 +508,16 @@ static int unuse_mm(struct mm_struct *mm
  {
  	struct vm_area_struct *vma;
  
 +	/*
 +	 * Ensure that existing deltas are charged to the current mm since
 +	 * we will charge the next batch manually to the target mm
 +	 */
 +	if (current->mm && mm_counter_updates_pending(current)) {
Is there a race window right here?
Why? current is tied to a thread.

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.
--
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