* early_memtest() patterns
@ 2019-03-26 8:09 Anshuman Khandual
2019-03-26 8:40 ` Michal Hocko
2019-03-26 13:54 ` Mike Rapoport
0 siblings, 2 replies; 4+ messages in thread
From: Anshuman Khandual @ 2019-03-26 8:09 UTC (permalink / raw)
To: linux-mm
Cc: Andrew Morton, Michal Hocko, Dave Hansen, Vladimir Murzin,
Tony Luck, Dan Williams
Hello,
early_memtest() is being executed on many platforms even though they dont enable
CONFIG_MEMTEST by default. Just being curious how the following set of patterns
got decided. Are they just random 64 bit patterns ? Or there is some particular
significance to them in detecting bad memory.
static u64 patterns[] __initdata = {
/* The first entry has to be 0 to leave memtest with zeroed memory */
0,
0xffffffffffffffffULL,
0x5555555555555555ULL,
0xaaaaaaaaaaaaaaaaULL,
0x1111111111111111ULL,
0x2222222222222222ULL,
0x4444444444444444ULL,
0x8888888888888888ULL,
0x3333333333333333ULL,
0x6666666666666666ULL,
0x9999999999999999ULL,
0xccccccccccccccccULL,
0x7777777777777777ULL,
0xbbbbbbbbbbbbbbbbULL,
0xddddddddddddddddULL,
0xeeeeeeeeeeeeeeeeULL,
0x7a6c7258554e494cULL, /* yeah ;-) */
};
BTW what about the last one here. Most of them got moved from x86 through the
commit 63823126c221dd ("x86: memtest: add additional (regular) test patterns").
- Anshuman
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: early_memtest() patterns
2019-03-26 8:09 early_memtest() patterns Anshuman Khandual
@ 2019-03-26 8:40 ` Michal Hocko
2019-03-26 13:54 ` Mike Rapoport
1 sibling, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2019-03-26 8:40 UTC (permalink / raw)
To: Anshuman Khandual
Cc: linux-mm, Andrew Morton, Dave Hansen, Vladimir Murzin, Tony Luck,
Dan Williams
On Tue 26-03-19 13:39:14, Anshuman Khandual wrote:
> Hello,
>
> early_memtest() is being executed on many platforms even though they dont enable
> CONFIG_MEMTEST by default. Just being curious how the following set of patterns
> got decided. Are they just random 64 bit patterns ? Or there is some particular
> significance to them in detecting bad memory.
>
> static u64 patterns[] __initdata = {
> /* The first entry has to be 0 to leave memtest with zeroed memory */
> 0,
> 0xffffffffffffffffULL,
> 0x5555555555555555ULL,
> 0xaaaaaaaaaaaaaaaaULL,
> 0x1111111111111111ULL,
> 0x2222222222222222ULL,
> 0x4444444444444444ULL,
> 0x8888888888888888ULL,
> 0x3333333333333333ULL,
> 0x6666666666666666ULL,
> 0x9999999999999999ULL,
> 0xccccccccccccccccULL,
> 0x7777777777777777ULL,
> 0xbbbbbbbbbbbbbbbbULL,
> 0xddddddddddddddddULL,
> 0xeeeeeeeeeeeeeeeeULL,
This are setting different bit patterns, a single/two/three bit(s) at a
different possition of the work.
> 0x7a6c7258554e494cULL, /* yeah ;-) */
Looks like an easter egg string to me.
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: early_memtest() patterns
2019-03-26 8:09 early_memtest() patterns Anshuman Khandual
2019-03-26 8:40 ` Michal Hocko
@ 2019-03-26 13:54 ` Mike Rapoport
2019-03-27 11:21 ` Anshuman Khandual
1 sibling, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2019-03-26 13:54 UTC (permalink / raw)
To: Anshuman Khandual
Cc: linux-mm, Andrew Morton, Michal Hocko, Dave Hansen,
Vladimir Murzin, Tony Luck, Dan Williams
On Tue, Mar 26, 2019 at 01:39:14PM +0530, Anshuman Khandual wrote:
> Hello,
>
> early_memtest() is being executed on many platforms even though they dont enable
> CONFIG_MEMTEST by default. Just being curious how the following set of patterns
> got decided. Are they just random 64 bit patterns ? Or there is some particular
> significance to them in detecting bad memory.
>
> static u64 patterns[] __initdata = {
> /* The first entry has to be 0 to leave memtest with zeroed memory */
> 0,
> 0xffffffffffffffffULL,
> 0x5555555555555555ULL,
> 0xaaaaaaaaaaaaaaaaULL,
> 0x1111111111111111ULL,
> 0x2222222222222222ULL,
> 0x4444444444444444ULL,
> 0x8888888888888888ULL,
> 0x3333333333333333ULL,
> 0x6666666666666666ULL,
> 0x9999999999999999ULL,
> 0xccccccccccccccccULL,
> 0x7777777777777777ULL,
> 0xbbbbbbbbbbbbbbbbULL,
> 0xddddddddddddddddULL,
> 0xeeeeeeeeeeeeeeeeULL,
> 0x7a6c7258554e494cULL, /* yeah ;-) */
> };
>
> BTW what about the last one here.
It's 'LINUXrlz' ;-)
> - Anshuman
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: early_memtest() patterns
2019-03-26 13:54 ` Mike Rapoport
@ 2019-03-27 11:21 ` Anshuman Khandual
0 siblings, 0 replies; 4+ messages in thread
From: Anshuman Khandual @ 2019-03-27 11:21 UTC (permalink / raw)
To: Mike Rapoport
Cc: linux-mm, Andrew Morton, Michal Hocko, Dave Hansen,
Vladimir Murzin, Tony Luck, Dan Williams
On 03/26/2019 07:24 PM, Mike Rapoport wrote:
> On Tue, Mar 26, 2019 at 01:39:14PM +0530, Anshuman Khandual wrote:
>> Hello,
>>
>> early_memtest() is being executed on many platforms even though they dont enable
>> CONFIG_MEMTEST by default. Just being curious how the following set of patterns
>> got decided. Are they just random 64 bit patterns ? Or there is some particular
>> significance to them in detecting bad memory.
>>
>> static u64 patterns[] __initdata = {
>> /* The first entry has to be 0 to leave memtest with zeroed memory */
>> 0,
>> 0xffffffffffffffffULL,
>> 0x5555555555555555ULL,
>> 0xaaaaaaaaaaaaaaaaULL,
>> 0x1111111111111111ULL,
>> 0x2222222222222222ULL,
>> 0x4444444444444444ULL,
>> 0x8888888888888888ULL,
>> 0x3333333333333333ULL,
>> 0x6666666666666666ULL,
>> 0x9999999999999999ULL,
>> 0xccccccccccccccccULL,
>> 0x7777777777777777ULL,
>> 0xbbbbbbbbbbbbbbbbULL,
>> 0xddddddddddddddddULL,
>> 0xeeeeeeeeeeeeeeeeULL,
>> 0x7a6c7258554e494cULL, /* yeah ;-) */
>> };
>>
>> BTW what about the last one here.
> It's 'LINUXrlz' ;-)
Yeah eventually figured that. Though first 16 patterns switch on/off individual
bits on a given byte, there does not seem to be any order or pattern to it.
Never mind, was just curious.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-27 11:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 8:09 early_memtest() patterns Anshuman Khandual
2019-03-26 8:40 ` Michal Hocko
2019-03-26 13:54 ` Mike Rapoport
2019-03-27 11:21 ` Anshuman Khandual
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox