linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: David Hildenbrand <david@redhat.com>, Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org, Peter Xu <peterx@redhat.com>,
	Axel Rasmussen <axelrasmussen@google.com>
Subject: Re: [PATCH] x86/fault: speed up uffd-unit-test by 10x: rate-limit "MCE: Killing" logs
Date: Tue, 7 May 2024 09:28:29 -0700	[thread overview]
Message-ID: <302d50ac-45ff-470e-90a0-b349821706a6@nvidia.com> (raw)
In-Reply-To: <016d8cff-efc3-4ef1-9aff-7c21c48f2d69@redhat.com>

On 5/7/24 1:13 AM, David Hildenbrand wrote:
> The patch subject is misleading. This should be "don't flood the system 

I went back and forth on that subject line. :)

> log". Nobody cares about the speed of a unittest ;)

Yes they do. People should actually run the selftests, which in turn have
enshrined their guidelines in kernel doc. See dev-tools/kselftest.rst,
"Contributing new tests", which says, as you would hope, "Don't take
too long".

It's important. Tests need to be quick, and having one out of 50 that
blows it up is worth fixing.

> 
> On 07.05.24 04:29, John Hubbard wrote:
>> If a system experiences a lot of memory failures, then any associated
>> printk() output really needs to be rate-limited. I noticed this while
>> running selftests/mm/uffd-unit-tests, which logs 12,305 lines of output,
>> adding (on my system) an extra 97 seconds of runtime due to printk time.
> 
> Recently discussed:
> 
> https://lkml.kernel.org/r/a9e3120d-8b79-4435-b113-ceb20aa45ee2@alu.unizg.hr
> 
> See the pros/cons of using ratelimiting, and what an alternative for 
> uffd is that Axel is working on.
> 
> (CCing Peter and Axel)
> 

That thread seems to have stalled. I *do* have MCE experience (writing a 
handler,
dealing with MCEs and related bugs), and what they wrote so far is exactly
correct: if you were going to flood the log, then no, we don't need to see
every single line printed. The first 10 or so, plus the fact that rate 
limiting
kicked in, is sufficient to proceed with debugging and/or hardware 
replacement.

I'd like to just do this patch almost as-is, just with a fixed up subject,
perhaps:

     x86/fault: rate-limit to avoid flooding dmesg with "MCE: Killing" 
reports

Yes?

thanks,
-- 
John Hubbard
NVIDIA



  reply	other threads:[~2024-05-07 16:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07  2:29 John Hubbard
2024-05-07  8:13 ` David Hildenbrand
2024-05-07 16:28   ` John Hubbard [this message]
2024-05-07 16:43     ` David Hildenbrand
2024-05-07 16:53       ` John Hubbard
2024-05-07 16:55         ` David Hildenbrand
2024-05-07 18:08       ` Axel Rasmussen
2024-05-07 18:10         ` John Hubbard
2024-05-07 18:15           ` Axel Rasmussen
2024-05-07 22:49             ` John Hubbard
2024-05-07 19:26 ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=302d50ac-45ff-470e-90a0-b349821706a6@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=axelrasmussen@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox