All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] x86/sgx: NUMA
@ 2021-03-13 16:01 Jarkko Sakkinen
  2021-03-13 16:01 ` [PATCH v4 1/3] x86/sgx: Use sgx_free_epc_page() in sgx_reclaim_pages() Jarkko Sakkinen
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Jarkko Sakkinen @ 2021-03-13 16:01 UTC (permalink / raw)
  To: linux-sgx; +Cc: Jarkko Sakkinen, Dave Hansen, Borislav Petkov, Haitao Huang

Make sgx_alloc_epc_page() more balanced among the NUMA nodes, refactoring
hierarchical listi into a single global free list managed in FIFO fashion.

Introduce NUMA node local free EPC page lists. In sgx_alloc_epc_page(), try
first to allocate from the local free list, and fallback to global free
list, if the local list is empty.

Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Haitao Huang <haitao.huang@linux.intel.com>

v3:
* Expanded into a full patch set, which also implements more balanced
  EPC allocation among the NUMA nodes. Since none of the patches fully
  match the previous single patch entry, included earlier change log
  to the cover letter.

v2:
* s/section_list/numa_section_list/
* s/MAX_NUMNODES//num_possible_nodes()/
* Add more verbose inline comments that Dave provided.
* If NUMA mapping fails, print a warning and description of the fallback.
  The physical address is already printed in pr_info(), just before the
  mapping happens.

Jarkko Sakkinen (3):
  x86/sgx: Use sgx_free_epc_page() in sgx_reclaim_pages()
  x86/sgx: Replace section local dirty page lists with a global list
  x86/sgx: Add a basic NUMA allocation scheme to sgx_alloc_epc_page()

 arch/x86/Kconfig               |   1 +
 arch/x86/kernel/cpu/sgx/main.c | 203 ++++++++++++++++++---------------
 arch/x86/kernel/cpu/sgx/sgx.h  |  23 ++--
 3 files changed, 121 insertions(+), 106 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-03-16 12:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 16:01 [PATCH v4 0/3] x86/sgx: NUMA Jarkko Sakkinen
2021-03-13 16:01 ` [PATCH v4 1/3] x86/sgx: Use sgx_free_epc_page() in sgx_reclaim_pages() Jarkko Sakkinen
2021-03-15 15:32   ` Dave Hansen
2021-03-15 19:06     ` Jarkko Sakkinen
2021-03-15 19:27       ` Jarkko Sakkinen
2021-03-16 12:50         ` Jarkko Sakkinen
2021-03-13 16:01 ` [PATCH v4 2/3] x86/sgx: Replace section local dirty page lists with a global list Jarkko Sakkinen
2021-03-15 16:03   ` Dave Hansen
2021-03-15 19:14     ` Jarkko Sakkinen
2021-03-15 19:47       ` Dave Hansen
2021-03-13 16:01 ` [PATCH v4 3/3] x86/sgx: Add a basic NUMA allocation scheme to sgx_alloc_epc_page() Jarkko Sakkinen
2021-03-14 11:56   ` Jarkko Sakkinen
2021-03-15 16:35   ` Dave Hansen
2021-03-15 19:23     ` Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.