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

Re: [Xen-devel] [PATCH v1 2/9] mm: Place unscrubbed pages at the end of pagelist



On Fri, Mar 24, 2017 at 01:04:57PM -0400, Boris Ostrovsky wrote:
> . so that it's easy to find pages that need to be scrubbed (those pages are
> now marked with _PGC_need_scrub bit).

s/bool_t/bool/ throughout and use true and false where appropriate.

>  
>  /* Free 2^@order set of pages. */
>  static void free_heap_pages(
> -    struct page_info *pg, unsigned int order)
> +    struct page_info *pg, unsigned int order, bool_t need_scrub)
>  {
>      unsigned long mfn = page_to_mfn(pg);
>      unsigned int i, node = phys_to_nid(page_to_maddr(pg)), tainted = 0;
> @@ -1025,11 +1086,20 @@ static void free_heap_pages(
>          midsize_alloc_zone_pages = max(
>              midsize_alloc_zone_pages, total_avail_pages / 
> MIDSIZE_ALLOC_FRAC);
>  
> +    if ( need_scrub && !tainted )
> +    {
> +        pg->count_info |= PGC_need_scrub;
> +        node_need_scrub[node] += (1UL << order);
> +    }
> +

I think this is wrong: you shouldn't have !tainted here, otherwise
reserve_offlined_page won't know the page needs to be scrubbed,
resulting in all sub-pages not marked as needing scrub.

>      merge_chunks(pg, node, zone, order);
>  
>      if ( tainted )
>          reserve_offlined_page(pg);
>  
> +    if ( need_scrub )
> +        scrub_free_pages(node);
> +
>      spin_unlock(&heap_lock);
>  }

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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