>>> On 27.11.18 at 11:00, <sergey.dya...@citrix.com> wrote:
> --- a/xen/arch/arm/setup.c
> +++ b/xen/arch/arm/setup.c
> @@ -933,6 +933,8 @@ void __init start_xen(unsigned long boot_phys_offset,
>      /* TODO: smp_cpus_done(); */
>  
>      system_state = SYS_STATE_smp_booted;
> +    /* Wake up secondary CPUs to start idle memory scrubbing */
> +    smp_send_event_check_mask(&cpu_online_map);

The comment in context is, I think, a pretty good suggestion
where this new code (and possibly also the setting of system_state,
but I'm less sure with that) should live, especially on the x86 side
where this function already exists.

> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -1261,6 +1261,13 @@ bool scrub_free_pages(void)
>      nodeid_t node;
>      unsigned int cnt = 0;
>    
> +    /*
> +     * Don't start scrubbing until all secondary CPUs have booted and
> +     * updated their microcode.
> +     */
> +    if ( system_state < SYS_STATE_smp_booted )
> +        return false;

As said on another sub-thread, I think scrubbing shouldn't be
delayed unconditionally. Quite a bit of progress can presumably
be made already by the CPUs as they come online, while others
are still being onlined.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to