[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070711005514.GA29071@Krystal>
Date: Tue, 10 Jul 2007 20:55:14 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: Matt Mackall <mpm@...enic.com>
Cc: Nick Piggin <nickpiggin@...oo.com.au>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC] Thread Migration Preemption
* Matt Mackall (mpm@...enic.com) wrote:
> On Wed, Jul 11, 2007 at 10:02:23AM +1000, Nick Piggin wrote:
> > >I like this patch a lot. Even if we don't add the underlying mechanism
> > >right now, adding migration_disable as an alias for preempt_disable
> > >will much better document quite a number of the users.
> >
> > I'd have no problem with that, and it might make it easier in future to
> > justify a more complex scheme.
>
> What do you think, Mathieu?
>
That's an excellent idea. It should probably come with some
documentation explaining what difference should be expected between
preempt_disable and migrate_disable in the future so that people can
choose the right alternative for their code.
> Also, small nit: it ought to be migrate_disable to match the form of
> preempt_disable.
Yes, that's fine with me. :)
I though a little more about this whole concept of migrate_disable, and
I think it could be brought further. One of the main problems with per
cpu variables is that this concept cannot be ported to this grey place
called "user-space" because preemption cannot be disabled. The
equivalent (kind of) is currently per thread variables, but it can
consume a lot of space if many threads are running.
However, it could be possible, if we implement a vsyscall based
migration preemption counter accessible with read/write access from
user-space, to tie a thread to a CPU during a user-space critical path.
If we combine this with local atomic operations done in user-space, we
could have highly scalable access to per cpu data structures reentrant
with respect to signal handlers.
Mathieu
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
-
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