direct-io.hg
changeset 9499:3838105ab03b
Various softirq cleanups:
1. Make __softirq_pending a long, since PPC borrows the file
hardirq.h from us and they only do atomic ops on longs.
2. do_softirq() explicitly takes a void param list.
3. Remove idle_timestamp field from irq_cpustat. It's unused
and lets us simplify the idle loop a little bit.
Part 1 based on a patch from Hollis Blanchard at IBM.
Signed-off-by: Keir Fraser <keir@xensource.com>
1. Make __softirq_pending a long, since PPC borrows the file
hardirq.h from us and they only do atomic ops on longs.
2. do_softirq() explicitly takes a void param list.
3. Remove idle_timestamp field from irq_cpustat. It's unused
and lets us simplify the idle loop a little bit.
Part 1 based on a patch from Hollis Blanchard at IBM.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Fri Mar 31 12:03:42 2006 +0100 (2006-03-31) |
parents | f6a7f2657ff3 |
children | 2769a38f0e3e |
files | xen/arch/x86/domain.c xen/common/softirq.c xen/include/asm-x86/hardirq.h |
line diff
1.1 --- a/xen/arch/x86/domain.c Fri Mar 31 11:04:42 2006 +0100 1.2 +++ b/xen/arch/x86/domain.c Fri Mar 31 12:03:42 2006 +0100 1.3 @@ -79,15 +79,12 @@ void idle_loop(void) 1.4 1.5 for ( ; ; ) 1.6 { 1.7 - irq_stat[cpu].idle_timestamp = jiffies; 1.8 + page_scrub_schedule_work(); 1.9 1.10 - while ( !softirq_pending(cpu) ) 1.11 - { 1.12 - page_scrub_schedule_work(); 1.13 - default_idle(); 1.14 - } 1.15 + default_idle(); 1.16 1.17 - do_softirq(); 1.18 + if ( softirq_pending(cpu) ) 1.19 + do_softirq(); 1.20 } 1.21 } 1.22
2.1 --- a/xen/common/softirq.c Fri Mar 31 11:04:42 2006 +0100 2.2 +++ b/xen/common/softirq.c Fri Mar 31 12:03:42 2006 +0100 2.3 @@ -21,9 +21,10 @@ irq_cpustat_t irq_stat[NR_CPUS]; 2.4 2.5 static softirq_handler softirq_handlers[NR_SOFTIRQS]; 2.6 2.7 -asmlinkage void do_softirq() 2.8 +asmlinkage void do_softirq(void) 2.9 { 2.10 - unsigned int i, pending, cpu = smp_processor_id(); 2.11 + unsigned int i, cpu = smp_processor_id(); 2.12 + unsigned long pending; 2.13 2.14 pending = softirq_pending(cpu); 2.15 ASSERT(pending != 0);
3.1 --- a/xen/include/asm-x86/hardirq.h Fri Mar 31 11:04:42 2006 +0100 3.2 +++ b/xen/include/asm-x86/hardirq.h Fri Mar 31 12:03:42 2006 +0100 3.3 @@ -5,10 +5,9 @@ 3.4 #include <xen/cache.h> 3.5 3.6 typedef struct { 3.7 - unsigned int __softirq_pending; 3.8 + unsigned long __softirq_pending; 3.9 unsigned int __local_irq_count; 3.10 unsigned int __nmi_count; 3.11 - unsigned long idle_timestamp; 3.12 } __cacheline_aligned irq_cpustat_t; 3.13 3.14 #include <xen/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */