>>> On 19.01.18 at 18:48, <andrew.coop...@citrix.com> wrote:
> 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 <jbeul...@suse.com>
> 
> 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?

I can do that.

> 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.

I did consider it, but decided that the check being more tight when
using nr_cpu_ids is preferable. The checks sit in ASSERT()s only
anyway, i.e. I don't think performance matters much.

Jan


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

Reply via email to