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

Linus Torvalds
2011-06-15T21:28:09Z

"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> 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