lkml.org 
[lkml]   [2007]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Thread Migration Preemption

* Mathieu Desnoyers <mathieu.desnoyers@polymtl.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-23 20:37    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site