mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aaron Miller <aaronmiller@fb.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EDAC: expose per-dimm error counts in sysfs
Date: Thu, 27 Oct 2016 21:23:15 +0000	[thread overview]
Message-ID: <2DF9D2DA-2584-4623-BC1A-69314AA80F2A@fb.com> (raw)
In-Reply-To: <20161027180716.a5z6w2g5arco564h@pd.tnic>

If your system is like the one I’m testing on, only the channel 0 DIMM slots are populated, and you injected an error for an unpopulated slot, for which no dimmX directory gets created.

In edac_mc_sysfs.c:

    for (i = 0; i < mci->tot_dimms; i++) {
        struct dimm_info *dimm = mci->dimms[i];
        /* Only expose populated DIMMs */
        if (!dimm->nr_pages)
            continue;


I can repro what you saw here: 

$ cd /sys/devices/system/edac/mc/mc0
$ grep . dimm*/*location
dimm0/dimm_location:channel 0 slot 0
dimm3/dimm_location:channel 1 slot 0
dimm6/dimm_location:channel 2 slot 0
dimm9/dimm_location:channel 3 slot 0

$ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject_channel
$ echo 2 > /sys/kernel/debug/edac/mc0/fake_inject_slot
$ echo 3 > /sys/kernel/debug/edac/mc0/fake_inject_count
$ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject
$ cat ce_count
3

$ grep . dimm*/*ce_count
dimm0/dimm_ce_count:0
dimm3/dimm_ce_count:0
dimm6/dimm_ce_count:0
dimm9/dimm_ce_count:0


And I get what I expect for a populated slot:

$ echo 0 > /sys/kernel/debug/edac/mc0/fake_inject_slot
$ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject
$ cat ce_count
6

$ grep . dimm*/*ce_count
dimm0/dimm_ce_count:0
dimm3/dimm_ce_count:3
dimm6/dimm_ce_count:0
dimm9/dimm_ce_count:0



On 10/27/16, 11:07 AM, "Borislav Petkov" <bp@alien8.de> wrote:

    On Tue, Oct 25, 2016 at 04:25:51PM -0700, Aaron Miller wrote:
    
    <--- This patch needs a commit message.
    
    Especially as to *why* we need this.
    
    > Signed-off-by: Aaron Miller <aaronmiller@fb.com>
    > ---
    >  drivers/edac/edac_mc_sysfs.c | 38 ++++++++++++++++++++++++++++++++++++++
    >  1 file changed, 38 insertions(+)
    
    Regardless, something's still not right yet:
    
    $ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject_channel
    $ echo 2 > /sys/kernel/debug/edac/mc0/fake_inject_slot
    $ echo 3 > /sys/kernel/debug/edac/mc0/fake_inject_count
           ^
    
    $ echo 1 > /sys/kernel/debug/edac/mc0/fake_inject
    
    $ grep . /sys/devices/system/edac/mc/mc0/*count
    /sys/devices/system/edac/mc/mc0/ce_count:3
    					 ^
    
    /sys/devices/system/edac/mc/mc0/ce_noinfo_count:0
    /sys/devices/system/edac/mc/mc0/ue_count:0
    /sys/devices/system/edac/mc/mc0/ue_noinfo_count:0
    
    $ grep -r . /sys/devices/system/edac/mc/mc0/dimm*/* 2>/dev/null | grep ce_count
    /sys/devices/system/edac/mc/mc0/dimm0/dimm_ce_count:0
    /sys/devices/system/edac/mc/mc0/dimm3/dimm_ce_count:0
    /sys/devices/system/edac/mc/mc0/dimm6/dimm_ce_count:0
    /sys/devices/system/edac/mc/mc0/dimm9/dimm_ce_count:0
    						    ^
    
    There should be 3 somewhere in the DIMM counters...
    
    -- 
    Regards/Gruss,
        Boris.
    
    ECO tip #101: Trim your mails when you reply.
    

  parent reply	other threads:[~2016-10-27 21:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 23:25 Aaron Miller
2016-10-27 18:07 ` Borislav Petkov
2016-10-27 18:18   ` Mauro Carvalho Chehab
2016-10-27 21:23   ` Aaron Miller [this message]
2016-10-28  9:55     ` Aaron Miller
2016-10-27 21:33 ` [PATCH v2] " Aaron Miller
2016-10-28 13:02   ` Borislav Petkov
2016-10-28 18:13     ` Aaron Miller
2016-11-02 10:54       ` Borislav Petkov
2016-11-03 22:01 ` [PATCH v3] " Aaron Miller
2016-11-04 11:21   ` Borislav Petkov
2017-01-19  8:56     ` Aaron Miller
2017-01-19  9:29       ` 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=2DF9D2DA-2584-4623-BC1A-69314AA80F2A@fb.com \
    --to=aaronmiller@fb.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@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

all inboxes | Powered by JetHome®