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

Re: [Xen-devel] [PATCH 4/6] replace vCPU's dirty CPU mask by numeric ID

On 19/01/18 16:06, Jan Beulich wrote:
> At most one bit can be set in the masks, so especially on larger systems
> it's quite a bit of unnecessary memory and processing overhead to track
> the information as a mask. Store the numeric ID of the respective CPU
> instead, or NR_CPUS if no dirty state exists.
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Definitely +1 for this change.

However, the comparison against nr_cpu_ids isn't completely obvious as
to its function.  How about introducing a predicate such as vcpu_dirty()
which wraps the use of the id?

Also, you'd get better code by using NR_CPUS which is a compile-time
constant, rather than nr_cpu_ids which would be a memory read.


Xen-devel mailing list



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