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.3 required=3.0 tests=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 1E943C4BA18 for ; Wed, 26 Feb 2020 18:25:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5ADD2467D for ; Wed, 26 Feb 2020 18:25:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727145AbgBZSZ3 (ORCPT ); Wed, 26 Feb 2020 13:25:29 -0500 Received: from gentwo.org ([3.19.106.255]:58926 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727144AbgBZSZ3 (ORCPT ); Wed, 26 Feb 2020 13:25:29 -0500 Received: by gentwo.org (Postfix, from userid 1002) id 5726E3EC05; Wed, 26 Feb 2020 18:25:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 5630E3EC04; Wed, 26 Feb 2020 18:25:28 +0000 (UTC) Date: Wed, 26 Feb 2020 18:25:28 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Michal Hocko cc: Sachin Sant , Pekka Enberg , David Rientjes , 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: <20200224085812.GB22443@dhcp22.suse.cz> Message-ID: References: <3381CD91-AB3D-4773-BA04-E7A072A63968@linux.vnet.ibm.com> <0ba2a3c6-6593-2cee-1cef-983cd75f920f@virtuozzo.com> <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> 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 Mon, 24 Feb 2020, Michal Hocko wrote: > Hmm, nasty. Is there any reason why kmalloc_node behaves differently > from the page allocator? The page allocator will do the same thing if you pass GFP_THISNODE and insist on allocating memory from a node that does not exist. > > > A short summary. kmalloc_node blows up when trying to allocate from a > > > memory less node. > > > > Use kmalloc instead? And set a memory allocation policy? > > The current code (memcg_expand_one_shrinker_map resp. memcg_alloc_shrinker_maps) > already use kvmalloc. Kirill's patch wanted to make those data structure > on the respective node and kvmalloc_node sounded like the right thing to > do. It comes as a surprise that the kernel simply blows up on a memory > less node rather than falling back to a close node gracefully. I suspect > this already happens when the target node is out of memory, right? No. If the target node is out of memory then direct reclaim is going to be invovked. > How would a memory allocation policy help in this case btw.? It would allow fallback to other nodes. 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.3 required=3.0 tests=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 ECB1CC4BA20 for ; Wed, 26 Feb 2020 18:27:38 +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 F1A6A20714 for ; Wed, 26 Feb 2020 18:27:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1A6A20714 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.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 48SPRW30q5zDqmd for ; Thu, 27 Feb 2020 05:27:35 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=linux.com (client-ip=3.19.106.255; helo=gentwo.org; envelope-from=cl@linux.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.com Received: from gentwo.org (gentwo.org [3.19.106.255]) (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 48SPP76lMpzDqhS for ; Thu, 27 Feb 2020 05:25:31 +1100 (AEDT) Received: by gentwo.org (Postfix, from userid 1002) id 5726E3EC05; Wed, 26 Feb 2020 18:25:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 5630E3EC04; Wed, 26 Feb 2020 18:25:28 +0000 (UTC) Date: Wed, 26 Feb 2020 18:25:28 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Michal Hocko Subject: Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9 In-Reply-To: <20200224085812.GB22443@dhcp22.suse.cz> Message-ID: References: <3381CD91-AB3D-4773-BA04-E7A072A63968@linux.vnet.ibm.com> <0ba2a3c6-6593-2cee-1cef-983cd75f920f@virtuozzo.com> <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> 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 , David Rientjes , Joonsoo Kim , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, 24 Feb 2020, Michal Hocko wrote: > Hmm, nasty. Is there any reason why kmalloc_node behaves differently > from the page allocator? The page allocator will do the same thing if you pass GFP_THISNODE and insist on allocating memory from a node that does not exist. > > > A short summary. kmalloc_node blows up when trying to allocate from a > > > memory less node. > > > > Use kmalloc instead? And set a memory allocation policy? > > The current code (memcg_expand_one_shrinker_map resp. memcg_alloc_shrinker_maps) > already use kvmalloc. Kirill's patch wanted to make those data structure > on the respective node and kvmalloc_node sounded like the right thing to > do. It comes as a surprise that the kernel simply blows up on a memory > less node rather than falling back to a close node gracefully. I suspect > this already happens when the target node is out of memory, right? No. If the target node is out of memory then direct reclaim is going to be invovked. > How would a memory allocation policy help in this case btw.? It would allow fallback to other nodes.