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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 A76DFC433DF for ; Mon, 12 Oct 2020 15:22:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 32EA920BED for ; Mon, 12 Oct 2020 15:22:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32EA920BED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C6E526B006C; Mon, 12 Oct 2020 11:22:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C1DA66B006E; Mon, 12 Oct 2020 11:22:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0EB66B0070; Mon, 12 Oct 2020 11:22:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0246.hostedemail.com [216.40.44.246]) by kanga.kvack.org (Postfix) with ESMTP id 83FFD6B006C for ; Mon, 12 Oct 2020 11:22:44 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 1D564180AD807 for ; Mon, 12 Oct 2020 15:22:44 +0000 (UTC) X-FDA: 77363640648.03.birds11_150a44e271fb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id D7C4828A4EB for ; Mon, 12 Oct 2020 15:22:43 +0000 (UTC) X-HE-Tag: birds11_150a44e271fb X-Filterd-Recvd-Size: 1901 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Mon, 12 Oct 2020 15:22:43 +0000 (UTC) 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.