x86: Avoid tripping watchdog when constructing dom0
PATCH 1/1 x86: Avoid tripping watchdog when constructing dom0
Constructing dom0 may take a few seconds, particularly if the slow VESA graphics terminal is used. Process pending softirqs a few times to avoid tripping a watchdog with a short timeout.
--- xen/arch/x86/domain_build.c | 6 ++++++ 1 file changed, 6 insertions(+)
xen/arch/x86/domain_build.c +6 -0
@@ -930,6 +930,8 @@ int __init construct_dom0(BUG_ON (d->vcpu[0 ] ==NULL );BUG_ON (v->is_initialised); +process_pending_softirqs (); +printk ("*** LOADING DOMAIN 0 ***\n" ); d->max_pages = ~0U ;
@@ -946,6 +948,8 @@ int __init construct_dom0(if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) goto out; +process_pending_softirqs (); +/* compatibility check */ compatible =0 ; compat32 =0 ;
@@ -1167,6 +1171,8 @@ int __init construct_dom0( _p(v_start), _p(v_end));printk (" ENTRY ADDRESS: %p\n" ,_p (parms.virt_entry)); +process_pending_softirqs (); + mpt_alloc = (vpt_start - v_start) +pfn_to_paddr (alloc_spfn);if ( vinitrd_start ) mpt_alloc -=PAGE_ALIGN (initrd_len);
Signature · 1 line
2.1.0
Quoted 5 lines · Ross Lagerwall
Constructing dom0 may take a few seconds, particularly if the slow VESA graphics terminal is used. Process pending softirqs a few times to avoid tripping a watchdog with a short timeout.
Signed-off-by Ross Lagerwall <[email protected]>
Quoted 35 lines
--- xen/arch/x86/domain_build.c | 6 ++++++ 1 file changed, 6 insertions(+)xen/arch/x86/domain_build.c +6
-0@@ -930,6 +930,8 @@ int __init construct_dom0(BUG_ON (d->vcpu[0 ] ==NULL );BUG_ON (v->is_initialised); +process_pending_softirqs (); +printk ("*** LOADING DOMAIN 0 ***\n" ); d->max_pages = ~0U ;@@ -946,6 +948,8 @@ int __init construct_dom0(if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) goto out; +process_pending_softirqs (); +/* compatibility check */ compatible =0 ; compat32 =0 ;@@ -1167,6 +1171,8 @@ int __init construct_dom0( _p(v_start), _p(v_end));printk (" ENTRY ADDRESS: %p\n" ,_p (parms.virt_entry)); +process_pending_softirqs (); + mpt_alloc = (vpt_start - v_start) +pfn_to_paddr (alloc_spfn);if ( vinitrd_start ) mpt_alloc -=PAGE_ALIGN (initrd_len);
xen/arch/x86/domain_build.c int __init construct_dom0( · line 951
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 11.06.15 at 15:03, <[email protected]> wrote:
xen/arch/x86/domain_build.c +1
-0@@ -946,6 +948,8 @@ int __init construct_dom0(if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) goto out; +process_pending_softirqs ();
For this one I'm not sure whether it shouldn't really go somewhere inside the ELF parser, namely due to the printing of each of the known ELF notes (which is a generally growing set).
Jan
Quoted 11 lines · Jan Beulich
xen/arch/x86/domain_build.c int __init construct_dom0( · line 951
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 11.06.15 at 15:03, <[email protected]> wrote:
xen/arch/x86/domain_build.c +1
-0@@ -946,6 +948,8 @@ int __init construct_dom0(if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) goto out; +process_pending_softirqs ();For this one I'm not sure whether it shouldn't really go somewhere inside the ELF parser, namely due to the printing of each of the known ELF notes (which is a generally growing set).
Is there an easy way of doing this given that the ELF parser is shared with and used by the toolstack?
Signature · 1 line
Ross Lagerwall
Quoted 14 lines
Quoted 1 line
Quoted 1 line · On 11.06.15 at 17:39, <[email protected]> wrote:
Quoted 11 lines · Jan Beulich
xen/arch/x86/domain_build.c int __init construct_dom0( · line 951
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 11.06.15 at 15:03, <[email protected]> wrote:
xen/arch/x86/domain_build.c +1
-0@@ -946,6 +948,8 @@ int __init construct_dom0(if ( (rc =elf_xen_parse (&elf, &parms)) !=0 ) goto out; +process_pending_softirqs ();For this one I'm not sure whether it shouldn't really go somewhere inside the ELF parser, namely due to the printing of each of the known ELF notes (which is a generally growing set).
Quoted 2 lines
Is there an easy way of doing this given that the ELF parser is shared with and used by the toolstack?
Put this inside #ifdef __XEN__ blocks?
Jan