Re: [GIT PULL] Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex

From: Linus Torvalds
Date: Wed Jun 15 2011 - 17:28:18 EST




"Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> wrote:
>
> The time will still be consumed, but in softirq
>context, though of course with many fewer context switches.

So the problem with threads goes way beyond just the context switches, or even just the problem with tracing.

Threads change the batching behavior, for example. That is *especially* true with background threads or with realtime threads. Both end up having high priority -either because they are realtime, or because they've been sleeping and thus have been building up extra priority that way.

So when you wake up such a thread, suddenly you get preemption behaviour, or you get the semaphores deciding to break out of their busy loops due to need_resched being set etc.

In contrast, softirqs don't have those kinds of side effects. They have a much smaller effect on system behavior and just run the code we ask them to.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/