Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp246390pxf; Wed, 10 Mar 2021 05:35:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkB+LMcettT56+Vn09RZhEDFUVX0vGZMbdPGBcnaRG9OxuRaHYdIFwTnnsBylbvpI7k30Z X-Received: by 2002:a17:907:76ed:: with SMTP id kg13mr3494257ejc.99.1615383310809; Wed, 10 Mar 2021 05:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615383310; cv=none; d=google.com; s=arc-20160816; b=R/PmFpVqkUZkjAvWNwgwqeoSsbRZEx91XCxYHXBlxPGxwJfzPRxgFlpqgC9AqGWF3m mAnTTod1YgPlaL3+a4zfX8CGwf87dOcBnoHBJlSOZqzTsDRpHV+whvjJlkdnyI3sfi8r dxKP2GIWj12UBQUE77OnsWqjMu1ydraUgmpjf1DUanHgpPq0oAZpsl8MZBxp6mMmwUvD ngz17GuisiY8x5SPwI9zp+KtkWhZScIeQ6zDgzgw0clJfXNTAu7ZxcGzbZOOMVuCUX7d Mx2lSs7/yWEtc1KxJJdANP0yjOOkzoqlmjmdrHv3PrPndIKhiZy7u0GNJGEJdr4XEXca eVnA== 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=Zd0X1/aQ77xgvEzE/yl2zByaLdoARlJJkbsOi2BArjM=; b=VyFY7xuK41HOObPEEsKemqNvOobJVULhSrvtuIR3IRp2sXerz10PHXvyXHp9qBvaOB gr6PcUwU6u56EmJWpn95e1amF31nQJPrJrHL2t89tSx5ztFkRqNoEXC47x8tdTJQASPW LO27qHe6c7q1X0noNYzj9c9IpzpJApbEoGLNVnDxX/6xprPxRjZk6VI0q0rxC+sKiAnR 2wb7y721D/nklT2fzGtvICHdbrkX4kmf2QYWm/ZYHN2phuncnyELRTNHFEc0MxuHQUkQ 8poYxAvcFswgrVHHAjqMI8/5GTSqd7JoKggQsw4wBELG7oMft9Dl6xPhyagwZsdxaiW0 CBag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=c1XaZJ3Z; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si6810640edn.450.2021.03.10.05.34.48; Wed, 10 Mar 2021 05:35:10 -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=@infradead.org header.s=casper.20170209 header.b=c1XaZJ3Z; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233692AbhCJNbf (ORCPT + 99 others); Wed, 10 Mar 2021 08:31:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233822AbhCJN1N (ORCPT ); Wed, 10 Mar 2021 08:27:13 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C37C061760 for ; Wed, 10 Mar 2021 05:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Zd0X1/aQ77xgvEzE/yl2zByaLdoARlJJkbsOi2BArjM=; b=c1XaZJ3ZEQ5d8H/VftDRyxonGI FvAVnhRLizbneVLs0ai09N7WsiHslyr0odSp4KG77tDK+ewYaji6iN21DVlSitvvs5DyxgytRad10 oTUGNipAXr5xIKxl4eKkgh2e2QzQ3KRCt9/aUrlBQK1/MWltaqsMxAOPltwtUKVMiXeD9emq5AtY4 8ncO1thlNgpQ8CW8WvCCt7GrCGn8sNA3FUYJBuH2G8pkwIrFI9NufDaYLncmQGbdVcdEFsHsU/jvA 6IlIyLAN+Odfbe0yAwtgzmCkvxf+BQZT4dgYWFuLFQS77YAZnBIi4c/5EZbFsdtnaCTErbjLEIrLA V5fbFfSA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lJyr1-003WfB-5H; Wed, 10 Mar 2021 13:26:29 +0000 Date: Wed, 10 Mar 2021 13:26:23 +0000 From: Matthew Wilcox To: Michal Hocko Cc: Minchan Kim , Andrew Morton , linux-mm , LKML , John Dias , David Hildenbrand , Jason Baron Subject: Re: [PATCH v2] mm: page_alloc: dump migrate-failed pages Message-ID: <20210310132623.GO3479805@casper.infradead.org> References: <20210308202047.1903802-1-minchan@kernel.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, Mar 09, 2021 at 10:32:51AM +0100, Michal Hocko wrote: > Apart from the above, do we have to warn for something that is a > debugging aid? A similar concern wrt dump_page which uses pr_warn and > page owner is using even pr_alert. > Would it make sense to add a loglevel parameter both into __dump_page > and dump_page_owner? No. What would make sense is turning __dump_page() inside-out. Something like printk("%pP\n"); In lib/vsprintf.c, there's a big switch statement in the function pointer() that handles printing things like IPv6 addresses, dentries, and function symbols. Then we can do whatever we want around the new %pP, including choosing the log level, adding additional information, choosing to dump the page to a sysfs file, etc, etc.