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 F415DC1975A for ; Thu, 12 Mar 2020 09:30:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CB0D0206FA for ; Thu, 12 Mar 2020 09:30:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB0D0206FA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 476236B000C; Thu, 12 Mar 2020 05:30:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 426E06B000E; Thu, 12 Mar 2020 05:30:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 315DF6B0010; Thu, 12 Mar 2020 05:30:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id 188A66B000C for ; Thu, 12 Mar 2020 05:30:54 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C3AD9AD4D for ; Thu, 12 Mar 2020 09:30:53 +0000 (UTC) X-FDA: 76586190786.10.run24_41f0bf2ad174f X-HE-Tag: run24_41f0bf2ad174f X-Filterd-Recvd-Size: 6237 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Mar 2020 09:30:53 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5C0B6AFB4; Thu, 12 Mar 2020 09:30:51 +0000 (UTC) Subject: Re: [PATCH 1/3] powerpc/numa: Set numa_node for all possible cpus To: Sachin Sant , Srikar Dronamraju Cc: Michal Hocko , Linus Torvalds , LKML , linux-mm@kvack.org, Mel Gorman , "Kirill A. Shutemov" , Andrew Morton , linuxppc-dev@lists.ozlabs.org, Christopher Lameter References: <20200311110237.5731-1-srikar@linux.vnet.ibm.com> <20200311110237.5731-2-srikar@linux.vnet.ibm.com> <20200311115735.GM23944@dhcp22.suse.cz> <20200312052707.GA3277@linux.vnet.ibm.com> From: Vlastimil Babka Message-ID: <5e5c736a-a88c-7c76-fc3d-7bc765e8dcba@suse.cz> Date: Thu, 12 Mar 2020 10:30:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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 3/12/20 9:23 AM, Sachin Sant wrote: >=20 >=20 >> On 12-Mar-2020, at 10:57 AM, Srikar Dronamraju wrote: >>=20 >> * Michal Hocko [2020-03-11 12:57:35]: >>=20 >>> On Wed 11-03-20 16:32:35, Srikar Dronamraju wrote: >>>> A Powerpc system with multiple possible nodes and with CONFIG_NUMA >>>> enabled always used to have a node 0, even if node 0 does not any cp= us >>>> or memory attached to it. As per PAPR, node affinity of a cpu is onl= y >>>> available once its present / online. For all cpus that are possible = but >>>> not present, cpu_to_node() would point to node 0. >>>>=20 >>>> To ensure a cpuless, memoryless dummy node is not online, powerpc ne= ed >>>> to make sure all possible but not present cpu_to_node are set to a >>>> proper node. >>>=20 >>> Just curious, is this somehow related to >>> http://lkml.kernel.org/r/20200227182650.GG3771@dhcp22.suse.cz? >>>=20 >>=20 >> The issue I am trying to fix is a known issue in Powerpc since many ye= ars. >> So this surely not a problem after a75056fc1e7c (mm/memcontrol.c: allo= cate >> shrinker_map on appropriate NUMA node").=20 >>=20 >> I tried v5.6-rc4 + a75056fc1e7c but didnt face any issues booting the >> kernel. Will work with Sachin/Abdul (reporters of the issue). >>=20 >=20 > I applied this 3 patch series on top of March 11 next tree (commit d44a= 64766795 ) > The kernel still fails to boot with same call trace. Yeah when I skimmed the patches, I don't think they address the issue whe= re node_to_mem_node(0) =3D 0 [1]. You could reapply the debug print patch to= verify, but it seems very likely. So I'm not surprised you get the same trace. [1] https://lore.kernel.org/linux-next/9a86f865-50b5-7483-9257-dbb08fecd6= 2b@suse.cz/ > [ 6.159357] BUG: Kernel NULL pointer dereference on read at 0x000073= b0 > [ 6.159363] Faulting instruction address: 0xc0000000003d7174 > [ 6.159368] Oops: Kernel access of bad area, sig: 11 [#1] > [ 6.159372] LE PAGE_SIZE=3D64K MMU=3DHash SMP NR_CPUS=3D2048 NUMA pS= eries > [ 6.159378] Modules linked in: > [ 6.159382] CPU: 17 PID: 1 Comm: systemd Not tainted 5.6.0-rc5-next-= 20200311-autotest+ #1 > [ 6.159388] NIP: c0000000003d7174 LR: c0000000003d7714 CTR: c000000= 000400e70 > [ 6.159393] REGS: c0000008b36836d0 TRAP: 0300 Not tainted (5.6.0-= rc5-next-20200311-autotest+) > [ 6.159398] MSR: 8000000000009033 CR: 24004= 848 XER: 00000000 > [ 6.159406] CFAR: c00000000000dec4 DAR: 00000000000073b0 DSISR: 4000= 0000 IRQMASK: 1 > [ 6.159406] GPR00: c0000000003d7714 c0000008b3683960 c00000000155e30= 0 c0000008b301f500 > [ 6.159406] GPR04: 0000000000000dc0 0000000000000000 c0000000003456f= 8 c0000008bb198620 > [ 6.159406] GPR08: 00000008ba0f0000 0000000000000001 000000000000000= 0 0000000000000000 > [ 6.159406] GPR12: 0000000024004848 c00000001ec55e00 000000000000000= 0 0000000000000000 > [ 6.159406] GPR16: c0000008b0a82048 c000000001595898 c000000001750ca= 8 0000000000000002 > [ 6.159406] GPR20: c000000001750cb8 c000000001624478 0000000fffffffe= 0 5deadbeef0000122 > [ 6.159406] GPR24: 0000000000000001 0000000000000dc0 000000000000000= 0 c0000000003456f8 > [ 6.159406] GPR28: c0000008b301f500 c0000008bb198620 000000000000000= 0 c00c000002285a40 > [ 6.159453] NIP [c0000000003d7174] ___slab_alloc+0x1f4/0x760 > [ 6.159458] LR [c0000000003d7714] __slab_alloc+0x34/0x60 > [ 6.159462] Call Trace: > [ 6.159465] [c0000008b3683a40] [c0000008b3683a70] 0xc0000008b3683a70 > [ 6.159471] [c0000008b3683a70] [c0000000003d8b20] __kmalloc_node+0x1= 10/0x490 > [ 6.159477] [c0000008b3683af0] [c0000000003456f8] kvmalloc_node+0x58= /0x110 > [ 6.159483] [c0000008b3683b30] [c000000000400f78] mem_cgroup_css_onl= ine+0x108/0x270 > [ 6.159489] [c0000008b3683b90] [c000000000236ed8] online_css+0x48/0x= d0 > [ 6.159494] [c0000008b3683bc0] [c00000000023ffac] cgroup_apply_contr= ol_enable+0x2ec/0x4d0 > [ 6.159501] [c0000008b3683ca0] [c0000000002437c8] cgroup_mkdir+0x228= /0x5f0 > [ 6.159506] [c0000008b3683d10] [c000000000521780] kernfs_iop_mkdir+0= x90/0xf0 > [ 6.159512] [c0000008b3683d50] [c00000000043f670] vfs_mkdir+0x110/0x= 230 > [ 6.159517] [c0000008b3683da0] [c000000000443150] do_mkdirat+0xb0/0x= 1a0 > [ 6.159523] [c0000008b3683e20] [c00000000000b278] system_call+0x5c/0= x68 > [ 6.159527] Instruction dump: > [ 6.159531] 7c421378 e95f0000 714a0001 4082fff0 4bffff64 60000000 60= 000000 faa10088 > [ 6.159538] 3ea2000c 3ab56178 7b4a1f24 7d55502a 2faa0000 = 409e0394 3d02002a > [ 6.159545] ---[ end trace 36d65cb66091a5b6 ]=E2=80=94 >=20 > Boot log attached. >=20 > Thanks > -Sachin >=20