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

Re: [Xen-devel] [PATCH v3] Xen: Spread boot time page scrubbing across all available CPU's



Hi,

Thanks for picking this up!

One or two comments:

At 14:08 -0400 on 11 Apr (1397221681), Konrad Rzeszutek Wilk wrote:
> +    /* Calculate the end mfn into this CPU's memory block for this iteration 
> */
> +    if ( r->offset + chunk_size > r->per_cpu_sz ) {
> +        end = r->start + (r->per_cpu_sz * cpu_idx) + r->per_cpu_sz;
> +        if ( r->rem && ((cpumask_weight(&r->cpu) - 1 == cpu_idx )) )
> +            end += r->rem;

I think the outer gate here needs to be a '>=' to handle the case where 
per_cpu_sz % chunk_size == 0 but node_spaned_pages() % per_cpu_sz != 0.

> +    }
> +    else
> +        end = start + chunk_size;
> +

[...]

> +    /* Round default chunk size down if required */
> +    if ( max_per_cpu_sz && chunk_size > max_per_cpu_sz )
> +        chunk_size = max_per_cpu_sz;

Is this necessary?  The worker function should DTRT with a too-large
chunk size.  (Likewise in round #2)

Cheers,

Tim.

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


 


Rackspace

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