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

Re: [Xen-devel] [PATCH] page-alloc: Clamp get_free_buddy() to online nodes



>>> On 24.06.19 at 20:01, <andrew.cooper3@xxxxxxxxxx> wrote:
> This patch hides the issue identified in the "UBSAN report in find_next_bit()"
> so probably doesn't want applying until that is resolved.

It does so on systems with less than 64 nodes, afaict.

> A lower overhead option would be to do:
> 
> nodes_and(nodemask, node_online_map, d ? d->node_affinity : node_online_map);
> 
> however this doesn't work because the nodeset_t API has a hidden &(param)
> throughout the API.  I've got half a mind to undo this nonsense and have
> nodemask_t work in exactly the same way as cpumask_t.

Right, we should do such a transformation eventually.

> --- a/xen/include/xen/nodemask.h
> +++ b/xen/include/xen/nodemask.h
> @@ -189,6 +189,12 @@ static inline int __nodes_weight(const nodemask_t *srcp, 
> int nbits)
>       return bitmap_weight(srcp->bits, nbits);
>  }
>  
> +#define nodes_copy(dst, src) __nodes_copy(&(dst), &(src))
> +static inline void __nodes_copy(nodemask_t *dst, nodemask_t *src)
> +{
> +     return bitmap_copy(dst->bits, src->bits, MAX_NUMNODES);
> +}

Rather than introducing this, I think structure assignment is meant
to be used (as was the case prior to your change). But if you really
feel like introducing this, then please constify "src". With either
adjustment made,
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



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

 


Rackspace

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