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 47563C433EF for ; Tue, 2 Nov 2021 09:40:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E9FBD60EB4 for ; Tue, 2 Nov 2021 09:40:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E9FBD60EB4 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 90472940011; Tue, 2 Nov 2021 05:40:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88BFA94000A; Tue, 2 Nov 2021 05:40:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 72CAF940011; Tue, 2 Nov 2021 05:40:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0182.hostedemail.com [216.40.44.182]) by kanga.kvack.org (Postfix) with ESMTP id 5FED194000A for ; Tue, 2 Nov 2021 05:40:46 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 03F6B5BE1C for ; Tue, 2 Nov 2021 09:40:46 +0000 (UTC) X-FDA: 78763495692.02.383A7A4 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf27.hostedemail.com (Postfix) with ESMTP id 76EF670000A0 for ; Tue, 2 Nov 2021 09:40:45 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 3BBCD1FD4C; Tue, 2 Nov 2021 09:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1635846044; 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=X+zeEJxaxigpF0JmA9P/IlwLz0CIgiUc5xKVn036itk=; b=dveKC3cJXF4f0Xb1Qi1GbO2mKhgv1Z2hP9wvUK2RysymAHkKS8dHG0e4H8nO30XeMkBBrR 9Gp6sP3RVMW8puo2lkQF4UfG5kETc+zVQmF9pPnLXRvxdFsMAAd1bSMToobaQ3w6E9VKZ1 0cMWOnvn9XbFOlE98Q3L18SVsbaR+xQ= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 0EBC7A3B81; Tue, 2 Nov 2021 09:40:44 +0000 (UTC) Date: Tue, 2 Nov 2021 10:40:43 +0100 From: Michal Hocko To: Alexey Makhalov Cc: David Hildenbrand , "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: References: <20211101201312.11589-1-amakhalov@vmware.com> <7136c959-63ff-b866-b8e4-f311e0454492@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=dveKC3cJ; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf27.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Rspamd-Server: rspam03 X-Stat-Signature: qomc57bof76yy5616q7gnftgkqf9gp3t X-Rspamd-Queue-Id: 76EF670000A0 X-HE-Tag: 1635846045-699169 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 02-11-21 10:04:23, Michal Hocko wrote: [...] > > Is there any reason why try_online_node() resides in cpu_up() and not in add_cpu()? > > I think it would be correct to online node during the CPU hot add to align with > > memory hot add. > > I am not familiar with cpu hotplug, but this doesn't seem to be anything > new so how come this became problem only now? Just looked at the cpu hotplug part. I do not see add_cpu to add much here. Here is what I can see in the current Linus tree add_cpu device_online() # cpu device - cpu_sys_devices with cpu_subsys bus dev->bus->online -> cpu_subsys_online cpu_device_up cpu_up try_online_node So we should be bringing up the node during add_cpu. Unless something fails on the way - e.g. cpu_possible check or something similar. -- Michal Hocko SUSE Labs