This patch adds comments inside play_dead. This can be served as a notice to developers who will add code to this code path.
diff -r c5d121fd35c0 xen/arch/x86/domain.c --- a/xen/arch/x86/domain.c Mon Feb 28 16:55:20 2011 +0000 +++ b/xen/arch/x86/domain.c Tue Mar 01 16:03:40 2011 +0800
@@ -99,6 +99,14 @@ static void default_dead_idle(void) static void play_dead(void) { + /* + * Important note: + * After cpu_exit_clear, one can never assume per cpu variables are
+ * still accessable. Otherwise, #PF will happen. For example, calling to + * printk() will involve tasklet scheduling ,which also touches per cpu + * variables. + * Consider more carefully when adding code to this path.
+ */ cpu_exit_clear(smp_processor_id()); mb(); local_irq_disable();
add_warning_comment_for_play_dead.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|