[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1] x86/dom0: use MEMF_no_scrub for Dom0 RAM allocation



>>> On 20.11.18 at 18:00, <sergey.dyasli@xxxxxxxxxx> wrote:
> Now that idle scrub is the default option, all memory is marked as dirty
> and alloc_domheap_pages() will do eager scrubbing by default. This can
> lead to longer Dom0 construction and potentially to a watchdog timeout,
> especially on older H/W (e.g. Harpertown).
> 
> Pass MEMF_no_scrub to optimise this process since there is little point
> in scrubbing memory for Dom0 RAM.

Good idea.

> --- a/xen/arch/x86/pv/dom0_build.c
> +++ b/xen/arch/x86/pv/dom0_build.c
> @@ -239,7 +239,8 @@ static struct page_info * __init alloc_chunk(struct 
> domain *d,
>          order = last_order;
>      else if ( max_pages & (max_pages - 1) )
>          --order;
> -    while ( (page = alloc_domheap_pages(d, order, dom0_memflags)) == NULL )
> +    while ( (page = alloc_domheap_pages(d, order, dom0_memflags |
> +                                                  MEMF_no_scrub)) == NULL )
>          if ( order-- == 0 )
>              break;
>      if ( page )
> @@ -265,7 +266,7 @@ static struct page_info * __init alloc_chunk(struct 
> domain *d,
>  
>          if ( d->tot_pages + (1 << order) > d->max_pages )
>              continue;
> -        pg2 = alloc_domheap_pages(d, order, MEMF_exact_node);
> +        pg2 = alloc_domheap_pages(d, order, MEMF_exact_node | MEMF_no_scrub);
>          if ( pg2 > page )
>          {
>              free_domheap_pages(page, free_order);

There are quite a few more allocations up from here. Any reason
you don't convert those as well, the more that some even
clear_page() what they've just allocated?

Jan



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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.