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

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


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Mon, 29 Jul 2019 15:48:30 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UygHx+HLvHTPPJnaKsqN+/eZVDne+WS+4G1gSKwQzXY=; b=AWkfzve77T3jw0jdMkPw28Y0L8JDT01y+2mAgVBJyXC9GduxcktA4SKnrDCGOJXjbK8L4PgIhj76GjXls9VuuUNws++Hzr6mHHbW5lwXPuhAk8RVSCpvO3vmRpD4dI/DJRyKU3mZdjj0u/xc6z2hroYUskRn7VD4rLSX3ttgFNBfBGykqzaZbWVOfWJoHppxtvfxbITD22OZy8JZpkAGIi/GfieBGLG9DNetfl51/i6hsq7mbw/m83WELJLtC+loTjP687mgCbetL0eZOQAaxORP/QfRLQ2xq1eA2WJ7LJuctEbnb7bNizPkwDdY9e4AAi2es5XGWPLK8a3DVn5FRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C/6vEpb4inFLn0pPKi8T6AqVDuzdMBtREb5qgCiqZISp4kSPBPPuIWupoIk0mjFpwxdWr2FQxsNrPSADMxj0GDezd/YnNjg6heQg5a5r0SqXtW4DSA99jpTgIGsi1XhmXrWQ1rp4dEAkckrAHF03z3p02KGB9pMLYeYV04o5k+iHK0zoT4usD7nucLlbkQLPnwotbfgduk1eYFRew1mFkfW+a1v30DbslrJEAIuB98hf3NmE31tAGS5KhKNYsy8RNDcFRgrgdvYesC/3kDssCstGuwWTBtS/e1v+LTzwG6p1W9iveJA43ezLj6S0a2EN8lfrQfKd4lTC1Ok2HOillg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 29 Jul 2019 16:09:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVRgcXbA5oo5qfM0G3fbP8NjBdsqbhvgyA
  • Thread-topic: [Xen-devel] [PATCH v3 01/10] page-alloc: Clamp get_free_buddy() to online nodes

On 29.07.2019 14:11, Andrew Cooper wrote:
> --- a/xen/common/page_alloc.c
> +++ b/xen/common/page_alloc.c
> @@ -811,11 +811,18 @@ static struct page_info *get_free_buddy(unsigned int 
> zone_lo,
>                                           const struct domain *d)
>   {
>       nodeid_t first, node = MEMF_get_node(memflags), req_node = node;
> -    nodemask_t nodemask = d ? d->node_affinity : node_online_map;
> +    nodemask_t nodemask = node_online_map;
>       unsigned int j, zone, nodemask_retry = 0;
>       struct page_info *pg;
>       bool use_unscrubbed = (memflags & MEMF_no_scrub);
>   
> +    /*
> +     * d->node_affinity is our preferred allocation set if provided, but it
> +     * may have bit set outside of node_online_map.  Clamp it.

Would you mind adding the apparently missing "s" to "bit"?

> +     */
> +    if ( d )
> +        nodes_and(nodemask, nodemask, d->node_affinity);

Despite my earlier ack: Code further down assumes a non-empty mask,
which is no longer guaranteed afaics. I think you want to append an
"intersects" check in the if(). With that feel free to promote my
A-b to R-b.

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