lkml.org 
[lkml]   [2007]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] SCHED: Generic hooks for trapping task preemption
From
Date
On Wed, 2007-07-11 at 18:55 +0300, Avi Kivity wrote:
> +config PREEMPT_HOOKS
> + bool
> + depends on X86
> + default y

Hmm, I would have thought that having CONFIG_KVM "select PREEMPT_HOOKS"
would be a little clearer.

> +static void fire_sched_in_preempt_hooks(struct task_struct *tsk)
> +{
> + struct preempt_hook *hook;
> + struct hlist_node *node;
> +
> + hlist_for_each_entry(hook, node, &tsk->preempt_hooks, link)
> + hook->ops->sched_in(hook, raw_smp_processor_id());
> +}

The old current/tsk conflation. You hand in "tsk" here, but since
that's not handed through to the sched_in, it must be "current". It's
just unfortunate that this generates better code...

But patch looks good.

Cheers,
Rusty.

-
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-12 04:59    [W:0.035 / U:24.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site