Re: [git pull] scheduler fixes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matthew Wilcox
Date: Tuesday, May 13, 2008 - 8:28 am

On Tue, May 13, 2008 at 04:42:07PM +0200, Ingo Molnar wrote:

That might be the case for some users, but it isn't the case for XFS.
The first thing that each task does is grab a spinlock, so if you put as
much in flight as early as possible, you end up with horrible contention
on that spinlock.  I have no idea whether this is the common case for
multi-valued semaphores or not, it's just the only one I have data for.


I think the completion code is less optimised than the semaphore code
today.  Clearly the same question does arise, but I don't know what the
answer is for completion users either.

Let's do a quick survey.  drivers/net has 5 users:

3c527.c -- execution_cmd has a mutex held, so never more than one task
waiting anyway.  xceiver_cmd is called during open and close which I think
are serialised at a higher level.  In any case, no performance issue here.

iseries_veth.c -- grabs a spinlock soon after being woken.

plip.c -- called in close, no perf implication.

ppp_synctty.c -- called in close, no perf implication.

ps3_gelic_wireless.c - If this isn't serialised, it's buggy.


Maybe drivers/net is a bad example.  Let's look at */*.c:

as-iosched.c -- in exit path.
blk-barrier.c -- completion on stack, so only one waiter.
blk-exec.c -- ditto
cfq-iosched.c -- in exit path

crypto/api.c -- in init path
crypto/gcm.c -- in setkey path
crypto/tcrypt.c -- crypto testing.  Not a perf path.

fs/exec.c -- waiting for coredumps.
kernel/exit.c -- likewise
kernel/fork.c -- completion on stack
kernel/kmod.c -- completion on stack 
kernel/kthread.c -- kthread creation and deletion.  Shouldn't be a hot
path, plus this looks like there's only going to be one task waiting.
kernel/rcupdate.c -- one completion on stack, one synchronised by a mutex
kernel/rcutorture.c -- doesn't matter
kernel/sched.c -- both completions on stack
kernel/stop_machine.c -- completion on stack
kernel/sysctl.c -- completion on stack
kernel/workqueue.c -- completion on stack

lib/klist.c -- This one seems like it could potentially have lots of
waiters, if only anything actually used klists.

It seems like most users use completions where it'd be just as easy
to use a task pointer and call wake_up_task().  In any case, I think
there's no evidence one way or the other about how people are using
multi-sleeper completions.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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)