lkml.org 
[lkml]   [2022]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V8 11/22] LoongArch: Add process management
On Sat, Mar 19, 2022 at 3:38 PM Huacai Chen <chenhuacai@kernel.org> wrote:

> +#ifdef CONFIG_PAGE_SIZE_64KB
> +#define THREAD_SIZE_ORDER (0)
> +#endif
> +
> +#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
> +#define THREAD_MASK (THREAD_SIZE - 1UL)
> +

Having a 64KB stack area is rather wasteful. I think you should use a sub-page
allocation in this configuration, or possibly disallow 64KB page configuration
entirely.

Note that you have to use full pages when using CONFIG_VMAP_STACK, but
you don't seem to support that at the moment, so allocating only 16KB stacks
on a 64KB page config should still work.

Arnd

\
 
 \ /
  Last update: 2022-03-21 10:39    [W:0.156 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site