Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp553901rwl; Fri, 4 Nov 2022 03:44:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7KN3kcP4YV0xluXv9YJcwCsWeMac7rnvetSCvMAlEZ2lwRe06YlQ5qdENlM544VEWTBAjE X-Received: by 2002:a63:e44f:0:b0:46f:be60:ada3 with SMTP id i15-20020a63e44f000000b0046fbe60ada3mr22601391pgk.577.1667558686768; Fri, 04 Nov 2022 03:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667558686; cv=none; d=google.com; s=arc-20160816; b=jsHjKHTLvnUZtNaMg53EtzlvkSrLPFcwNFD9fDiYbUrLhXcaGGdtDnxkPefNx9/4Je kmu1Q0Q99ig+rx946C2lB5u2QuMDUKrBm8CvCxvqzC1kQl6PzvLt4tS12K/g+4C8oG6+ 8vCbvkiUzFy2dIAhANOClSF7H83dpJdkVxdDvPZfWFV53gN3mDz6Wos/5RQTLzyKWlzJ 3Z9B7VWC11M0E0HHB9gRb8TrZ1cq2+z4NJmzaduOosSGeX267khKfsKz17wp29YtWxPl eRtqciPMvCyQ4mj1+V8m7fYEjFm6vtyVJg06rnIwc7j7Q9t05HiAlkYtuV7yjOl7JiuF pJqA== 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=bmGFOdE8sYiFtyoIiRYb+2bGYVWu3+NkTdUNQoeZPMU=; b=aBxp79K6XDvIEOiMAwd3RSBfoYKjpfaG7wN9HbcxdszliAzClHpvhP0I9jdHciGHL2 eOEQwBHmT/caVZDZowgKyU9j6Y+/P1McVWqia5JZEPMumeX2oa5fQB/7ewt9E5DoPlmq EWi3XqIkAmsmpbGZL8Qhinx8ONUd3Kra84CZP0uddrzxLlGUOM+lD+V+nGceLHCDCKDl i3tXUGtjp6jbgzgCg4fxf4q/3JUw2H79TzujXaTTOXnvUEK26Lp/78zyVmYqQnXAzj7H MF1N5X8KZdr1NXZ+bcoZ9ghfXoHujt7sle6cuRfwT2KNr66ES0PdKZXzW0/DdFioQsBt i6BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qg+RpcxZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q12-20020a170902eb8c00b0018694b85992si3714765plg.389.2022.11.04.03.44.34; Fri, 04 Nov 2022 03:44:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qg+RpcxZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231530AbiKDJ4L (ORCPT + 96 others); Fri, 4 Nov 2022 05:56:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbiKDJ4I (ORCPT ); Fri, 4 Nov 2022 05:56:08 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D7751EC4A for ; Fri, 4 Nov 2022 02:56:07 -0700 (PDT) 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 5195C1F8C1; Fri, 4 Nov 2022 09:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1667555766; 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=bmGFOdE8sYiFtyoIiRYb+2bGYVWu3+NkTdUNQoeZPMU=; b=qg+RpcxZskLn7YVVHDUWRimO6eHunVMMmg8swpxUeWXVr6fXOc1IDurnsIc9FFhD0yRrCx knjUb/FpRkhBdjG8BQ4gHTFd98dYdHmHtRuo8sZtIVXX6wfhSgZpmrItaiEH91M+tq/t16 hfWy2jM5F6nDqnAOJolP+HEct5+wTac= 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 33E231346F; Fri, 4 Nov 2022 09:56:06 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id lBBkCrbhZGNyEwAAMHmgww (envelope-from ); Fri, 04 Nov 2022 09:56:06 +0000 Date: Fri, 4 Nov 2022 10:56:05 +0100 From: Michal Hocko To: Yang Shi Cc: zokeefe@google.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [v2 PATCH 2/2] mm: don't warn if the node is offlined Message-ID: References: <20221103213641.7296-1-shy828301@gmail.com> <20221103213641.7296-2-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 04-11-22 10:35:21, Michal Hocko wrote: [...] > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > index ef4aea3b356e..308daafc4871 100644 > --- a/include/linux/gfp.h > +++ b/include/linux/gfp.h > @@ -227,7 +227,10 @@ static inline > struct folio *__folio_alloc_node(gfp_t gfp, unsigned int order, int nid) > { > VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); > - VM_WARN_ON((gfp & __GFP_THISNODE) && !node_online(nid)); > + if((gfp & __GFP_THISNODE) && !node_online(nid)) { or maybe even better if ((gfp & (__GFP_THISNODE|__GFP_NOWARN) == __GFP_THISNODE|__GFP_NOWARN) && !node_online(nid)) because it doesn't really make much sense to dump this information if the allocation failure is going to provide sufficient (and even more comprehensive) context for the failure. It looks more hairy but this can be hidden in a nice little helper shared between the two callers. > + pr_warn("%pGg allocation from offline node %d\n", &gfp, nid); > + dump_stack(); > + } > > return __folio_alloc(gfp, order, nid, NULL); > } > -- > Michal Hocko > SUSE Labs -- Michal Hocko SUSE Labs