[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v1] x86/dom0: use MEMF_no_scrub for Dom0 RAM allocation
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. Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> --- CC: Jan Beulich <jbeulich@xxxxxxxx> CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> CC: "Roger Pau Monné" <roger.pau@xxxxxxxxxx> --- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/pv/dom0_build.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 3e29cd30b8..12c20a4b66 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -101,7 +101,7 @@ static int __init pvh_populate_memory_range(struct domain *d, unsigned int range_order = get_order_from_pages(nr_pages + 1); order = min(range_order ? range_order - 1 : 0, order); - page = alloc_domheap_pages(d, order, dom0_memflags); + page = alloc_domheap_pages(d, order, dom0_memflags | MEMF_no_scrub); if ( page == NULL ) { if ( order == 0 && dom0_memflags ) diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index dc3c1e1202..f50a36c1f3 100644 --- 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); -- 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |