Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp452511pxh; Tue, 9 Nov 2021 13:25:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgcwqTnoMIYEqPO+Wab4leC5Xj1enIvxisyHES/sfeEjtKt75KaV7M6PimNaNA406Eq3PE X-Received: by 2002:a92:b105:: with SMTP id t5mr7858758ilh.152.1636493101657; Tue, 09 Nov 2021 13:25:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636493101; cv=none; d=google.com; s=arc-20160816; b=wa218vVfiQRi8QX/D/NP+9VBafz41vt6tYkfFjGAqM8OWwVZKB28xQttZFDITQKuRx Praqo536LwhP8KSwdMz+EL5jmbbiJxZS8RPbjl8i6JfBuR1QEmA31Ii6BaXl6PzsoTYJ HqNJtZ+z1rxr8tATbjKfwKoWS9/grcLWVx2YVmhFMzzW7B3sBwyixevdSEbIBLkSRBcF H4UfUcaRrVDSFoWhq07WsLwqhVUw9FuIJwmKcYiEUDrCOMaDr6ZQ1INo4vHAU7re8C8S PetDaYIRWNFUh2j7RRnIycukyjLIo04ERTcTY0gzCfVCj+9dKFHl0kuZR/pQJZSBYfw1 tQzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=41Cyo/hMei2kmUmbpToJbVcXlj7u0VEEJZBij8c44T4=; b=GJ6pfqHXt0TkVIGyNLsikyIM5UT4C+nkt5lbMgw3iw0JCwW+tjHfgPWhA7qc3PBZSp bYX1LQ/JQ9AB+/AVnNSz/oACpvGBzRSvInsUvX1LgeyjwETm04AauuJp6kU5hcegOE0t kaavyNlK1rEUKjBY5PmZRDG/sSnUM7fff1fJsmw5yDyXonhzgDGm4pu1+CRlt/POmea5 P4g0WXP1uT9SwO2pUcRhVBS986seHIJmc+lpkJ0viyukZLhh0Zgn+O8PVOeZtLsYHLjM PdQE5DYYblEAW4VZKE7fpzrDXKtCZ98VYZ5ey0EgPb2OoFL5fUBxU/pq968M9tEiPaCx IHLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=rU3HghRa; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z17si5566479ioq.55.2021.11.09.13.24.48; Tue, 09 Nov 2021 13:25:01 -0800 (PST) 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.com header.s=susede1 header.b=rU3HghRa; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245567AbhKILDm (ORCPT + 99 others); Tue, 9 Nov 2021 06:03:42 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:44556 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240965AbhKILDl (ORCPT ); Tue, 9 Nov 2021 06:03:41 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id CA324218B0; Tue, 9 Nov 2021 11:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1636455654; 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=41Cyo/hMei2kmUmbpToJbVcXlj7u0VEEJZBij8c44T4=; b=rU3HghRaRnLHqlK1DMI/WDwk63A7cdlqcjv3bnyCf+0PoIBXAakd//+3P3PnoPwxBVvr3/ GhU5BO4ABLAMnaNBg3uN3kGf87rdGMIf9OvYHkHCZT7ScK4kTD/jnDvWGmoQes37OCZGIF UanpITJBU3oM7Yo2K9zUn+acsEKuC5Y= 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 295BAA3B8C; Tue, 9 Nov 2021 11:00:53 +0000 (UTC) Date: Tue, 9 Nov 2021 12:00:46 +0100 From: Michal Hocko To: linux-kernel@vger.kernel.org Cc: amakhalov@vmware.com, cl@linux.com, dennis@kernel.org, mm-commits@vger.kernel.org, osalvador@suse.de, stable@vger.kernel.org, tj@kernel.org Subject: Re: + mm-fix-panic-in-__alloc_pages.patch added to -mm tree Message-ID: References: <20211108205031.UxDPHBZWa%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 09-11-21 09:42:56, David Hildenbrand wrote: > On 09.11.21 09:37, Michal Hocko wrote: > > I have opposed this patch http://lkml.kernel.org/r/YYj91Mkt4m8ySIWt@dhcp22.suse.cz > > There was no response to that feedback. I will not go as far as to nack > > it explicitly because pcp allocator is not an area I would nack patches > > but seriously, this issue needs a deeper look rather than a paper over > > patch. I hope we do not want to do a similar thing to all callers of > > cpu_to_mem. > > While we could move it into the !HOLES version of cpu_to_mem(), calling > cpu_to_mem() on an offline (and eventually not even present) CPU (with > an offline node) is really a corner case. > > Instead of additional runtime overhead for all cpu_to_mem(), my take > would be to just do it for the random special cases. Sure, we can > document that people should be careful when calling cpu_to_mem() on > offline CPUs. But IMHO it's really a corner case. I suspect I haven't made myself clear enough. I do not think we should be touching cpu_to_mem/cpu_to_node and handle this corner case. We should be looking at the underlying problem instead. We cannot really rely on cpu to be onlined to have a proper node association. We should really look at the initialization code and handle this situation properly. Memory less nodes are something we have been dealing with already. This particular instance of the problem is new and we should understand why. -- Michal Hocko SUSE Labs