Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp701163pxt; Fri, 6 Aug 2021 11:32:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysudlzAIgYo3m0IH7FiFaY2UTI+2Hk+x0819ScdhaXDeZD+2XcDM6xqzBsuEOEgOYLTnW0 X-Received: by 2002:a92:dc4a:: with SMTP id x10mr1566587ilq.166.1628274725047; Fri, 06 Aug 2021 11:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628274725; cv=none; d=google.com; s=arc-20160816; b=GO3VdLazQ6RZ9siyi4rw1YStfiWt2xcsvf7gpQhE9OKCL2qMdvhAUlHyAyQY7JRLUA sEqhLe9anU1s8bc0vio29BDxN3+q25XJ66QZqvRBWCciq6pCUDacgZGptaInX27tvLgE imyndwMJG8gauOkSi7Q3J/Y46eJb4vASUaet5jYcl1+UTdQQeQkp9ZSXqoyTRn0WD4ut PI8J4xXAWyjHXIYaYpHvwt6L9wfldJnvR/lKYPY5xN70+yxh0KQlkv2vPr2j6I4e8vW4 mTsgjzMz9SQYwetDjDCbrXWyz1xC6+nvzfkLQTbro12RJLaG/xrP6RrDipITJJmAaNR1 TPww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BIrIr2JHOUXujG0/ZIq8z/HG/qc7xRJ1Ya7B7C+n03I=; b=ouh6Muhgr2ODnDSbm1yLtwsoT61XEU8UUKDKr+tkGhf0w5L/rtMUT9Fbt5tH5+Jb20 a+eYAdwCBT6A2Fs7qq+2QKTfutkqP8/gs7oFmWoNxRM5WSldzF/OjBTw/peRBm6E9o1t 0x0B3rsmFx0CwPfbqflan+LLNFfJMgl6b+RdNMnwmhIO6tmPeCN8kH1VA1ssJR7aHO3y sq1i+0XBRvkqq8dQxgkUnh3GHmiRtcyI+6vwLHsP4Q8Dt6yKpicyMGBLWx2GREc3WWh+ POqcV8ccAzzKRXILRP6S3zQnQRejNdKOwQRBPre5LS9Dce8nv7Qx37P5tvXYULEcJEab 5SqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=USmH0WXx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si8903350iov.76.2021.08.06.11.31.52; Fri, 06 Aug 2021 11:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=USmH0WXx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344012AbhHFN2I (ORCPT + 99 others); Fri, 6 Aug 2021 09:28:08 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:42266 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244222AbhHFN2I (ORCPT ); Fri, 6 Aug 2021 09:28:08 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id C13E41FE58; Fri, 6 Aug 2021 13:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1628256471; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BIrIr2JHOUXujG0/ZIq8z/HG/qc7xRJ1Ya7B7C+n03I=; b=USmH0WXxJg+bdsSvc9rx3Xu+1NafJrMq94VVFau0PZTrTbFs42u15zI8bJxhrESWdXP7h6 KzmL4+FzJVVULB5ZZzw9Uw9WXVAJ3QceVKLC8cjsoYEYnwIqp0+hV20ycZdp1iDQrdU3lR D0cdmCOacZTWMpYGi/Y4fVQDq0guNq0= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 8C85FA3B8B; Fri, 6 Aug 2021 13:27:51 +0000 (UTC) Date: Fri, 6 Aug 2021 15:27:48 +0200 From: Michal Hocko To: Feng Tang Cc: linux-mm@kvack.org, Andrew Morton , David Rientjes , Dave Hansen , Ben Widawsky , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Andrea Arcangeli , Mel Gorman , Mike Kravetz , Randy Dunlap , Vlastimil Babka , Andi Kleen , Dan Williams , ying.huang@intel.com, Dave Hansen Subject: Re: [PATCH v7 1/5] mm/mempolicy: Add MPOL_PREFERRED_MANY for multiple preferred nodes Message-ID: References: <1627970362-61305-1-git-send-email-feng.tang@intel.com> <1627970362-61305-2-git-send-email-feng.tang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1627970362-61305-2-git-send-email-feng.tang@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 03-08-21 13:59:18, Feng Tang wrote: [...] > @@ -1936,7 +1969,9 @@ unsigned int mempolicy_slab_node(void) > case MPOL_INTERLEAVE: > return interleave_nodes(policy); > > - case MPOL_BIND: { > + case MPOL_BIND: > + case MPOL_PREFERRED_MANY: > + { > struct zoneref *z; I guess this is ok for now but it would be great if slab maintainers could have a look here. I suspect this will need some more changes. E.g. I find it highly suspicious how fallback_alloc uses mempolicy_slab_node. Let's say that the local node is not a part of the nodemask. mempolicy_slab_node will switch to the first node in the order list which is ok but fallback_alloc then iterates over the whole zonelist without any policy node mask constrains. get_any_partial looks very similar. -- Michal Hocko SUSE Labs