From: Michal Hocko <mhocko@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Hansen <dave.hansen@intel.com>,
Vladimir Murzin <vladimir.murzin@arm.com>,
Tony Luck <tony.luck@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: early_memtest() patterns
Date: Tue, 26 Mar 2019 09:40:40 +0100 [thread overview]
Message-ID: <20190326084040.GF28406@dhcp22.suse.cz> (raw)
In-Reply-To: <7da922fb-5254-0d3c-ce2b-13248e37db83@arm.com>
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
next prev parent reply other threads:[~2019-03-26 8:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 8:09 Anshuman Khandual
2019-03-26 8:40 ` Michal Hocko [this message]
2019-03-26 13:54 ` Mike Rapoport
2019-03-27 11:21 ` Anshuman Khandual
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=20190326084040.GF28406@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=linux-mm@kvack.org \
--cc=tony.luck@intel.com \
--cc=vladimir.murzin@arm.com \
/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