Messages in this thread | | | Subject | Re: [PATCH 1/2] SCHED: Generic hooks for trapping task preemption | From | Rusty Russell <> | Date | Thu, 12 Jul 2007 12:56:58 +1000 |
| |
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/
| |