From: Vlastimil Babka <vbabka@suse.cz>
To: Dan Williams <dan.j.williams@intel.com>, akpm@linux-foundation.org
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
Michal Hocko <mhocko@suse.com>, Kees Cook <keescook@chromium.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
keith.busch@intel.com
Subject: Re: [PATCH v10 1/3] mm: Shuffle initial free memory to improve memory-side-cache utilization
Date: Fri, 31 May 2019 09:33:36 +0200 [thread overview]
Message-ID: <cddd43de-62f6-6a91-83aa-da02ff17254d@suse.cz> (raw)
In-Reply-To: <154899811738.3165233.12325692939590944259.stgit@dwillia2-desk3.amr.corp.intel.com>
On 2/1/19 6:15 AM, Dan Williams wrote:
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1714,6 +1714,29 @@ config SLAB_FREELIST_HARDENED
> sacrifies to harden the kernel slab allocator against common
> freelist exploit methods.
>
> +config SHUFFLE_PAGE_ALLOCATOR
> + bool "Page allocator randomization"
> + default SLAB_FREELIST_RANDOM && ACPI_NUMA
> + help
> + Randomization of the page allocator improves the average
> + utilization of a direct-mapped memory-side-cache. See section
> + 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
> + 6.2a specification for an example of how a platform advertises
> + the presence of a memory-side-cache. There are also incidental
> + security benefits as it reduces the predictability of page
> + allocations to compliment SLAB_FREELIST_RANDOM, but the
> + default granularity of shuffling on 4MB (MAX_ORDER) pages is
> + selected based on cache utilization benefits.
> +
> + While the randomization improves cache utilization it may
> + negatively impact workloads on platforms without a cache. For
> + this reason, by default, the randomization is enabled only
> + after runtime detection of a direct-mapped memory-side-cache.
> + Otherwise, the randomization may be force enabled with the
> + 'page_alloc.shuffle' kernel command line parameter.
> +
> + Say Y if unsure.
It says "Say Y if unsure", yet if I run make oldconfig, the default is
N. Does that make sense?
> Page allocator randomization (SHUFFLE_PAGE_ALLOCATOR) [N/y/?] (NEW)
next prev parent reply other threads:[~2019-05-31 7:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 5:15 [PATCH v10 0/3] mm: Randomize free memory Dan Williams
2019-02-01 5:15 ` [PATCH v10 1/3] mm: Shuffle initial free memory to improve memory-side-cache utilization Dan Williams
2019-02-05 22:04 ` Andrew Morton
2019-02-05 23:11 ` Kees Cook
2019-02-05 23:29 ` Matthew Wilcox
2019-05-31 7:33 ` Vlastimil Babka [this message]
2019-05-31 14:59 ` Dan Williams
2019-02-01 5:15 ` [PATCH v10 2/3] mm: Move buddy list manipulations into helpers Dan Williams
2019-02-19 15:24 ` Vlastimil Babka
2019-02-19 17:21 ` Dan Williams
2019-02-01 5:15 ` [PATCH v10 3/3] mm: Maintain randomization of page free lists Dan Williams
2019-02-01 9:58 ` Michal Hocko
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=cddd43de-62f6-6a91-83aa-da02ff17254d@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=keescook@chromium.org \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.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;
as well as URLs for NNTP newsgroup(s).