All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Avoid tripping watchdog when constructing dom0
@ 2015-06-11 13:03 Ross Lagerwall
  2015-06-11 13:07 ` Andrew Cooper
  2015-06-11 14:22 ` Jan Beulich
  0 siblings, 2 replies; 5+ messages in thread
From: Ross Lagerwall @ 2015-06-11 13:03 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Keir Fraser, Jan Beulich, 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 <ross.lagerwall@citrix.com>
---
 xen/arch/x86/domain_build.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index 03e4bfe..98d27f2 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -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);
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: Avoid tripping watchdog when constructing dom0
  2015-06-11 13:03 [PATCH] x86: Avoid tripping watchdog when constructing dom0 Ross Lagerwall
@ 2015-06-11 13:07 ` Andrew Cooper
  2015-06-11 14:22 ` Jan Beulich
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2015-06-11 13:07 UTC (permalink / raw)
  To: Ross Lagerwall, xen-devel; +Cc: Keir Fraser, Jan Beulich

On 11/06/15 14:03, Ross Lagerwall wrote:
> 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 <ross.lagerwall@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
>  xen/arch/x86/domain_build.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
> index 03e4bfe..98d27f2 100644
> --- a/xen/arch/x86/domain_build.c
> +++ b/xen/arch/x86/domain_build.c
> @@ -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);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: Avoid tripping watchdog when constructing dom0
  2015-06-11 13:03 [PATCH] x86: Avoid tripping watchdog when constructing dom0 Ross Lagerwall
  2015-06-11 13:07 ` Andrew Cooper
@ 2015-06-11 14:22 ` Jan Beulich
  2015-06-11 15:39   ` Ross Lagerwall
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2015-06-11 14:22 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: Andrew Cooper, Keir Fraser, xen-devel

>>> On 11.06.15 at 15:03, <ross.lagerwall@citrix.com> wrote:
> @@ -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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: Avoid tripping watchdog when constructing dom0
  2015-06-11 14:22 ` Jan Beulich
@ 2015-06-11 15:39   ` Ross Lagerwall
  2015-06-11 16:07     ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Ross Lagerwall @ 2015-06-11 15:39 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Keir Fraser, xen-devel

On 06/11/2015 03:22 PM, Jan Beulich wrote:
>>>> On 11.06.15 at 15:03, <ross.lagerwall@citrix.com> wrote:
>> @@ -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?

-- 
Ross Lagerwall

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86: Avoid tripping watchdog when constructing dom0
  2015-06-11 15:39   ` Ross Lagerwall
@ 2015-06-11 16:07     ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2015-06-11 16:07 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: Andrew Cooper, Keir Fraser, xen-devel

>>> On 11.06.15 at 17:39, <ross.lagerwall@citrix.com> wrote:
> On 06/11/2015 03:22 PM, Jan Beulich wrote:
>>>>> On 11.06.15 at 15:03, <ross.lagerwall@citrix.com> wrote:
>>> @@ -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?

Put this inside #ifdef __XEN__ blocks?

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-06-11 16:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-11 13:03 [PATCH] x86: Avoid tripping watchdog when constructing dom0 Ross Lagerwall
2015-06-11 13:07 ` Andrew Cooper
2015-06-11 14:22 ` Jan Beulich
2015-06-11 15:39   ` Ross Lagerwall
2015-06-11 16:07     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.