Re: [PATCH 1/5] user_hooks: New user hooks subsystem

From: Frederic Weisbecker
Date: Wed Aug 01 2012 - 08:28:24 EST


On Tue, Jul 31, 2012 at 06:14:22PM +0200, Peter Zijlstra wrote:
> On Tue, 2012-07-31 at 16:57 +0200, Ingo Molnar wrote:
> >
> > 'callback', while a longer word, is almost always used as a noun
> > within the kernel - and it also has a pretty narrow meaning.
>
> An altogether different naming would be something like:
>
> struct user_kernel_tracking {
> int want_uk_tracking;
> enum {
> in_kernel = 0,
> in_user,
> } uk_state;
> };
>
>

You bet we might also extend this to track guest as well in the future
because it appears that we could also enter into RCU extended quiescent
state when we run in guest.

So we probably need to generalize a bit more. Some naming based on
"code domain"?

struct code_domain {
int is_tracking;
enum {
in_kernel,
in_user,
in_guest
} state;
}

--
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/