[PATCH] sched: arch preempt notifier mechanism
This adds a general mechanism whereby a task can request the scheduler to notify it whenever it is preempted or scheduled back in. This allows the task to swap any special-purpose registers like the fpu or Intel's VT registers. Signed-off-by: Avi Kivity <avi@qumranet.com> [ mingo@elte.hu: fixes, cleanups ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
b47e8608a0
commit
e107be36ef
4 changed files with 123 additions and 2 deletions
|
@ -935,6 +935,11 @@ struct task_struct {
|
|||
struct sched_class *sched_class;
|
||||
struct sched_entity se;
|
||||
|
||||
#ifdef CONFIG_PREEMPT_NOTIFIERS
|
||||
/* list of struct preempt_notifier: */
|
||||
struct hlist_head preempt_notifiers;
|
||||
#endif
|
||||
|
||||
unsigned short ioprio;
|
||||
#ifdef CONFIG_BLK_DEV_IO_TRACE
|
||||
unsigned int btrace_seq;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue