Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4057759pxu; Mon, 12 Oct 2020 08:26:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1wcBOkSzsFk9lZibdhBfRZgyLqzY9k9YC2AKFX9ZqiyFrXMje9UXXalt9h3PgiqTvsJNe X-Received: by 2002:aa7:cd09:: with SMTP id b9mr14575567edw.55.1602516363132; Mon, 12 Oct 2020 08:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602516363; cv=none; d=google.com; s=arc-20160816; b=Liacg+JdISvu3XdwXx74Y8x11PNsK+Dxmv++9oahDW0L0hawjDcO9d86WkUG++0ckz Oh6F5QZdv+mqoGspT/E7VXUojsLFCwhTqFn5iazO+k3t8biisF/+inW1zvGiUUBuVYoc 7baxRG7U81UTKwMpJi1gmy63rJqN/0e5qLOHvDWrnY3qgt4MXYVzgl0my+OKuDyNaLYz 8dnYiuz60xQijxwQphUrlMaqn3yjtJWpJXYOv73JLIjuD4eQiJ5hfkC8hxv4LLD/JxAk PNOFRzWcMsolW3RhkldDexeYvvVvZzq+0wNQYnIbim78J6vsp9snvmICc1yQIXeZ6mjD kCqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=FZxlgr1mlkJWgaO+1GrYHMByPanr3QYZdgOhG3d2SDc=; b=NyE+ZGReWuXwUB5Nr66QH0PPEuwQQqaHOiD+okM+VzVvdbBImNNv5tkxQM424MN2bs T3tStsfcrZqT8ggjFvNvBfniz5Yer+hzKVtMe+zkybjxvFabsYgR0y5MRjOI22svKN62 eIljyVjkLa+lfgLZe1zmdtjORe4wNr4iPjhRZe+/wNdOK3Ix/YN7RZrki6Uy3CccS9Rq DUrp5y0gEhXQCtCDiEN2GpECEc5pLPkpyXT1GFo8WqOTsTqVVXTQzllDSrGxuVE98eKV ys9h9KH1BdBrCi6QlIvJrQ2IHGTAt1GEKWb6x/uWtplwOWdUqciPHKUQr5HmN5UMuuh5 /90g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si6700871edr.81.2020.10.12.08.25.39; Mon, 12 Oct 2020 08:26:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389879AbgJLPWn (ORCPT + 99 others); Mon, 12 Oct 2020 11:22:43 -0400 Received: from gentwo.org ([3.19.106.255]:51300 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389142AbgJLPWn (ORCPT ); Mon, 12 Oct 2020 11:22:43 -0400 Received: by gentwo.org (Postfix, from userid 1002) id B7F1C3F19D; Mon, 12 Oct 2020 15:22:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id B590E3EC24; Mon, 12 Oct 2020 15:22:42 +0000 (UTC) Date: Mon, 12 Oct 2020 15:22:42 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Xianting Tian cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kuba@kernel.org, alexei.starovoitov@gmail.com Subject: Re: [PATCH] mm: Make allocator take care of memoryless numa node In-Reply-To: <20201012082739.15661-1-tian.xianting@h3c.com> Message-ID: References: <20201012082739.15661-1-tian.xianting@h3c.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Oct 2020, Xianting Tian wrote: > In architecture like powerpc, we can have cpus without any local memory > attached to it. In such cases the node does not have real memory. > > In many places of current kernel code, it doesn't judge whether the node is > memoryless numa node before calling allocator interface. That is intentional. SLUB relies on the page allocator to pick a node. > This patch is to use local_memory_node(), which is guaranteed to have > memory, in allocator interface. local_memory_node() is a noop in other > architectures that don't support memoryless nodes. The patch would destroy the support for memory policies in the SLUB allocator and likely in the other ones as well.