Re: AIM7 40% regression with 2.6.26-rc1

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Wednesday, May 7, 2008 - 8:29 pm

On Thu, 8 May 2008, Zhang, Yanmin wrote:

Well, that shows that it was the BKL.

That said, "idle 0%" is easy when you spin. Do you also have actual 
performance numbers? I'd hope that not only do we use full CPU time, it's 
also at least as fast as the old semaphores were?

While I've been dissing sleeping locks (because their overhead is so 
high), at least in _theory_ they can get better behavior when not 
spinning. Now, that's not going to happen with the BKL, I'm 99.99% sure, 
but I'd still like to hear actual performance numbers too, just to be 
sure.

Anyway, at least the "was it the BKL or some other semaphore user" 
question is entirely off the table.

So we need to

 - fix the BKL. My patch may be a good starting point, but there are 
   alternatives:

    (a) reinstate the old BKL code entirely

	Quite frankly, I'd prefer not to. Not only did it have three 
	totally different cases, some of them were apparently broken (ie 
	BKL+regular preempt didn't cond_resched() right), and I just don't 
	think it's worth maintaining three different versions, when 
	distro's are going to pick one anyway. *We* should pick one, and 
	maintain it.

    (b) screw the special BKL preemption - it's a spinlock, we don't 
	preempt other spinlocks, but at least fix BKL+preempt+cond_resched
	thing. 

	This would be "my patch + fixes" where at least one of the fixes 
	is the known (apparently old) cond_preempt() bug.

    (c) Try to keep the 2.6.25 code as closely as possible, but just 
	switch over to mutexes instead.

	I dunno. I was never all that enamoured with the BKL as a sleeping 
	lock, so I'm biased against this one, but hey, it's just a 
	personal bias.

 - get rid of the BKL anyway, at least in anything that is noticeable.

	Matthew's patch to file locking is probably worth doing as-is, 
	simply because I haven't heard any better solutions. The BKL 
	certainly can't be it, and whatever comes out of the NFSD 
	discussion will almost certainly involve just making sure that 
	those leases just use the new fs/locks.c lock.

	This is also why I'd actually prefer the simplest possible 
	(non-preempting) spinlock BKL. Because it means that we can get 
	rid of all that "saved_lock_depth" crud (like my patch already 
	did). We shouldn't aim for a clever BKL, we should aim for a BKL 
	that nobody uses.

I'm certainly open to anything. Regardless, we should decide fairly soon, 
so that we have the choice made before -rc2 is out, and not drag this out, 
since regardless of the choice it needs to be tested and people comfy with 
it for the 2.6.26 release.

			Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Mon May 5, 10:48 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Tue May 6, 4:18 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Tue May 6, 4:44 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Tue May 6, 5:09 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Tue May 6, 9:23 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Tue May 6, 9:36 am)
Re: AIM7 40% regression with 2.6.26-rc1, Alan Cox, (Tue May 6, 9:39 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Tue May 6, 9:42 am)
Re: AIM7 40% regression with 2.6.26-rc1, J. Bruce Fields, (Tue May 6, 9:44 am)
Re: AIM7 40% regression with 2.6.26-rc1, Alan Cox, (Tue May 6, 9:45 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Tue May 6, 9:51 am)
Re: AIM7 40% regression with 2.6.26-rc1, Andrew Morton, (Tue May 6, 10:21 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Tue May 6, 10:31 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Tue May 6, 10:39 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Tue May 6, 10:42 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Tue May 6, 10:45 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Tue May 6, 10:49 am)
Re: AIM7 40% regression with 2.6.26-rc1, Andrew Morton, (Tue May 6, 11:07 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Tue May 6, 1:28 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Tue May 6, 7:11 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Tue May 6, 8:41 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Andrew Morton, (Tue May 6, 8:59 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Tue May 6, 9:46 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Tue May 6, 11:26 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Tue May 6, 11:28 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Tue May 6, 11:49 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Wed May 7, 12:05 am)
Re: AIM7 40% regression with 2.6.26-rc1, Andi Kleen, (Wed May 7, 4:00 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Wed May 7, 4:46 am)
Re: AIM7 40% regression with 2.6.26-rc1, Andi Kleen, (Wed May 7, 5:21 am)
Re: AIM7 40% regression with 2.6.26-rc1, Alan Cox, (Wed May 7, 6:59 am)
Re: AIM7 40% regression with 2.6.26-rc1, Alan Cox, (Wed May 7, 7:35 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 7:36 am)
Re: AIM7 40% regression with 2.6.26-rc1, Andi Kleen, (Wed May 7, 7:57 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 8:00 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 8:02 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 8:19 am)
Re: AIM7 40% regression with 2.6.26-rc1, Andrew Morton, (Wed May 7, 8:31 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 9:20 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Wed May 7, 9:22 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 9:35 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Wed May 7, 9:38 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 9:55 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 10:05 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 10:08 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 10:14 am)
Re: AIM7 40% regression with 2.6.26-rc1, Andrew Morton, (Wed May 7, 10:16 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 10:22 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 10:24 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 10:25 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 10:27 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 10:31 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 10:36 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 10:47 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 10:49 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 10:55 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Wed May 7, 10:59 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 11:02 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 11:17 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 11:17 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 11:27 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 11:43 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 11:49 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 12:01 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 12:09 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Wed May 7, 12:24 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 12:44 pm)
Oi. NFS people. Read this., Matthew Wilcox, (Wed May 7, 1:00 pm)
Re: Oi. NFS people. Read this., Trond Myklebust, (Wed May 7, 3:10 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Wed May 7, 7:44 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Wed May 7, 8:24 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 8:29 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 8:34 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Wed May 7, 9:08 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Wed May 7, 9:17 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Wed May 7, 9:37 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Wed May 7, 11:43 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Andrew Morton, (Wed May 7, 11:48 pm)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Thu May 8, 12:14 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Thu May 8, 12:39 am)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Thu May 8, 1:44 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Thu May 8, 2:21 am)
Re: AIM7 40% regression with 2.6.26-rc1, Ingo Molnar, (Thu May 8, 2:29 am)
Re: AIM7 40% regression with 2.6.26-rc1, Zhang, Yanmin, (Thu May 8, 2:30 am)
Re: AIM7 40% regression with 2.6.26-rc1, Linus Torvalds, (Thu May 8, 7:58 am)
[git pull] scheduler fixes, Ingo Molnar, (Thu May 8, 8:10 am)
Re: [git pull] scheduler fixes, Adrian Bunk, (Thu May 8, 8:33 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Thu May 8, 8:41 am)
Re: [git pull] scheduler fixes, Adrian Bunk, (Thu May 8, 12:42 pm)
Re: Oi. NFS people. Read this., J. Bruce Fields, (Thu May 8, 6:43 pm)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 4:03 am)
Re: AIM7 40% regression with 2.6.26-rc1, Matthew Wilcox, (Sun May 11, 4:11 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 4:14 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 4:48 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 5:50 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 5:52 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 6:01 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 6:02 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 6:06 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 6:26 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 6:45 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 6:54 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 7:00 am)
Re: [git pull] scheduler fixes, Sven Wegener, (Sun May 11, 7:10 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 7:18 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 7:22 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 7:32 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 7:42 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 7:46 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 7:48 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Sun May 11, 8:19 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Sun May 11, 8:29 am)
Re: [git pull] scheduler fixes, Linus Torvalds, (Sun May 11, 9:47 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Tue May 13, 7:11 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Tue May 13, 7:21 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Tue May 13, 7:42 am)
Re: [git pull] scheduler fixes, Matthew Wilcox, (Tue May 13, 8:28 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Tue May 13, 10:13 am)
Re: [git pull] scheduler fixes, Linus Torvalds, (Tue May 13, 10:22 am)
Re: [git pull] scheduler fixes, Ingo Molnar, (Tue May 13, 2:05 pm)