Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp219654imu; Tue, 27 Nov 2018 11:20:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/WW7qVsxhE12pqswUHJJwHxBZF02QR/ebDWZkDTr+yQ178+FZ6lephVfuf+DMVO+BUh+NAN X-Received: by 2002:a63:1b48:: with SMTP id b8mr30639880pgm.187.1543346409784; Tue, 27 Nov 2018 11:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543346409; cv=none; d=google.com; s=arc-20160816; b=AkAntDLu1+bbW693a3ckqR6gVrIIhsuRi4I3ccaNmysZugPidK+2fGko249Pt3RMAM 0AywkVgVCsd1I0LaarJfEnw6YoYqglkM8NUhGOndFTfwVEHu8LNeBQL+9GrTT273GTVw o+vVWoHzUSPjeKdqM3hxCnQZDiQQ9FQ0bzmJE3o/K4DvsNyVNUWFrnTtnTSHC/sH/7hp cJSBPsFA/JOBkDp/pEnk/FfRBjscehL4TWvAqyEpQeu3u2PzID5SQXK1OmNFl5oE2Z7r 1G1t0uL/dNWMLFDfjpoT4oYjmI/BGAjLIRwCDP7IIjNLLBdjUarcHk1Ngs2ryaKckLmq dPcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RWeZGdwS2usR5WEUVFrYjoAjDUjJsvMiuHBTFF4phPU=; b=F9HrElCSOy2wrNIjBlbix9oW+Iwg+CLyL2Eq/se6I8gur9AnX8pjt2WjcN3u9Ce2tQ tMtH8DF4k/qE60QtqojwzdEOUfLIm1yaFeCOTkELEjBlNWCcZI37k7HdX3MGIrADUMZa 58bUN+Xd9yAgNUS9jVFJsFt04PKeFVZYO9MkzlxaC9fmz32W1dwZmgUshxgKB6cdVA/E BO3l++YHr9C2IbHVAzMFh9g+IOcREXpRy27/O22zODSQEI8bzDQhCTMRffLvBsI7Kh1R lSOTt9ev60KJOtwD7DERL7k0Cq6kyEElh3QSCm1NXR7hc5Pz9MhLnj+RIFJ9yfYX76E/ puAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y141si5423516pfc.180.2018.11.27.11.19.50; Tue, 27 Nov 2018 11:20:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726783AbeK1ARN (ORCPT + 99 others); Tue, 27 Nov 2018 19:17:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:56144 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726266AbeK1ARM (ORCPT ); Tue, 27 Nov 2018 19:17:12 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5E2CBAF60; Tue, 27 Nov 2018 13:19:17 +0000 (UTC) Date: Tue, 27 Nov 2018 14:19:16 +0100 From: Michal Hocko To: Heiko Carstens Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-mm@kvack.org, "Kirill A . Shutemov" , Martin Schwidefsky Subject: Re: [PATCH] mm: warn only once if page table misaccounting is detected Message-ID: <20181127131916.GX12455@dhcp22.suse.cz> References: <20181127083603.39041-1-heiko.carstens@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181127083603.39041-1-heiko.carstens@de.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 27-11-18 09:36:03, Heiko Carstens wrote: > Use pr_alert_once() instead of pr_alert() if page table misaccounting > has been detected. > > If this happens once it is very likely that there will be numerous > other occurrence as well, which would flood dmesg and the console with > hardly any added information. Therefore print the warning only once. Have you actually experience a flood of these messages? Is one per mm message really that much? If yes why rss counters do not exhibit the same problem? > Cc: Kirill A. Shutemov > Cc: Martin Schwidefsky > Signed-off-by: Heiko Carstens > --- > kernel/fork.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/fork.c b/kernel/fork.c > index 07cddff89c7b..c887e9eba89f 100644 > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -647,8 +647,8 @@ static void check_mm(struct mm_struct *mm) > } > > if (mm_pgtables_bytes(mm)) > - pr_alert("BUG: non-zero pgtables_bytes on freeing mm: %ld\n", > - mm_pgtables_bytes(mm)); > + pr_alert_once("BUG: non-zero pgtables_bytes on freeing mm: %ld\n", > + mm_pgtables_bytes(mm)); > > #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS > VM_BUG_ON_MM(mm->pmd_huge_pte, mm); > -- > 2.16.4 -- Michal Hocko SUSE Labs