Re: [PATCH v2] x86/mce: Distirbute the clear operation of mces_seen to Per-CPU rather than only monarch CPU

From: Chen Yucong
Date: Tue May 20 2014 - 22:04:46 EST


On Wed, 2014-05-21 at 10:40 +0900, Hidetoshi Seto wrote:
> (2014/05/20 11:11), Chen Yucong wrote:
> > mces_seen is a Per-CPU variable which should only be accessed by Per-CPU as possible. So the
> > clear operation of mces_seen should also be lcoal to Per-CPU rather than monarch CPU.
>
> I don't think it should be local.
> Originally what we want to have here is memory to save mces_seen for each online cpus,
> such as a global array like mces_seen[cpus]. But at same time we don't want to preallocate
> big array enough for max possible cpus. So we use per-cpu store instead.
>
But mces_seen will just be updated by Per-CPU rather than monarch CPU.
It is only read by monarch CPU.
> >
> > Meanwhile, there is also a potential risk that mces_seen will not be be cleared if a timeout
> > occors in mce_end for monarch CPU. As a reuslt, the stale value of mces_seen will reappear
> > on the next mce.
>
> In case if we decide panic in mce path, uncleared mces_seen can be referred from memory dump.
> I suppose it will help trouble investigation.
>
> >
> > Based on the above reasons, this patch distirbute the clear operation of mces_seen to Per-CPU
> > rather than only monarch CPU.
>
> "local" "occurs" "result" "distribute"
> I recommend you to use spell-checker for your postings...
Thanks very much for your suggestion, I will use a spell-cheker for my
carelessness.

thx!
cyc

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/