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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E088C4332F for ; Tue, 2 Nov 2021 13:52:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 15BD36052B for ; Tue, 2 Nov 2021 13:52:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 15BD36052B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 7E26994000A; Tue, 2 Nov 2021 09:52:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 79298940009; Tue, 2 Nov 2021 09:52:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 65A6C94000A; Tue, 2 Nov 2021 09:52:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0034.hostedemail.com [216.40.44.34]) by kanga.kvack.org (Postfix) with ESMTP id 52E20940009 for ; Tue, 2 Nov 2021 09:52:06 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0CEA318029DBB for ; Tue, 2 Nov 2021 13:52:06 +0000 (UTC) X-FDA: 78764129052.40.51C2E61 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf05.hostedemail.com (Postfix) with ESMTP id 4018A508CC86 for ; Tue, 2 Nov 2021 13:51:50 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1DC641FD3D; Tue, 2 Nov 2021 13:52:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1635861124; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QuhDls7hbN4UKLnf4cjWDbk3jK59u3TGKj6IxVYK1C0=; b=Mz70zonVUxIqoOeRaeX5b5iUesoDtqU//LQYeHkDgXEKjZQk4BPwUh8Q16H3FfqeqNwUqG Px3SmOC855+OXTRcIH6tJp7WxKC2sHqjGKVlqQLMhnQXvfVydyFhK0UDRonvKC1dYzjzep Z1Ha7d1cNAV4S2M5nLHI/2S9uU+il6o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1635861124; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QuhDls7hbN4UKLnf4cjWDbk3jK59u3TGKj6IxVYK1C0=; b=DF7kJtMQlHoUDmQXqJHlVbSNLh6MVgIoT2I1y+rquXauor8l5KxpS/H5gNXP7KX88yHphb N9rPZG2TjYJCrEAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7E41613D66; Tue, 2 Nov 2021 13:52:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uxBiG4NCgWHKGAAAMHmgww (envelope-from ); Tue, 02 Nov 2021 13:52:03 +0000 Date: Tue, 2 Nov 2021 14:52:01 +0100 From: Oscar Salvador To: Michal Hocko Cc: David Hildenbrand , Alexey Makhalov , "linux-mm@kvack.org" , Andrew Morton , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Oscar Salvador Subject: Re: [PATCH] mm: fix panic in __alloc_pages Message-ID: <20211102135201.GA4348@linux> References: <42abfba6-b27e-ca8b-8cdf-883a9398b506@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 4018A508CC86 Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Mz70zonV; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=DF7kJtMQ; spf=pass (imf05.hostedemail.com: domain of osalvador@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de X-Stat-Signature: d7tnoiatkjfus1snq1dy4dgeanjcgsdt X-HE-Tag: 1635861110-766843 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 Tue, Nov 02, 2021 at 02:25:03PM +0100, Michal Hocko wrote: > I think we want to learn how exactly Alexey brought that cpu up. Because > his initial thought on add_cpu resp cpu_up doesn't seem to be correct. > Or I am just not following the code properly. Once we know all those > details we can get in touch with cpu hotplug maintainers and see what > can we do. I am not really familiar with CPU hot-onlining, but I have been taking a look. As with memory, there are two different stages, hot-adding and onlining (and the counterparts). Part of the hot-adding being: acpi_processor_get_info acpi_processor_hotadd_init arch_register_cpu register_cpu One of the things that register_cpu() does is to set cpu->dev.bus pointing to &cpu_subsys, which is: struct bus_type cpu_subsys = { .name = "cpu", .dev_name = "cpu", .match = cpu_subsys_match, #ifdef CONFIG_HOTPLUG_CPU .online = cpu_subsys_online, .offline = cpu_subsys_offline, #endif }; Then, the onlining part (in case of a udev rule or someone onlining the device) would be: online_store device_online cpu_subsys_online cpu_device_up cpu_up ... online node Since Alexey disabled the udev rule and no one onlined the CPU, online_store()-> device_online() wasn't really called. The following only applies to x86_64: I think we got confused because cpu_device_up() is also called from add_cpu(), but that is an exported function and x86 does not call add_cpu() unless for debugging purposes (check kernel/torture.c and arch/x86/kernel/topology.c). It does the onlining through online_store()... So we can take add_cpu() off the equation here. -- Oscar Salvador SUSE Labs