From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3603C4320A for ; Fri, 6 Aug 2021 13:27:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2EBB61052 for ; Fri, 6 Aug 2021 13:27:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344017AbhHFN2J (ORCPT ); Fri, 6 Aug 2021 09:28:09 -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