Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1706507 > unrolled thread
| Started by | "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> |
|---|---|
| First post | 2017-08-08 15:00 +0200 |
| Last post | 2017-08-08 15:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCHv4 02/14] mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2017-08-08 15:00 +0200
| From | "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> |
|---|---|
| Date | 2017-08-08 15:00 +0200 |
| Subject | [PATCHv4 02/14] mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS |
| Message-ID | <ucch3-8wk-1@gated-at.bofh.it> |
With boot-time switching between paging mode we will have variable MAX_PHYSMEM_BITS. Let's use the maximum varible possible for CONFIG_X86_5LEVEL=y configuration to define zsmalloc data structures. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> --- mm/zsmalloc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 013eea76685e..468879915d3d 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -93,7 +93,13 @@ #define MAX_PHYSMEM_BITS BITS_PER_LONG #endif #endif + +#ifdef CONFIG_X86_5LEVEL +/* MAX_PHYSMEM_BITS is variable, use maximum value here */ +#define _PFN_BITS (52 - PAGE_SHIFT) +#else #define _PFN_BITS (MAX_PHYSMEM_BITS - PAGE_SHIFT) +#endif /* * Memory for allocating for handle keeps object position by -- 2.13.2
Back to top | Article view | linux.kernel
csiph-web