public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Dionna Amalie Glaze <dionnaglaze@google.com>,
	devel@edk2.groups.io, dave.hansen@linux.intel.com
Cc: Jiewen <jiewen.yao@intel.com>,
	"Shutemov, Kirill" <kirill.shutemov@intel.com>
Subject: Re: [edk2-devel] [PATCH v9 0/4] Add safe unaccepted memory behavior
Date: Fri, 13 Jan 2023 09:57:07 -0800	[thread overview]
Message-ID: <0918b9db-c949-75ce-a24e-f12f03865938@intel.com> (raw)
In-Reply-To: <CAAH4kHYgN1ZVevP7mDRT27bpjj+0tkyAVbtznzyfYVuryBU=2g@mail.gmail.com>

On 1/13/23 09:06, Dionna Amalie Glaze wrote:
> Thanks for your perspective, Dave. From what I understand,
> distributions lag behind, user kernel configurations can be varied,
> and Kirill's patch set is still untested with regards to memory
> latency of workloads. We may yet see folks opt for a slow boot for
> better latency. This protocol is for safety purposes, since "hope is
> not a strategy" as is commonly said at Google.

Hold on a sec though.

There are two basic strategies here:

 1. Boot to userspace as fast as possible without accepting memory.
    This runs apps more sooner after boot, but exposes those apps to the
    latency of memory acceptance.

 2. Accept all memory before running userspace.  This makes the boot
    slower but means that apps never see memory acceptance latency.

Kirill's _initial_ patch does #1.  If anyone desperately wants #2, they
have mechanisms available to make a kernel with only #1 approximate #2.
A user on that kernel could allocate and memset()ing a bunch of memory.
Or, they could have a firmware stub accept the memory before booting the
real kernel.

It also doesn't rule out having a runtime knob or a boot parameter
implement #2.  It's not a lot of code, but it involves new ABI.

However, *NONE* of this points me in the direction of saying that we
should have an OS/firmware protocol to negotiate whether the firmware or
OS does page acceptance other than the existing UEFI memory map bit.

  reply	other threads:[~2023-01-13 17:57 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13  0:14 [PATCH v9 0/4] Add safe unaccepted memory behavior Dionna Glaze
2023-01-13  0:14 ` [PATCH v9 1/4] OvmfPkg: Introduce CocoDxe driver Dionna Glaze
2023-01-13  0:14 ` [PATCH v9 2/4] MdePkg: Introduce the MemoryAcceptance protocol Dionna Glaze
2023-01-13  0:14 ` [PATCH v9 3/4] OvmfPkg: Implement AcceptAllUnacceptedMemory in CocoDxe Dionna Glaze
2023-01-13  0:14 ` [PATCH v9 4/4] OvmfPkg/PlatformPei: SEV-SNP make >=4GB unaccepted Dionna Glaze
2023-01-13  3:46 ` [PATCH v9 0/4] Add safe unaccepted memory behavior Yao, Jiewen
2023-01-13  7:18   ` [edk2-devel] " Gerd Hoffmann
2023-01-13  7:32     ` Yao, Jiewen
2023-01-13  9:32       ` Ard Biesheuvel
2023-01-13 11:11         ` Yao, Jiewen
2023-01-13 11:24           ` Ard Biesheuvel
2023-01-13 11:44             ` Yao, Jiewen
2023-01-13 12:00               ` Ard Biesheuvel
2023-01-13 16:00               ` dave.hansen
2023-01-13 17:06                 ` Dionna Glaze
2023-01-13 17:57                   ` Dave Hansen [this message]
2023-01-13 18:23                     ` Dionna Glaze
2023-01-13 18:34                       ` Dave Hansen
2023-01-16 10:28                         ` Gerd Hoffmann
2023-01-24 22:42                           ` Lendacky, Thomas
2023-01-24 22:46                             ` Dave Hansen
2023-01-25  9:01                             ` Ard Biesheuvel
2023-01-25  9:18                               ` Gerd Hoffmann
2023-01-25 11:44                                 ` Ard Biesheuvel
2023-01-25 12:10                                   ` Gerd Hoffmann
2023-01-25 14:52                                     ` Ard Biesheuvel
2023-01-25 16:56                                       ` Yao, Jiewen

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-list 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=0918b9db-c949-75ce-a24e-f12f03865938@intel.com \
    --to=devel@edk2.groups.io \
    /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