From: Tomas Mudrunka <tomas.mudrunka@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, rppt@kernel.org, linux-doc@vger.kernel.org,
corbet@lwn.net, tomas.mudrunka@gmail.com
Subject: Re: Re: [PATCH] Add results of early memtest to /proc/meminfo
Date: Tue, 21 Mar 2023 11:58:12 +0100 [thread overview]
Message-ID: <20230321105812.9257-1-tomas.mudrunka@gmail.com> (raw)
In-Reply-To: <20230317165637.6be5414a3eb05d751da7d19f@linux-foundation.org>
> meminfo is rather top-level and important. Is this data sufficiently
> important to justify a place there?
There is already "HardwareCorrupted" which is similar, but for
errors reported by ECC, so it makes sense to have both in single place.
> Please describe the value. The use-case(s). Why would people want
> this?
When running large fleet of devices without ECC RAM it's currently not
easy to do bulk monitoring for memory corruption. You have to parse dmesg,
but that's ring buffer so the error might disappear after some time.
In general i do not consider dmesg to be great API to query RAM status.
In several companies i've seen such errors remain undetected and cause
issues for way too long. So i think it makes sense to provide monitoring
API, so that we can safely detect and act upon them.
> Comment layout is unconventional.
Fixed in PATCH v2
> Coding style is unconventional (white spaces).
> I expect this code would look much cleaner if some temporaries were used.
Fixed in PATCH v2
> I don't understand this logic anyway. Why not just print the value of
> early_memtest_bad_size>>10 and be done with it.
I think 0 should be reported only when there was no error found at all.
If memtest detect 256 corrupt bytes it would report 0 kB without such logic.
Rounding down to 0 like that is not a good idea in my opinion,
because it will hide the fact something is wrong with the RAM in such case.
Therefore i've added logic that prevents rounding down to 0.
> The name implies a bool, but the comment says otherwise.
Fixed in PATCH v2
> It's a counter, but it's used as a boolean. Why not make it bool, and do
Fixed in PATCH v2
> Also, your email client is replacing tabs with spaces.
Fixed in PATCH v2
prev parent reply other threads:[~2023-03-21 10:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 19:30 Tomáš Mudruňka
2023-03-17 23:56 ` Andrew Morton
2023-03-21 10:34 ` [PATCH v2] " Tomas Mudrunka
2023-03-21 20:01 ` Andrew Morton
2023-03-21 10:58 ` Tomas Mudrunka [this message]
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=20230321105812.9257-1-tomas.mudrunka@gmail.com \
--to=tomas.mudrunka@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rppt@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