[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070723183319.GA28505@elte.hu>
Date: Mon, 23 Jul 2007 20:33:19 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC] Thread Migration Preemption
* Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> wrote:
> Thread Migration Preemption
>
> This patch adds the ability to protect critical sections from
> migration to another CPU without disabling preemption.
>
> This will be useful to minimize the amount of preemption disabling for
> the -rt patch. [...]
unfortunately this abstraction has a number of fundamental
disadvantages. (and hence the -rt patch does not make use of this
facility)
firstly, its effects on load-balancing are quite brutal: it disables
migration to another CPU, hence disturbing SMP load-balancing. It also
adds an unplannable O(N) overhead into the load-balancer.
secondly, it has similar problems as preempt_disable(): it's opaque (not
attached to a data structure) and thus it does not truly map the per-CPU
data structure in any explicit way. It's little more than a per-task BKL
for per-CPU data structures.
so in -rt we resisted the disable-migration approach from the early days
on and are using two approaches to 'map' per-cpu data structures to
PREEMPT_RT: firstly the use of PER_CPU_LOCKED data structures (which
attach a per-cpu sleeping lock to per_cpu() data structures) - these are
relatively easy first-approach conversions. As a second approach, if
performance matters, the use of true atomic data structures.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists