public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.5-aa1
@ 2004-04-04  5:22 Andrea Arcangeli
  0 siblings, 0 replies; 10+ messages in thread
From: Andrea Arcangeli @ 2004-04-04  5:22 UTC (permalink / raw)
  To: linux-kernel

This fixes a tiny race in the recent mprotect merging code, here's the
intradiff for review, plus it merges some nice lowlatency improvement
from Takashi.

--- x/mm/mprotect.c.~1~	2004-04-04 06:26:09.226033712 +0200
+++ x/mm/mprotect.c	2004-04-04 06:29:37.165422120 +0200
@@ -196,12 +196,18 @@ mprotect_attempt_merge(struct vm_area_st
 
 	/*
 	 * Otherwise extend it.
+	 * We need the anon_vma_lock only for "vma" since it's changing
+	 * vma->vm_start and vma->vm_pgoff. prev->vm_start and
+	 * prev->vm_pgoff are unchanged so the race on prev->vm_end
+	 * is controlled w/o explicit anon-vma locking.
 	 */
 	if (file)
 		down(i_shared_sem);
+	anon_vma_lock(vma);
 	__vma_modify(root, prev, prev->vm_start, end, prev->vm_pgoff);
 	__vma_modify(root, vma, end, vma->vm_end,
 		     vma->vm_pgoff + ((end - vma->vm_start) >> PAGE_SHIFT));
+	anon_vma_unlock(vma);
 	if (file)
 		up(i_shared_sem);
 	return 1;
@@ -264,6 +270,7 @@ mprotect_attempt_merge_final(struct vm_a
 
 	if (file)
 		down(i_shared_sem);
+	/* no need of anon_vma_lock for any "vm_end" extension */
 	__vma_modify(root, prev, prev->vm_start,
 		     next->vm_end, prev->vm_pgoff);
 

I didn't yet merge the ppc patch because I'm not really sure it's
necessary (how can it not oops in the first place, if that patch was
needed? OTOH certainly that patch cannot hurt either but I'll wait
feedback from the testing first).  The only pending bug at the moment is
the gfp-no-compound related crash from Christoph on ppc showing
page->private corrupted. I currently doubt it's a bug in my changes,
though I cannot exclude it either. As soon as I get the results from the
three debugging patches I will know more about it. I definitely cannot
reproduce anything wrong here, and the gfp-no-compound fixed the last
swap-suspend related glitch plus it makes the interface with the drivers
more robust.

URL:

	http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.6/2.6.5-aa1.gz
	http://www.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.6/2.6.5-aa1/

Changelog diff between 2.6.5-rc3-aa3 and 2.6.5-aa1:

Files 2.6.5-rc3-aa3/disable-cap-mlock and 2.6.5-aa1/disable-cap-mlock differ
Files 2.6.5-rc3-aa3/extraversion and 2.6.5-aa1/extraversion differ
Files 2.6.5-rc3-aa3/prio-tree.gz and 2.6.5-aa1/prio-tree.gz differ

	Rediffed due rejects.

Files 2.6.5-rc3-aa3/mprotect-vma-merging and 2.6.5-aa1/mprotect-vma-merging differ

	Fixed race condition in mprotect, must hold the anon_vma_lock()
	while moving either ->vm_start or ->vm_pgoff (extending the vm_end
	doesn't need it instead since the race is controlled w/o explicit
	locking).

Only in 2.6.5-aa1: unmap_vmas-lat

	Don't threat no-preempt differently from -preempt w.r.t. worst case
	latencies.

Only in 2.6.5-aa1: writeback-lat

	Merged Takashi Iwai's lowlatency fixes adding missing schedule points,
	reducing greatly the worst case latency with preempt disabled.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: 2.6.5-aa1
@ 2004-04-04 21:05 Marcus Hartig
  2004-04-04 22:59 ` 2.6.5-aa1 Jeff Sipek
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus Hartig @ 2004-04-04 21:05 UTC (permalink / raw)
  To: linux-kernel

 > This fixes a tiny race in the recent mprotect merging code, here's the
 > intradiff for review, plus it merges some nice lowlatency improvement
 > from Takashi.

Runs fine her with my GNOME 2.6 desktop. Fast like Speedy Gonzales.
Good work.

But now with the vanilla 2.6.5 and/or -aa1 my favourite game Enemy 
Territory quits with "signal 11". With 2.6.5-rc3 it runs stable for hours.

No change in the kernel config, all with preempt, no CONFIG_REGPARM for 
nVidia binary drivers is set, or other changes. But only when I want to 
access the net server game browser in ET to play online! Only then bumm!

With 2.6.5-rc3 all runs fine. Amusingly, hmmm?

Marcus

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-04-05 19:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-04  5:22 2.6.5-aa1 Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2004-04-04 21:05 2.6.5-aa1 Marcus Hartig
2004-04-04 22:59 ` 2.6.5-aa1 Jeff Sipek
2004-04-05  0:20   ` 2.6.5-aa1 Andrea Arcangeli
2004-04-05  2:18     ` 2.6.5-aa1 Jeff Sipek
2004-04-05  5:39     ` 2.6.5-aa1 Marcus Hartig
2004-04-05  7:03       ` 2.6.5-aa1 Jeff Sipek
     [not found]       ` <1081185096.8036.3.camel@nosferatu.lan>
2004-04-05 17:28         ` 2.6.5-aa1 Marcus Hartig
2004-04-05 18:31     ` 2.6.5-aa1 Marcus Hartig
2004-04-05 19:02       ` 2.6.5-aa1 Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox