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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B4FBC17447 for ; Mon, 11 Nov 2019 23:02:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1B536214DB for ; Mon, 11 Nov 2019 23:02:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="CQKri5pl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B536214DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6F8C76B0003; Mon, 11 Nov 2019 18:02:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A9B26B0006; Mon, 11 Nov 2019 18:02:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BEBD6B0007; Mon, 11 Nov 2019 18:02:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 45C986B0003 for ; Mon, 11 Nov 2019 18:02:14 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id EAAD1180AD820 for ; Mon, 11 Nov 2019 23:02:13 +0000 (UTC) X-FDA: 76145521746.29.bean88_308d6dc14b855 X-HE-Tag: bean88_308d6dc14b855 X-Filterd-Recvd-Size: 2774 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 Nov 2019 23:02:13 +0000 (UTC) Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4492720659; Mon, 11 Nov 2019 23:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573513332; bh=T++SfRocne6R+FT0e/lITsou/+T1aj32czwC2JdYewE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CQKri5plHXv4HgoJ+hznYR/EVTHZncht0g03GeabqQzNuFkDQoAn9HRNxRxvyQ6rH Bcf1tfMKN6NFERrTVn2O7MLCZ+rP+17cVnPl9jOC9iMGgLjIOb91megU1DFFWn6pT5 2Bls1ZdntaFz/ltxHQfDlZ+AEBX87iFA6r735cYc= Date: Mon, 11 Nov 2019 15:02:11 -0800 From: Andrew Morton To: Ralph Campbell Cc: , Subject: Re: [PATCH] mm/debug: Message-Id: <20191111150211.9f75292d8c057769603edfb7@linux-foundation.org> In-Reply-To: <20191111224935.19464-1-rcampbell@nvidia.com> References: <20191111224935.19464-1-rcampbell@nvidia.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Mon, 11 Nov 2019 14:49:35 -0800 Ralph Campbell wrote: > When dumping struct page information, __dump_page() prints the page type > with a trailing blank followed by the page flags on a separate line: > > anon > flags: 0x100000000090034(uptodate|lru|active|head|swapbacked) > > Fix this by using pr_cont() instead of pr_warn() to get a single line: > > anon flags: 0x100000000090034(uptodate|lru|active|head|swapbacked) > > Signed-off-by: Ralph Campbell > --- > mm/debug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/debug.c b/mm/debug.c > index 8345bb6e4769..752c78721ea0 100644 > --- a/mm/debug.c > +++ b/mm/debug.c > @@ -87,7 +87,7 @@ void __dump_page(struct page *page, const char *reason) > } > BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1); > > - pr_warn("flags: %#lx(%pGp)\n", page->flags, &page->flags); > + pr_cont("flags: %#lx(%pGp)\n", page->flags, &page->flags); > > hex_only: > print_hex_dump(KERN_WARNING, "raw: ", DUMP_PREFIX_NONE, 32, This is the case if PageAnon || PageKsm || mapping. If it is, say, PageSlab then we effectively do pr_warn("stuff-with-no-newline"); pr_cont("\n"); pr_cont("flags: ...\n"); does this work OK? what facility level will that "flags: " line get?