Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4263235pxb; Tue, 2 Nov 2021 06:57:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnC51WDrn/AW7ui3zmL6Sym18Esp7Q2oY4if13yRr7cETnKQ8HUxQDF13ee28KHms6hQVM X-Received: by 2002:a17:906:6988:: with SMTP id i8mr44043803ejr.516.1635861436802; Tue, 02 Nov 2021 06:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635861436; cv=none; d=google.com; s=arc-20160816; b=ulNMuJn/KRH8jygVyPLf7UETkU9OrQvVy4+CzMBOKd/mnEuhOjLw2p1q31uML4kq9g 4ENvbmnFKq86NAStF3E4oT8O+IhGryVAe+gxhiHlgrQVGk3RV5isO9IQAUzLrd5TLBXr 6GkroMV5XlKMmHqWdLOnZABiL93fEg7oGlCM7XExs9j9keNGZZC93cPpn0B4eICklq1R aVHM5oLRNEclTOZlgdYs2EAiVEF576A6LnDJzGKv8STv7VlUEfEoaO7F0zRDrZP44VTn 7ekQOfSlGIxT6e2vWZcpMK014ZWEqL7eZDrdES+lWubNZCM53nz7kFQkt/kVyNr86ZTP ndug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=QuhDls7hbN4UKLnf4cjWDbk3jK59u3TGKj6IxVYK1C0=; b=0bTNv0ArqZOzbEeIFeDBVMN+fiPQRN35gGFruD1JbDRu658IHo1uobmLFxwMmPHCom P3UgXkVsQigf5YTZd+ghajXGlp2aihXdEVHWgNL06GgZZUGCn9ahriJCP5FBzY/pLVMZ NxmEjEyak4BT3B74jjffGgqBDEXhgPrqs0PbcPgaDiOnafSV85uCkdeAkh8bGRSHuCey b/AtQDHVYGP5IKVdPU0teYw2wroK5rg/973amuUSf2njEkPixw2FliLrQc+uRHBy/UTA Teqq/uM0oM4M02Vb9UuWn2F6BqWg4tV1YG3zUdhf2CcI8P3ogX42qoxo/jVCJUcR2q0N kONA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Mz70zonV; dkim=neutral (no key) header.i=@suse.de header.b=DF7kJtMQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si37660828edz.276.2021.11.02.06.56.52; Tue, 02 Nov 2021 06:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Mz70zonV; dkim=neutral (no key) header.i=@suse.de header.b=DF7kJtMQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231366AbhKBNym (ORCPT + 99 others); Tue, 2 Nov 2021 09:54:42 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:43750 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbhKBNyj (ORCPT ); Tue, 2 Nov 2021 09:54:39 -0400 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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