Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp979577rdb; Fri, 16 Feb 2024 01:14:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVuMKEAiai5wSNg74GDneoaPUON/8w+4+SaOkXwE35w8sKN7vjHIXIilaGT35c+7PrtF0abeLdPqTNC159N0qvcrwy7yW+YJPknj3pVtA== X-Google-Smtp-Source: AGHT+IGlTTnYJWmWQ+pDzPyF/DdKXcngXIKaOcVsFn2k4mjcfF907ZVpwioHzJfPqRE4u+EzLbGJ X-Received: by 2002:ac8:5dcd:0:b0:42c:5a27:e35f with SMTP id e13-20020ac85dcd000000b0042c5a27e35fmr5126592qtx.50.1708074851777; Fri, 16 Feb 2024 01:14:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708074851; cv=pass; d=google.com; s=arc-20160816; b=h+n1MCeGqves+2kMkvRr4Qj/s3Gmr6jxM0GMGwjkIdPjNwv/csptX57TQKOQblDNJX kO5In9XuID2fXvHeN1T22t7CiycewYGwISmxvSgKtRBswvtd/+JPGbQHVUiG4aWApih1 ZT8SUTEP15iwHZGFPGWsArMy+rCopkpAh/vTaQPgQErwsvuWRQayh+7O1RWwtLcJIVfa ZnFCrpGK0YKNJ8oZ0QIpYeLQCe5hrFwa+pFvQjmo++hDIitS/TWe7BwBhfmvrtSoPBw6 oAPozWAJEx3yjfXuUmzJ9+VXrAny28L2Fb0cgXFKgY4XbTVkJEP2jyhFriTysIm1ts1H pWkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=Mfo+oHNvqkOf5Mp/Sv+TmyI3EgULl3MJq1hNpKdInFI=; fh=gjZR1OsTP6Iw8bevIpZ1LMSv/sW35oGTAdmkEj24JCk=; b=rci6Fox2rT1A4hg5TqtfuovmeMoWfPgAjyDl+V9r2MXozEyfJDZJr+TMqCoZy2M2Ha +PoeSRoPFl+XVCXcFsiGlORwwIpXNUQLdBZ0r2xMdUYplwvJSzTWsBFpmvR3/E81Cwcx 1YeH8o8ZIs7RGAOizVnOZFCPzuB9N7IfyyieiUw8efGtoRzYv5LeFtL4nHohcsnkYkzK CjP3UStU2vFHdGIsoQCEqHobFtLe1WFnqEK2R7swJzW72Id4WzuTbMX6tBUoL8M77CMd q709DiM0Bl5PP372hcuGgJlUNuSMdlpgB7+t3CqzeROTy0jp2G0yUxoEIgiq0L6Zsbin gyMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-68315-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68315-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bb14-20020a05622a1b0e00b0042de510566bsi263400qtb.297.2024.02.16.01.14.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 01:14:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68315-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-68315-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68315-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 63E7B1C21122 for ; Fri, 16 Feb 2024 09:14:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FA431B953; Fri, 16 Feb 2024 09:14:04 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A9B21B941 for ; Fri, 16 Feb 2024 09:13:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708074843; cv=none; b=L3YIedlmJlFFFj7mqX4Sl+jPehVc81OqMQg/ZoMG8xPBDN+aN3rySqpUjyb0zawXfiWaLNI5GKFpMHVcDjZwS4mIl7WbeRDlTRNIIZ6rlP3AYZGazDGdPq5OEl6SDNtbx0o0CmJc3CUR9INwUYAK5MsJ4a3cf1KJ6ub6Uca8TIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708074843; c=relaxed/simple; bh=wHL0yfZgtZwRPPxfhL88OC4Gpb6zU/CR4h2X12Ou9/M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NnF34gz8YuyDS0jbvt7dNuriRtVu6JqeyfohuqUm9n8Dfe9vv91gKgbx7Cp4qWqG5BrO6gIOdh0dp/0QY24t5dfLaFOKg4NQvdv+GJnwEEDjPjZtVMKcmyTjbPBAbWc6xU01kOxdCCmJcplW/Y+gOpb8LLHReI2XCFeHssOwMJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d85ff70000001748-a1-65cf275412ba Date: Fri, 16 Feb 2024 18:13:51 +0900 From: Byungchul Park To: David Hildenbrand Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel_team@skhynix.com, akpm@linux-foundation.org Subject: Re: [PATCH v2] sched/numa, mm: do not promote folios to nodes not set N_MEMORY Message-ID: <20240216091351.GB75176@system.software.com> References: <20240216073340.55404-1-byungchul@sk.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnkeLIzCtJLcpLzFFi42LhesuzSDdE/Xyqwf17ahZz1q9hs7j0+Cqb xfSXjSwWX9f/YrZ4OmErs8Xd/qksFpd3zWGzuLfmP6vF5HfPGC0uHVjAZHG89wCTxb6OB0wW HUe+MVtsPfqd3YHPY828NYweLftusXss2FTqsXmFlsemT5PYPe5c28PmcWLGbxaP9/uusnls Pl3t8XmTXABXFJdNSmpOZllqkb5dAlfG9HkHmQrOSFbsOPCKsYHxkkgXIweHhICJxLFFXl2M nGBm98qdLCA2i4CqxJK/N8BsNgF1iRs3fjKD2CICGhKb2jYA2VwczAKnmCQmfL7ADpIQFoiU eDa/mRHE5hWwkFhz4yBYs5BApkTr5AZWiLigxMmZT8DizAJaEjf+vWQCuYFZQFpi+T8OkDCn gJ3EgxsrwcpFBZQlDmw7zgSyS0KgmV1i1qzF7BCHSkocXHGDZQKjwCwkY2chGTsLYewCRuZV jEKZeWW5iZk5JnoZlXmZFXrJ+bmbGIHRtK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3C6s5k2P0m6asNLig2RH3alTURazPB/vVpZ1eDGjvXfHz7kinP8f 5hZdXTvzm30sP/MOs5Ws6W5KLMUZiYZazEXFiQDQaJh4igIAAA== X-CFilter-Loop: Reflected On Fri, Feb 16, 2024 at 10:07:53AM +0100, David Hildenbrand wrote: > On 16.02.24 08:33, Byungchul Park wrote: > > Changes from v1: > > 1. Trim the verbose oops in the commit message. (feedbacked by > > Phil Auld) > > 2. Rewrite a comment in code. (feedbacked by Phil Auld) > > > > --->8--- > > From 6830b59db267a31b78f6f09af12ae0e3132b4bca Mon Sep 17 00:00:00 2001 > > From: Byungchul Park > > Date: Fri, 16 Feb 2024 16:26:23 +0900 > > Subject: [PATCH v2] sched/numa, mm: do not promote folios to nodes not set N_MEMORY > > > > While running qemu with a configuration where some CPUs don't have their > > local memory and with a kernel numa balancing on, the following oops has > > been observed. It's because of null pointers of ->zone_pgdat of zones of > > those nodes that are not initialized properly at booting time. So should > > avoid nodes not set N_MEMORY from getting promoted. > > > > > BUG: unable to handle page fault for address: 00000000000033f3 > > > #PF: supervisor read access in kernel mode > > > #PF: error_code(0x0000) - not-present page > > > PGD 0 P4D 0 > > > Oops: 0000 [#1] PREEMPT SMP NOPTI > > > CPU: 2 PID: 895 Comm: masim Not tainted 6.6.0-dirty #255 > > > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS > > > rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 > > > RIP: 0010:wakeup_kswapd (./linux/mm/vmscan.c:7812) > > > Code: (omitted) > > > RSP: 0000:ffffc90004257d58 EFLAGS: 00010286 > > > RAX: ffffffffffffffff RBX: ffff88883fff0480 RCX: 0000000000000003 > > > RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88883fff0480 > > > RBP: ffffffffffffffff R08: ff0003ffffffffff R09: ffffffffffffffff > > > R10: ffff888106c95540 R11: 0000000055555554 R12: 0000000000000003 > > > R13: 0000000000000000 R14: 0000000000000000 R15: ffff88883fff0940 > > > FS: 00007fc4b8124740(0000) GS:ffff888827c00000(0000) knlGS:0000000000000000 > > > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > > > CR2: 00000000000033f3 CR3: 000000026cc08004 CR4: 0000000000770ee0 > > > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > > > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > > > PKRU: 55555554 > > > Call Trace: > > > > > > ? __die > > > ? page_fault_oops > > > ? __pte_offset_map_lock > > > ? exc_page_fault > > > ? asm_exc_page_fault > > > ? wakeup_kswapd > > > migrate_misplaced_page > > > __handle_mm_fault > > > handle_mm_fault > > > do_user_addr_fault > > > exc_page_fault > > > asm_exc_page_fault > > > RIP: 0033:0x55b897ba0808 > > > Code: (omitted) > > > RSP: 002b:00007ffeefa821a0 EFLAGS: 00010287 > > > RAX: 000055b89983acd0 RBX: 00007ffeefa823f8 RCX: 000055b89983acd0 > > > RDX: 00007fc2f8122010 RSI: 0000000000020000 RDI: 000055b89983acd0 > > > RBP: 00007ffeefa821a0 R08: 0000000000000037 R09: 0000000000000075 > > > R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 > > > R13: 00007ffeefa82410 R14: 000055b897ba5dd8 R15: 00007fc4b8340000 > > > > > > > This sounds like we need a Fixes: and want to CC stable? Sure. I will CC stable at the next spin - might need to rewrite the reason. Byungchul > -- > Cheers, > > David / dhildenb