direct-io.hg
changeset 4490:0c8a248ff045
bitkeeper revision 1.1277 (4252ee15v_vM4lEAiIMg1kGS6iC-vw)
Merge http://xen-ia64.bkbits.net/xeno-unstable-ia64.bk
into sportsman.spdomain:/home/djm/xeno-unstable-ia64.bk
Merge http://xen-ia64.bkbits.net/xeno-unstable-ia64.bk
into sportsman.spdomain:/home/djm/xeno-unstable-ia64.bk
author | djm@sportsman.spdomain |
---|---|
date | Tue Apr 05 19:59:15 2005 +0000 (2005-04-05) |
parents | 927255a97d41 69b60ce3f2dc |
children | 28c4d8ceff3c 08cf72b95611 c59636548615 |
files | .rootkeys linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c tools/xentrace/formats tools/xentrace/xentrace_format xen/common/dom0_ops.c xen/common/dom_mem_ops.c xen/common/domain.c xen/common/grant_table.c xen/common/page_alloc.c xen/common/schedule.c xen/include/asm-ia64/shadow.h xen/include/asm-x86/shadow.h xen/include/public/dom0_ops.h xen/include/xen/perfc.h xen/include/xen/shadow.h |
line diff
1.1 --- a/.rootkeys Tue Apr 05 16:45:36 2005 +0000 1.2 +++ b/.rootkeys Tue Apr 05 19:59:15 2005 +0000 1.3 @@ -1293,7 +1293,6 @@ 421098b72bPUyviWloEAIB85dGCm2Q xen/inclu 1.4 421098b7Z6OwjZnrTZkh34DoDfcjrA xen/include/asm-ia64/regionreg.h 1.5 421098b707cY5YluUcWK5Pc-71ETVw xen/include/asm-ia64/regs.h 1.6 4214e2f3fbO_n9Z1kIcBR83d7W4OJw xen/include/asm-ia64/serial.h 1.7 -421098b7czhvyPGFa5nskL0N4vNvFw xen/include/asm-ia64/shadow.h 1.8 421098b7GkWOnlzSmPvNAhByOSZ1Dw xen/include/asm-ia64/time.h 1.9 421098b7FK3xgShpnH0I0Ou3O4fJ2Q xen/include/asm-ia64/tlb.h 1.10 421098b78IGdFOGUlPmpS7h_QBmoFg xen/include/asm-ia64/vcpu.h 1.11 @@ -1421,6 +1420,7 @@ 3e4540ccU1sgCx8seIMGlahmMfv7yQ xen/inclu 1.12 40589969nPq3DMzv24RDb5LXE9brHw xen/include/xen/sched-if.h 1.13 3ddb79c0LzqqS0LhAQ50ekgj4oGl7Q xen/include/xen/sched.h 1.14 403a06a7H0hpHcKpAiDe5BPnaXWTlA xen/include/xen/serial.h 1.15 +4252c315hw0xXYMKIfFzhomi1M1yNA xen/include/xen/shadow.h 1.16 3ddb79c14dXIhP7C2ahnoD08K90G_w xen/include/xen/slab.h 1.17 3ddb79c09xbS-xxfKxuV3JETIhBzmg xen/include/xen/smp.h 1.18 3ddb79c1Vi5VleJAOKHAlY0G2zAsgw xen/include/xen/softirq.h
2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c Tue Apr 05 16:45:36 2005 +0000 2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c Tue Apr 05 19:59:15 2005 +0000 2.3 @@ -410,6 +410,9 @@ static inline void do_timer_interrupt(in 2.4 ((s64)cur_timer->get_offset() * (s64)NSEC_PER_USEC), 2.5 processed_system_time, 2.6 per_cpu(processed_system_time, cpu)); 2.7 + for (cpu = 0; cpu < num_online_cpus(); cpu++) 2.8 + printk(" %d: %lld\n", cpu, 2.9 + per_cpu(processed_system_time, cpu)); 2.10 return; 2.11 } 2.12
3.1 --- a/tools/xentrace/formats Tue Apr 05 16:45:36 2005 +0000 3.2 +++ b/tools/xentrace/formats Tue Apr 05 19:59:15 2005 +0000 3.3 @@ -1,35 +1,34 @@ 3.4 -0x00010000 CPU%(cpu)d %(tsc).6f sched_add_domain(0x%(3)08x) [ dom id = 0x%(2)08x ] 3.5 -0x00010001 CPU%(cpu)d %(tsc).6f sched_rem_domain(0x%08(3)x) [ dom id = 0x%(2)08x ] 3.6 -0x00010002 CPU%(cpu)d %(tsc).6f __wake_up(0x%(3)08x) [ dom id = 0x%(2)08x ] 3.7 -0x00010003 CPU%(cpu)d %(tsc).6f do_block() [ current = 0x%(2)08x ] 3.8 -0x00010004 CPU%(cpu)d %(tsc).6f do_yield() [ current = %(2)08x ] 3.9 -0x00010005 CPU%(cpu)d %(tsc).6f do_set_timer_op(0x%(4)08x, 0x%(5)08x) [ current = 0x%(3)08x ] 3.10 -0x00010006 CPU%(cpu)d %(tsc).6f sched_ctl(0x%(1)08x) 3.11 -0x00010007 CPU%(cpu)d %(tsc).6f sched_adjdom(params) [ dom id = 0x%(2)08x ] 3.12 -0x00010008 CPU%(cpu)d %(tsc).6f __reschedule(0x%(3)08x) [ dom id = 0x(2)08x ] 3.13 -0x00010009 CPU%(cpu)d %(tsc).6f switching to task_struct 0x%(1)08x [ dom id = 0x%(1)x ] 3.14 -0x0001000A CPU%(cpu)d %(tsc).6f s_timer_fn(unused) 3.15 -0x0001000B CPU%(cpu)d %(tsc).6f t_timer_fn(unused) 3.16 -0x0001000C CPU%(cpu)d %(tsc).6f dom_timer_fn(data) 3.17 -0x0001000D CPU%(cpu)d %(tsc).6f fallback_timer_fn(unused) 3.18 +0x00010000 CPU%(cpu)d %(tsc)d sched_add_domain [ domid = 0x%(1)08x, edomid = 0x%(2)08x ] 3.19 +0x00010001 CPU%(cpu)d %(tsc)d sched_rem_domain [ domid = 0x%(1)08x, edomid = 0x%(2)08x ] 3.20 +0x00010002 CPU%(cpu)d %(tsc)d domain_sleep [ domid = 0x%(1)08x, edomid = 0x%(2)08x ] 3.21 +0x00010003 CPU%(cpu)d %(tsc)d domain_wake [ domid = 0x%(1)08x, edomid = 0x%(2)08x ] 3.22 +0x00010004 CPU%(cpu)d %(tsc)d do_yield [ domid = 0x%(1)08x, edomid = 0x%(2)08x ] 3.23 +0x00010005 CPU%(cpu)d %(tsc)d do_block [ domid = 0x%(1)08x, edomid = 0x%(2)08x ] 3.24 +0x00010006 CPU%(cpu)d %(tsc)d domain_shutdown [ domid = 0x%(1)08x, edomid = 0x%(2)08x, reason = 0x%(3)08x ] 3.25 +0x00010007 CPU%(cpu)d %(tsc)d sched_ctl 3.26 +0x00010008 CPU%(cpu)d %(tsc)d sched_adjdom [ domid = 0x%(1)08x ] 3.27 +0x00010009 CPU%(cpu)d %(tsc)d __enter_scheduler [ prev<domid:edomid> = 0x%(1)08x : 0x%(2)08x, next<domid:edomid> = 0x%(3)08x : 0x%(4)08x ] 3.28 +0x0001000A CPU%(cpu)d %(tsc)d s_timer_fn 3.29 +0x0001000B CPU%(cpu)d %(tsc)d t_timer_fn 3.30 +0x0001000C CPU%(cpu)d %(tsc)d dom_timer_fn 3.31 3.32 3.33 -0x00020008 CPU%(cpu)d %(tsc).6f enter: dom0_create_dom ( ) 3.34 -0x00030008 CPU%(cpu)d %(tsc).6f leave: dom0_create_dom ( ) 3.35 - 3.36 -0x00020009 CPU%(cpu)d %(tsc).6f enter: dom0_destroy_dom ( dom=0x%(2)x ) 3.37 -0x00030009 CPU%(cpu)d %(tsc).6f leave: dom0_destroy_dom ( dom=0x%(2)x ) = %(1)d 3.38 +0x00020008 CPU%(cpu)d %(tsc)d enter: dom0_create_dom 3.39 +0x00030008 CPU%(cpu)d %(tsc)d leave: dom0_create_dom 3.40 +0x00020009 CPU%(cpu)d %(tsc)d enter: dom0_destroy_dom 3.41 +0x00030009 CPU%(cpu)d %(tsc)d leave: dom0_destroy_dom 3.42 +0x0002000A CPU%(cpu)d %(tsc)d enter: dom0_start_dom 3.43 +0x0003000A CPU%(cpu)d %(tsc)d leave: dom0_start_dom 3.44 +0x0002000B CPU%(cpu)d %(tsc)d enter: dom0_stop_dom 3.45 +0x0003000B CPU%(cpu)d %(tsc)d leave: dom0_stop_dom 3.46 +0x0002000C CPU%(cpu)d %(tsc)d enter: dom0_getinfo 3.47 +0x0003000C CPU%(cpu)d %(tsc)d leave: dom0_getinfo 3.48 +0x0002000D CPU%(cpu)d %(tsc)d enter: dom0_build 3.49 +0x0003000D CPU%(cpu)d %(tsc)d leave: dom0_build 3.50 +0x00020019 CPU%(cpu)d %(tsc)d enter: dom0_shadow_op 3.51 +0x00030019 CPU%(cpu)d %(tsc)d leave: dom0_shadow_op 3.52 3.53 -0x0002000A CPU%(cpu)d %(tsc).6f enter: dom0_start_dom ( dom=0x%(2)x ) 3.54 -0x0003000A CPU%(cpu)d %(tsc).6f leave: dom0_start_dom ( dom=0x%(2)x ) = %(1)d 3.55 -0x0002000B CPU%(cpu)d %(tsc).6f enter: dom0_stop_dom ( dom=0x%(2)x ) 3.56 -0x0003000B CPU%(cpu)d %(tsc).6f leave: dom0_stop_dom ( dom=0x%(2)x ) = %(1)d 3.57 -0x0002000C CPU%(cpu)d %(tsc).6f enter: dom0_getinfo ( dom=0x%(2)x ) 3.58 -0x0003000C CPU%(cpu)d %(tsc).6f leave: dom0_getinfo ( dom=0x%(2)x ) = %(1)d 3.59 -0x0002000D CPU%(cpu)d %(tsc).6f enter: dom0_build ( dom=0x%(2)x ) 3.60 -0x0003000D CPU%(cpu)d %(tsc).6f leave: dom0_build ( dom=0x%(2)x ) = %(1)d 3.61 3.62 -0x00020019 CPU%(cpu)d %(tsc).6f enter: dom0_shadow_op ( dom=0x%(2)x, %(3)d ) 3.63 -0x00030019 CPU%(cpu)d %(tsc).6f leave: dom0_shadow_op ( dom=0x%(2)x, %(3)d ) = %(1)d 3.64 - 3.65 -#0x0 CPU%(cpu)d %(tsc).6f %(event)x 3.66 +0x00040001 CPU%(cpu)d %(tsc)d VMX_VMEXIT [ domid = 0x%(1)08x, eip = 0x%(2)08x, reason = 0x%(3)08x ] 3.67 +0x00040002 CPU%(cpu)d %(tsc)d VMX_VECTOR [ domid = 0x%(1)08x, eip = 0x%(2)08x, vector = 0x%(3)08x ] 3.68 +0x00040003 CPU%(cpu)d %(tsc)d VMX_INT [ domid = 0x%(1)08x, trap = 0x%(2)08x, va = 0x%(3)08x ] 3.69 \ No newline at end of file
4.1 --- a/tools/xentrace/xentrace_format Tue Apr 05 16:45:36 2005 +0000 4.2 +++ b/tools/xentrace/xentrace_format Tue Apr 05 19:59:15 2005 +0000 4.3 @@ -75,8 +75,6 @@ try: 4.4 except getopt.GetoptError: 4.5 usage() 4.6 4.7 -print mhz 4.8 - 4.9 signal.signal(signal.SIGTERM, sighand) 4.10 signal.signal(signal.SIGHUP, sighand) 4.11 signal.signal(signal.SIGINT, sighand) 4.12 @@ -85,8 +83,6 @@ interrupted = 0 4.13 4.14 defs = read_defs(arg[0]) 4.15 4.16 -print defs 4.17 - 4.18 # structure of trace record + prepended CPU id (as output by xentrace): 4.19 # CPU(I) TSC(Q) EVENT(L) D1(L) D2(L) D3(L) D4(L) D5(L) 4.20 TRCREC = "IQLLLLLL"
5.1 --- a/xen/common/dom0_ops.c Tue Apr 05 16:45:36 2005 +0000 5.2 +++ b/xen/common/dom0_ops.c Tue Apr 05 19:59:15 2005 +0000 5.3 @@ -17,7 +17,6 @@ 5.4 #include <xen/trace.h> 5.5 #include <xen/console.h> 5.6 #include <xen/physdev.h> 5.7 -#include <asm/shadow.h> 5.8 #include <public/sched_ctl.h> 5.9 5.10 #define TRC_DOM0OP_ENTER_BASE 0x00020000 5.11 @@ -105,10 +104,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) 5.12 if ( op->interface_version != DOM0_INTERFACE_VERSION ) 5.13 return -EACCES; 5.14 5.15 - TRACE_5D(TRC_DOM0OP_ENTER_BASE + op->cmd, 5.16 - 0, op->u.dummy[0], op->u.dummy[1], 5.17 - op->u.dummy[2], op->u.dummy[3] ); 5.18 - 5.19 switch ( op->cmd ) 5.20 { 5.21 5.22 @@ -472,10 +467,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) 5.23 5.24 } 5.25 5.26 - TRACE_5D(TRC_DOM0OP_LEAVE_BASE + op->cmd, ret, 5.27 - op->u.dummy[0], op->u.dummy[1], op->u.dummy[2], op->u.dummy[3]); 5.28 - 5.29 - 5.30 return ret; 5.31 } 5.32
6.1 --- a/xen/common/dom_mem_ops.c Tue Apr 05 16:45:36 2005 +0000 6.2 +++ b/xen/common/dom_mem_ops.c Tue Apr 05 19:59:15 2005 +0000 6.3 @@ -13,8 +13,8 @@ 6.4 #include <xen/perfc.h> 6.5 #include <xen/sched.h> 6.6 #include <xen/event.h> 6.7 +#include <xen/shadow.h> 6.8 #include <asm/domain_page.h> 6.9 -#include <asm/shadow.h> 6.10 6.11 /* 6.12 * To allow safe resume of do_dom_mem_op() after preemption, we need to know 6.13 @@ -112,26 +112,7 @@ free_dom_mem(struct domain *d, 6.14 if ( test_and_clear_bit(_PGC_allocated, &page->count_info) ) 6.15 put_page(page); 6.16 6.17 - if ( unlikely(shadow_mode_enabled(d)) ) 6.18 - { 6.19 - // XXX This needs more thought. This isn't pretty, 6.20 - // and it's not fast. But it's a place holder. 6.21 - // 6.22 - shadow_lock(d); 6.23 - if ( page_out_of_sync(page) ) 6.24 - __shadow_sync_mfn(d, mpfn + j); 6.25 - shadow_remove_all_access(d, mpfn + j); 6.26 - 6.27 - if (page->count_info != 1) 6.28 - { 6.29 - printk("free_dom_mem in shadow mode didn't release page " 6.30 - "mfn=%p c=%p\n", mpfn+j, page->count_info); 6.31 - shadow_unlock(d); 6.32 - audit_domain(d); 6.33 - BUG(); 6.34 - } 6.35 - shadow_unlock(d); 6.36 - } 6.37 + shadow_sync_and_drop_references(d, page); 6.38 6.39 put_page(page); 6.40 }
7.1 --- a/xen/common/domain.c Tue Apr 05 16:45:36 2005 +0000 7.2 +++ b/xen/common/domain.c Tue Apr 05 19:59:15 2005 +0000 7.3 @@ -15,7 +15,6 @@ 7.4 #include <xen/time.h> 7.5 #include <xen/console.h> 7.6 #include <xen/softirq.h> 7.7 -#include <asm/shadow.h> 7.8 #include <public/dom0_ops.h> 7.9 #include <asm/domain_page.h> 7.10 #include <asm/debugger.h>
8.1 --- a/xen/common/grant_table.c Tue Apr 05 16:45:36 2005 +0000 8.2 +++ b/xen/common/grant_table.c Tue Apr 05 19:59:15 2005 +0000 8.3 @@ -27,8 +27,8 @@ 8.4 8.5 #include <xen/config.h> 8.6 #include <xen/sched.h> 8.7 -#include <asm/mm.h> 8.8 -#include <asm/shadow.h> 8.9 +#include <xen/shadow.h> 8.10 +#include <xen/mm.h> 8.11 8.12 #define PIN_FAIL(_lbl, _rc, _f, _a...) \ 8.13 do { \
9.1 --- a/xen/common/page_alloc.c Tue Apr 05 16:45:36 2005 +0000 9.2 +++ b/xen/common/page_alloc.c Tue Apr 05 19:59:15 2005 +0000 9.3 @@ -30,9 +30,9 @@ 9.4 #include <xen/slab.h> 9.5 #include <xen/irq.h> 9.6 #include <xen/softirq.h> 9.7 +#include <xen/shadow.h> 9.8 #include <asm/domain_page.h> 9.9 #include <asm/page.h> 9.10 -#include <asm/shadow.h> 9.11 9.12 /* 9.13 * Comma-separated list of hexadecimal page numbers containing bad bytes. 9.14 @@ -561,22 +561,7 @@ void free_domheap_pages(struct pfn_info 9.15 9.16 for ( i = 0; i < (1 << order); i++ ) 9.17 { 9.18 - if ( ((pg[i].u.inuse.type_info & PGT_count_mask) != 0) && 9.19 - shadow_mode_enabled(d) ) 9.20 - { 9.21 - // XXX This needs more thought... 9.22 - // 9.23 - printk("%s: needing to call shadow_remove_all_access for mfn=%p\n", 9.24 - __func__, page_to_pfn(&pg[i])); 9.25 - printk("Amfn=%p c=%p t=%p\n", page_to_pfn(&pg[i]), 9.26 - pg[i].count_info, pg[i].u.inuse.type_info); 9.27 - shadow_lock(d); 9.28 - shadow_remove_all_access(d, page_to_pfn(&pg[i])); 9.29 - shadow_unlock(d); 9.30 - printk("Bmfn=%p c=%p t=%p\n", page_to_pfn(&pg[i]), 9.31 - pg[i].count_info, pg[i].u.inuse.type_info); 9.32 - } 9.33 - 9.34 + shadow_drop_references(d, &pg[i]); 9.35 ASSERT((pg[i].u.inuse.type_info & PGT_count_mask) == 0); 9.36 pg[i].tlbflush_timestamp = tlbflush_current_time(); 9.37 pg[i].u.free.cpu_mask = d->cpuset;
10.1 --- a/xen/common/schedule.c Tue Apr 05 16:45:36 2005 +0000 10.2 +++ b/xen/common/schedule.c Tue Apr 05 19:59:15 2005 +0000 10.3 @@ -48,13 +48,13 @@ string_param("sched", opt_sched); 10.4 */ 10.5 #define TRC_SCHED_DOM_ADD 0x00010000 10.6 #define TRC_SCHED_DOM_REM 0x00010001 10.7 -#define TRC_SCHED_WAKE 0x00010002 10.8 -#define TRC_SCHED_BLOCK 0x00010003 10.9 +#define TRC_SCHED_SLEEP 0x00010002 10.10 +#define TRC_SCHED_WAKE 0x00010003 10.11 #define TRC_SCHED_YIELD 0x00010004 10.12 -#define TRC_SCHED_SET_TIMER 0x00010005 10.13 -#define TRC_SCHED_CTL 0x00010006 10.14 -#define TRC_SCHED_ADJDOM 0x00010007 10.15 -#define TRC_SCHED_RESCHED 0x00010008 10.16 +#define TRC_SCHED_BLOCK 0x00010005 10.17 +#define TRC_SCHED_SHUTDOWN 0x00010006 10.18 +#define TRC_SCHED_CTL 0x00010007 10.19 +#define TRC_SCHED_ADJDOM 0x00010008 10.20 #define TRC_SCHED_SWITCH 0x00010009 10.21 #define TRC_SCHED_S_TIMER_FN 0x0001000A 10.22 #define TRC_SCHED_T_TIMER_FN 0x0001000B 10.23 @@ -186,15 +186,14 @@ void sched_add_domain(struct exec_domain 10.24 } 10.25 10.26 SCHED_OP(add_task, ed); 10.27 - 10.28 - TRACE_2D(TRC_SCHED_DOM_ADD, d->id, ed); 10.29 + TRACE_2D(TRC_SCHED_DOM_ADD, d->id, ed->eid); 10.30 } 10.31 10.32 void sched_rem_domain(struct exec_domain *ed) 10.33 { 10.34 rem_ac_timer(&ed->timer); 10.35 SCHED_OP(rem_task, ed); 10.36 - TRACE_3D(TRC_SCHED_DOM_REM, ed->domain->id, ed->eid, ed); 10.37 + TRACE_2D(TRC_SCHED_DOM_REM, ed->domain->id, ed->eid); 10.38 } 10.39 10.40 void init_idle_task(void) 10.41 @@ -203,19 +202,19 @@ void init_idle_task(void) 10.42 BUG(); 10.43 } 10.44 10.45 -void domain_sleep(struct exec_domain *d) 10.46 +void domain_sleep(struct exec_domain *ed) 10.47 { 10.48 unsigned long flags; 10.49 10.50 - spin_lock_irqsave(&schedule_data[d->processor].schedule_lock, flags); 10.51 + spin_lock_irqsave(&schedule_data[ed->processor].schedule_lock, flags); 10.52 + if ( likely(!domain_runnable(ed)) ) 10.53 + SCHED_OP(sleep, ed); 10.54 + spin_unlock_irqrestore(&schedule_data[ed->processor].schedule_lock, flags); 10.55 10.56 - if ( likely(!domain_runnable(d)) ) 10.57 - SCHED_OP(sleep, d); 10.58 - 10.59 - spin_unlock_irqrestore(&schedule_data[d->processor].schedule_lock, flags); 10.60 + TRACE_2D(TRC_SCHED_SLEEP, ed->domain->id, ed->eid); 10.61 10.62 /* Synchronous. */ 10.63 - while ( test_bit(EDF_RUNNING, &d->ed_flags) && !domain_runnable(d) ) 10.64 + while ( test_bit(EDF_RUNNING, &ed->ed_flags) && !domain_runnable(ed) ) 10.65 cpu_relax(); 10.66 } 10.67 10.68 @@ -224,19 +223,17 @@ void domain_wake(struct exec_domain *ed) 10.69 unsigned long flags; 10.70 10.71 spin_lock_irqsave(&schedule_data[ed->processor].schedule_lock, flags); 10.72 - 10.73 if ( likely(domain_runnable(ed)) ) 10.74 { 10.75 - TRACE_2D(TRC_SCHED_WAKE, ed->domain->id, ed); 10.76 SCHED_OP(wake, ed); 10.77 #ifdef WAKE_HISTO 10.78 ed->wokenup = NOW(); 10.79 #endif 10.80 } 10.81 - 10.82 clear_bit(EDF_MIGRATED, &ed->ed_flags); 10.83 - 10.84 spin_unlock_irqrestore(&schedule_data[ed->processor].schedule_lock, flags); 10.85 + 10.86 + TRACE_2D(TRC_SCHED_WAKE, ed->domain->id, ed->eid); 10.87 } 10.88 10.89 /* Block the currently-executing domain until a pertinent event occurs. */ 10.90 @@ -244,8 +241,6 @@ long do_block(void) 10.91 { 10.92 struct exec_domain *ed = current; 10.93 10.94 - TRACE_2D(TRC_SCHED_BLOCK, ed->domain->id, ed); 10.95 - 10.96 ed->vcpu_info->evtchn_upcall_mask = 0; 10.97 set_bit(EDF_BLOCKED, &ed->ed_flags); 10.98 10.99 @@ -253,7 +248,10 @@ long do_block(void) 10.100 if ( event_pending(ed) ) 10.101 clear_bit(EDF_BLOCKED, &ed->ed_flags); 10.102 else 10.103 + { 10.104 + TRACE_2D(TRC_SCHED_BLOCK, ed->domain->id, ed->eid); 10.105 __enter_scheduler(); 10.106 + } 10.107 10.108 return 0; 10.109 } 10.110 @@ -261,7 +259,7 @@ long do_block(void) 10.111 /* Voluntarily yield the processor for this allocation. */ 10.112 static long do_yield(void) 10.113 { 10.114 - TRACE_2D(TRC_SCHED_YIELD, current->domain->id, current); 10.115 + TRACE_2D(TRC_SCHED_YIELD, current->domain->id, current->eid); 10.116 __enter_scheduler(); 10.117 return 0; 10.118 } 10.119 @@ -290,6 +288,8 @@ long do_sched_op(unsigned long op) 10.120 10.121 case SCHEDOP_shutdown: 10.122 { 10.123 + TRACE_3D(TRC_SCHED_SHUTDOWN, current->domain->id, current->eid, 10.124 + (op >> SCHEDOP_reasonshift)); 10.125 domain_shutdown((u8)(op >> SCHEDOP_reasonshift)); 10.126 break; 10.127 } 10.128 @@ -322,12 +322,12 @@ int sched_id() 10.129 10.130 long sched_ctl(struct sched_ctl_cmd *cmd) 10.131 { 10.132 - TRACE_0D(TRC_SCHED_CTL); 10.133 - 10.134 if ( cmd->sched_id != ops.sched_id ) 10.135 return -EINVAL; 10.136 10.137 - return SCHED_OP(control, cmd); 10.138 + SCHED_OP(control, cmd); 10.139 + TRACE_0D(TRC_SCHED_CTL); 10.140 + return 0; 10.141 } 10.142 10.143 10.144 @@ -346,12 +346,11 @@ long sched_adjdom(struct sched_adjdom_cm 10.145 if ( d == NULL ) 10.146 return -ESRCH; 10.147 10.148 - TRACE_1D(TRC_SCHED_ADJDOM, d->id); 10.149 - 10.150 spin_lock_irq(&schedule_data[d->exec_domain[0]->processor].schedule_lock); 10.151 SCHED_OP(adjdom, d, cmd); 10.152 spin_unlock_irq(&schedule_data[d->exec_domain[0]->processor].schedule_lock); 10.153 10.154 + TRACE_1D(TRC_SCHED_ADJDOM, d->id); 10.155 put_domain(d); 10.156 return 0; 10.157 } 10.158 @@ -423,8 +422,6 @@ static void __enter_scheduler(void) 10.159 } 10.160 #endif 10.161 10.162 - TRACE_2D(TRC_SCHED_SWITCH, next->domain->id, next); 10.163 - 10.164 prev->sleep_tick = schedule_data[cpu].tick; 10.165 10.166 /* Ensure that the domain has an up-to-date time base. */ 10.167 @@ -435,6 +432,10 @@ static void __enter_scheduler(void) 10.168 send_guest_virq(next, VIRQ_TIMER); 10.169 } 10.170 10.171 + TRACE_4D(TRC_SCHED_SWITCH, 10.172 + prev->domain->id, prev->eid, 10.173 + next->domain->id, next->eid); 10.174 + 10.175 context_switch(prev, next); 10.176 } 10.177 10.178 @@ -456,7 +457,6 @@ int idle_cpu(int cpu) 10.179 /* The scheduler timer: force a run through the scheduler */ 10.180 static void s_timer_fn(unsigned long unused) 10.181 { 10.182 - TRACE_0D(TRC_SCHED_S_TIMER_FN); 10.183 raise_softirq(SCHEDULE_SOFTIRQ); 10.184 perfc_incrc(sched_irq); 10.185 } 10.186 @@ -467,8 +467,6 @@ static void t_timer_fn(unsigned long unu 10.187 struct exec_domain *ed = current; 10.188 unsigned int cpu = ed->processor; 10.189 10.190 - TRACE_0D(TRC_SCHED_T_TIMER_FN); 10.191 - 10.192 schedule_data[cpu].tick++; 10.193 10.194 if ( !is_idle_task(ed->domain) ) 10.195 @@ -488,8 +486,6 @@ static void dom_timer_fn(unsigned long d 10.196 { 10.197 struct exec_domain *ed = (struct exec_domain *)data; 10.198 10.199 - TRACE_0D(TRC_SCHED_DOM_TIMER_FN); 10.200 - 10.201 update_dom_time(ed); 10.202 send_guest_virq(ed, VIRQ_TIMER); 10.203 }
11.1 --- a/xen/include/asm-ia64/shadow.h Tue Apr 05 16:45:36 2005 +0000 11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 11.3 @@ -1,3 +0,0 @@ 11.4 - 11.5 -#define shadow_lock_init(d) do {} while(0) 11.6 -#define shadow_mode_init(d) do {} while(0)
12.1 --- a/xen/include/asm-x86/shadow.h Tue Apr 05 16:45:36 2005 +0000 12.2 +++ b/xen/include/asm-x86/shadow.h Tue Apr 05 19:59:15 2005 +0000 12.3 @@ -377,6 +377,52 @@ update_hl2e(struct exec_domain *ed, unsi 12.4 } 12.5 } 12.6 12.7 +static inline void shadow_drop_references( 12.8 + struct domain *d, struct pfn_info *page) 12.9 +{ 12.10 + if ( likely(!shadow_mode_enabled(d)) || 12.11 + ((page->u.inuse.type_info & PGT_count_mask) == 0) ) 12.12 + return; 12.13 + 12.14 + /* XXX This needs more thought... */ 12.15 + printk("%s: needing to call shadow_remove_all_access for mfn=%p\n", 12.16 + __func__, page_to_pfn(page)); 12.17 + printk("Before: mfn=%p c=%p t=%p\n", page_to_pfn(page), 12.18 + page->count_info, page->u.inuse.type_info); 12.19 + 12.20 + shadow_lock(d); 12.21 + shadow_remove_all_access(d, page_to_pfn(page)); 12.22 + shadow_unlock(d); 12.23 + 12.24 + printk("After: mfn=%p c=%p t=%p\n", page_to_pfn(page), 12.25 + page->count_info, page->u.inuse.type_info); 12.26 +} 12.27 + 12.28 +static inline void shadow_sync_and_drop_references( 12.29 + struct domain *d, struct pfn_info *page) 12.30 +{ 12.31 + if ( likely(!shadow_mode_enabled(d)) ) 12.32 + return; 12.33 + 12.34 + /* XXX Needs more thought. Neither pretty nor fast: a place holder. */ 12.35 + shadow_lock(d); 12.36 + 12.37 + if ( page_out_of_sync(page) ) 12.38 + __shadow_sync_mfn(d, page_to_pfn(page)); 12.39 + 12.40 + shadow_remove_all_access(d, page_to_pfn(page)); 12.41 + 12.42 + if ( page->count_info != 1 ) 12.43 + { 12.44 + printk("free_dom_mem in shadow mode didn't release page " 12.45 + "mfn=%p c=%p\n", page_to_pfn(page), page->count_info); 12.46 + shadow_unlock(d); 12.47 + audit_domain(d); 12.48 + BUG(); 12.49 + } 12.50 + 12.51 + shadow_unlock(d); 12.52 +} 12.53 12.54 /************************************************************************/ 12.55
13.1 --- a/xen/include/public/dom0_ops.h Tue Apr 05 16:45:36 2005 +0000 13.2 +++ b/xen/include/public/dom0_ops.h Tue Apr 05 19:59:15 2005 +0000 13.3 @@ -371,19 +371,19 @@ typedef struct { 13.4 dom0_setdomaininfo_t setdomaininfo; 13.5 dom0_getdomaininfo_t getdomaininfo; 13.6 dom0_getpageframeinfo_t getpageframeinfo; 13.7 - dom0_msr_t msr; 13.8 - dom0_debug_t debug; 13.9 - dom0_settime_t settime; 13.10 - dom0_readconsole_t readconsole; 13.11 - dom0_pincpudomain_t pincpudomain; 13.12 + dom0_msr_t msr; 13.13 + dom0_debug_t debug; 13.14 + dom0_settime_t settime; 13.15 + dom0_readconsole_t readconsole; 13.16 + dom0_pincpudomain_t pincpudomain; 13.17 dom0_gettbufs_t gettbufs; 13.18 dom0_physinfo_t physinfo; 13.19 dom0_pcidev_access_t pcidev_access; 13.20 dom0_sched_id_t sched_id; 13.21 - dom0_shadow_control_t shadow_control; 13.22 - dom0_setdomaininitialmem_t setdomaininitialmem; 13.23 - dom0_setdomainmaxmem_t setdomainmaxmem; 13.24 - dom0_getpageframeinfo2_t getpageframeinfo2; 13.25 + dom0_shadow_control_t shadow_control; 13.26 + dom0_setdomaininitialmem_t setdomaininitialmem; 13.27 + dom0_setdomainmaxmem_t setdomainmaxmem; 13.28 + dom0_getpageframeinfo2_t getpageframeinfo2; 13.29 dom0_add_memtype_t add_memtype; 13.30 dom0_del_memtype_t del_memtype; 13.31 dom0_read_memtype_t read_memtype;
14.1 --- a/xen/include/xen/perfc.h Tue Apr 05 16:45:36 2005 +0000 14.2 +++ b/xen/include/xen/perfc.h Tue Apr 05 19:59:15 2005 +0000 14.3 @@ -111,7 +111,9 @@ extern struct perfcounter perfcounters; 14.4 #define perfc_incr(x) ((void)0) 14.5 #define perfc_decr(x) ((void)0) 14.6 #define perfc_incrc(x) ((void)0) 14.7 +#define perfc_decrc(x) ((void)0) 14.8 #define perfc_incra(x,y) ((void)0) 14.9 +#define perfc_decra(x,y) ((void)0) 14.10 #define perfc_add(x,y) ((void)0) 14.11 #define perfc_addc(x,y) ((void)0) 14.12 #define perfc_adda(x,y,z) ((void)0)
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 15.2 +++ b/xen/include/xen/shadow.h Tue Apr 05 19:59:15 2005 +0000 15.3 @@ -0,0 +1,18 @@ 15.4 + 15.5 +#ifndef __XEN_SHADOW_H__ 15.6 +#define __XEN_SHADOW_H__ 15.7 + 15.8 +#include <xen/config.h> 15.9 + 15.10 +#ifdef CONFIG_X86 15.11 + 15.12 +#include <asm/shadow.h> 15.13 + 15.14 +#else 15.15 + 15.16 +#define shadow_drop_references(_d, _p) ((void)0) 15.17 +#define shadow_sync_and_drop_references(_d, _p) ((void)0) 15.18 + 15.19 +#endif 15.20 + 15.21 +#endif /* __XEN_SHADOW_H__ */