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