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=-9.9 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL 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 4AF62C4BA24 for ; Wed, 26 Feb 2020 20:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17DF624670 for ; Wed, 26 Feb 2020 20:32:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="B/fXCr6w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727310AbgBZUb7 (ORCPT ); Wed, 26 Feb 2020 15:31:59 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43561 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727306AbgBZUb7 (ORCPT ); Wed, 26 Feb 2020 15:31:59 -0500 Received: by mail-pf1-f193.google.com with SMTP id s1so343236pfh.10 for ; Wed, 26 Feb 2020 12:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=DssbOlJH2ojyRkFsMNLMtEa2IE6NcEhC6tj2pM0TkDM=; b=B/fXCr6w3ivZpRP0pR+ozKOqWQvhe6K8mFugjyi/3NVPUnSSbw/wVhwJsUli4Q+dF+ L5/WNNUpOcOx3CI0iIyW9ZlSNS6bJuaqssvO7ZIeD/4+ox8oxkbFLR0XWw9ny0M3zhSK Ro75VvE9ZNSS01fcyA+/Qa+AitVSAgDxp3zLCXpQh7i4IpkcDVH/ih64W+sj+VkSssm6 tDoMyWI/Or4x8R+wyZtq2FT7/I/9OyLQrKgeW9dOonIrcEqBfrMRCg3sjcFw6ipYvsCa y+0Wwj5whNgmkCWMJ44BcOhxYlFXH8OfppLc3w0VRP5auV79ev7OTpH2HpLgzPkImL4V VMzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=DssbOlJH2ojyRkFsMNLMtEa2IE6NcEhC6tj2pM0TkDM=; b=YXHpQ6ry4hp+8qjc7DjYJ3QENU9HDYeZvnObIKUk2CSty0WBNu26pqmrZobc3wEn2B ZvlLB+8Qrned0CqvO8O7P42MsJ3UiOklV84bPKEkGMd88/eUnRY0mK9lK+riEIuCBRaY dAwEE5AwYAtTy4MBvK/uznAPmR0x5k3MGJfqVdvvMWuGpqXh20ZoLfcJoFajcz0k0AOj Cdm/KVMiUtIHg9uBcXNAlTs5Viz8qD/xmkEU8hyLrotHo73b5J0all5kR88eeAgzByBP A3FHhsIj+3kr+JnGFAPXuO8W8y+GJGjLEUpj6Da9KGoUF0Smjj3yBM8l0bU4Eg3aOoIn ALxA== X-Gm-Message-State: APjAAAUTdsgQHItDwmHSRCXYUd/VjNmhGK4kDAAPwrunBgdyuBUD79du 7L1mvB6Wt9+exAnDAjce6eO/BA== X-Google-Smtp-Source: APXvYqwUhhH/H/dJXiwpB9VALVveANSXhbGFW4yfoypzGwSX+IMDJUTEIJMx841VFbdu+dVCnzJ26w== X-Received: by 2002:a63:4d6:: with SMTP id 205mr604982pge.10.1582749118188; Wed, 26 Feb 2020 12:31:58 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id k24sm541444pgm.61.2020.02.26.12.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 12:31:57 -0800 (PST) Date: Wed, 26 Feb 2020 12:31:56 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Christopher Lameter , Sachin Sant , Pekka Enberg , Joonsoo Kim , Kirill Tkhai , Linux-Next Mailing List , linuxppc-dev@lists.ozlabs.org Subject: Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9 In-Reply-To: <20200226190147.GR3771@dhcp22.suse.cz> Message-ID: References: <20200218115525.GD4151@dhcp22.suse.cz> <20200218142620.GF4151@dhcp22.suse.cz> <35EE65CF-40E3-4870-AEBC-D326977176DA@linux.vnet.ibm.com> <20200218152441.GH4151@dhcp22.suse.cz> <20200224085812.GB22443@dhcp22.suse.cz> <20200226184152.GQ3771@dhcp22.suse.cz> <20200226190147.GR3771@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-next-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Wed, 26 Feb 2020, Michal Hocko wrote: > On Wed 26-02-20 18:44:13, Cristopher Lameter wrote: > > On Wed, 26 Feb 2020, Michal Hocko wrote: > > > > > Besides that kmalloc_node shouldn't really have an implicit GFP_THISNODE > > > semantic right? At least I do not see anything like that documented > > > anywhere. > > > > Kmalloc_node does not support memory policies etc. Only kmalloc does. > > kmalloc_node is mostly used by subsystems that have determined the active > > nodes and want a targeted allocation on those nodes. > > I am sorry but I have hard time to follow your responses here. They open > more questions than they answer for me. The primary point here is that > kmalloc_node on a memory less node blows up and panics the kernel. I > strongly believe this is a bug. We cannot really make all callers of > kmalloc_node and co. to be hotplug aware. > > Another question is the semantic of kmalloc_node when the node cannot > satisfy the request. I have always thought that the allocation would > simply fall back to any other node unless __GFP_THISNODE is explicitly > specified. > Am I right in classifying this as a trade-off between an unlikely(!node_state(nid, N_MEMORY)) directly in kmalloc_node() vs fixing up a caller passing a memoryless nid? Seems like we wouldn't want to penalize kmalloc_node() for making such a check for 99.99% of allocators that don't need it and would rather do a node_to_mem_node(nid) or numa_mem_id() in the caller? 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=-2.0 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,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 2486FC4BA24 for ; Wed, 26 Feb 2020 20:40:25 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5E8224653 for ; Wed, 26 Feb 2020 20:40:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="B/fXCr6w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5E8224653 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48SSNk3hQvzDqbD for ; Thu, 27 Feb 2020 07:40:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=google.com (client-ip=2607:f8b0:4864:20::442; helo=mail-pf1-x442.google.com; envelope-from=rientjes@google.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=B/fXCr6w; dkim-atps=neutral Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48SSKv4DxGzDqkq for ; Thu, 27 Feb 2020 07:37:54 +1100 (AEDT) Received: by mail-pf1-x442.google.com with SMTP id 84so361131pfy.6 for ; Wed, 26 Feb 2020 12:37:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=DssbOlJH2ojyRkFsMNLMtEa2IE6NcEhC6tj2pM0TkDM=; b=B/fXCr6w3ivZpRP0pR+ozKOqWQvhe6K8mFugjyi/3NVPUnSSbw/wVhwJsUli4Q+dF+ L5/WNNUpOcOx3CI0iIyW9ZlSNS6bJuaqssvO7ZIeD/4+ox8oxkbFLR0XWw9ny0M3zhSK Ro75VvE9ZNSS01fcyA+/Qa+AitVSAgDxp3zLCXpQh7i4IpkcDVH/ih64W+sj+VkSssm6 tDoMyWI/Or4x8R+wyZtq2FT7/I/9OyLQrKgeW9dOonIrcEqBfrMRCg3sjcFw6ipYvsCa y+0Wwj5whNgmkCWMJ44BcOhxYlFXH8OfppLc3w0VRP5auV79ev7OTpH2HpLgzPkImL4V VMzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=DssbOlJH2ojyRkFsMNLMtEa2IE6NcEhC6tj2pM0TkDM=; b=edFU1IXJOC//l18IhVgPO8VvPtxqPuoAWDFW9IlZNO/VdWwWeGYOsexJs+fVrGwcHN qilJ+OrTBEbRYta+HZ0KP579eRX+Kq9yJU9V9VggR9k+utl5Z4oDKOJxfuNHNg5Ztv3c YTx6QxYi7nie5UnJvcXKogMMp6aPspMYZ/5CzOn6fvHdoYqQoKwCOPZcSBolFdCdxJ7f ioB3+CJviicWuAZc2yPi26LBnW/TTN2+xoJSpDX8ULiZdyoGBL+s+NJVIL+zJU2vX901 DB/Tz/fs+NjKQ7bqgYKw2KZgjeqxI5/mwgVp6KwQ7J4dWKo8jBmLOJMgQcwCnivK0S+o R2ng== X-Gm-Message-State: APjAAAVEJ3xCwdkEmYQqvpg+dbXZZEWlaL5JeTyuzxB3cVm8pFEtFPVB KtjV/53zunQ4QFKMwZMrTXYO0eMRkVM= X-Google-Smtp-Source: APXvYqwUhhH/H/dJXiwpB9VALVveANSXhbGFW4yfoypzGwSX+IMDJUTEIJMx841VFbdu+dVCnzJ26w== X-Received: by 2002:a63:4d6:: with SMTP id 205mr604982pge.10.1582749118188; Wed, 26 Feb 2020 12:31:58 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id k24sm541444pgm.61.2020.02.26.12.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 12:31:57 -0800 (PST) Date: Wed, 26 Feb 2020 12:31:56 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko Subject: Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9 In-Reply-To: <20200226190147.GR3771@dhcp22.suse.cz> Message-ID: References: <20200218115525.GD4151@dhcp22.suse.cz> <20200218142620.GF4151@dhcp22.suse.cz> <35EE65CF-40E3-4870-AEBC-D326977176DA@linux.vnet.ibm.com> <20200218152441.GH4151@dhcp22.suse.cz> <20200224085812.GB22443@dhcp22.suse.cz> <20200226184152.GQ3771@dhcp22.suse.cz> <20200226190147.GR3771@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sachin Sant , Pekka Enberg , Kirill Tkhai , Linux-Next Mailing List , Christopher Lameter , linuxppc-dev@lists.ozlabs.org, Joonsoo Kim Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, 26 Feb 2020, Michal Hocko wrote: > On Wed 26-02-20 18:44:13, Cristopher Lameter wrote: > > On Wed, 26 Feb 2020, Michal Hocko wrote: > > > > > Besides that kmalloc_node shouldn't really have an implicit GFP_THISNODE > > > semantic right? At least I do not see anything like that documented > > > anywhere. > > > > Kmalloc_node does not support memory policies etc. Only kmalloc does. > > kmalloc_node is mostly used by subsystems that have determined the active > > nodes and want a targeted allocation on those nodes. > > I am sorry but I have hard time to follow your responses here. They open > more questions than they answer for me. The primary point here is that > kmalloc_node on a memory less node blows up and panics the kernel. I > strongly believe this is a bug. We cannot really make all callers of > kmalloc_node and co. to be hotplug aware. > > Another question is the semantic of kmalloc_node when the node cannot > satisfy the request. I have always thought that the allocation would > simply fall back to any other node unless __GFP_THISNODE is explicitly > specified. > Am I right in classifying this as a trade-off between an unlikely(!node_state(nid, N_MEMORY)) directly in kmalloc_node() vs fixing up a caller passing a memoryless nid? Seems like we wouldn't want to penalize kmalloc_node() for making such a check for 99.99% of allocators that don't need it and would rather do a node_to_mem_node(nid) or numa_mem_id() in the caller?