linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Airlie <airlied@linux.ie>, Jonathan Corbet <corbet@lwn.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Xuefeng Li <lixuefeng@loongson.cn>,
	Yanteng Si <siyanteng@loongson.cn>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Huacai Chen <chenhuacai@loongson.cn>
Subject: Re: [PATCH V8 11/22] LoongArch: Add process management
Date: Tue, 22 Mar 2022 11:07:11 +0800	[thread overview]
Message-ID: <CAAhV-H7akp8RNyw=7qJPgWeApAzf0u4kBNbOHzgQN9Mx3PfzcQ@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a1ST1hBnhepvoQ9UTbAM=56JEU=-OiBAFQeK2rgaZ5aWw@mail.gmail.com>

Hi, Arnd,

On Mon, Mar 21, 2022 at 4:43 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> 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.
I think using a 16KB stack for all configurations (4KB/16KB/64KB) is
the simplest way. Right?

Huacai
>
>        Arnd

  reply	other threads:[~2022-03-22  3:07 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-19 14:27 [PATCH V8 00/22] arch: Add basic LoongArch support Huacai Chen
2022-03-19 14:31 ` [PATCH V8 01/22] Documentation: LoongArch: Add basic documentations Huacai Chen
2022-03-19 14:31   ` [PATCH V8 02/22] Documentation/zh_CN: Add basic LoongArch documentations Huacai Chen
2022-03-19 14:31   ` [PATCH V8 03/22] LoongArch: Add elf-related definitions Huacai Chen
2022-03-19 14:31   ` [PATCH V8 04/22] LoongArch: Add writecombine support for drm Huacai Chen
2022-03-19 14:31   ` [PATCH V8 05/22] LoongArch: Add build infrastructure Huacai Chen
2022-03-21  8:31     ` Arnd Bergmann
2022-03-21  8:53       ` Huacai Chen
2022-03-19 14:31   ` [PATCH V8 06/22] LoongArch: Add CPU definition headers Huacai Chen
2022-03-19 14:31   ` [PATCH V8 07/22] LoongArch: Add atomic/locking headers Huacai Chen
2022-03-21  9:42     ` Arnd Bergmann
2022-03-22  3:03       ` Huacai Chen
2022-03-22  9:23         ` Arnd Bergmann
2022-03-19 14:38 ` [PATCH V8 08/22] LoongArch: Add other common headers Huacai Chen
2022-03-19 14:38   ` [PATCH V8 09/22] LoongArch: Add boot and setup routines Huacai Chen
2022-03-21  9:58     ` Arnd Bergmann
2022-03-19 14:38   ` [PATCH V8 10/22] LoongArch: Add exception/interrupt handling Huacai Chen
2022-03-21  8:38     ` Arnd Bergmann
2022-03-21  8:46       ` Huacai Chen
2022-03-21  9:49         ` Arnd Bergmann
2022-03-22  2:53           ` Huacai Chen
2022-03-19 14:38   ` [PATCH V8 11/22] LoongArch: Add process management Huacai Chen
2022-03-21  8:42     ` Arnd Bergmann
2022-03-22  3:07       ` Huacai Chen [this message]
2022-03-22  9:00         ` Arnd Bergmann
2022-03-19 14:38   ` [PATCH V8 12/22] LoongArch: Add memory management Huacai Chen
2022-03-19 14:38   ` [PATCH V8 13/22] LoongArch: Add system call support Huacai Chen
2022-03-21  8:54     ` Arnd Bergmann
2022-03-21  9:41       ` Huacai Chen
2022-03-21  9:47         ` Arnd Bergmann
2022-03-22  2:56           ` Huacai Chen
2022-03-22 16:02           ` Christian Brauner
2022-03-24  2:32             ` Feiyang Chen
2022-03-19 14:38   ` [PATCH V8 14/22] LoongArch: Add signal handling support Huacai Chen
2022-03-19 14:38   ` [PATCH V8 15/22] LoongArch: Add elf and module support Huacai Chen
2022-03-19 14:38   ` [PATCH V8 16/22] LoongArch: Add misc common routines Huacai Chen
2022-03-19 14:38   ` [PATCH V8 17/22] LoongArch: Add some library functions Huacai Chen
2022-03-19 14:38   ` [PATCH V8 18/22] LoongArch: Add PCI controller support Huacai Chen
2022-03-19 14:38   ` [PATCH V8 19/22] LoongArch: Add VDSO and VSYSCALL support Huacai Chen
2022-03-19 14:38   ` [PATCH V8 20/22] LoongArch: Add multi-processor (SMP) support Huacai Chen
2022-03-19 14:38   ` [PATCH V8 21/22] LoongArch: Add Non-Uniform Memory Access (NUMA) support Huacai Chen
2022-03-19 14:38   ` [PATCH V8 22/22] LoongArch: Add Loongson-3 default config file Huacai Chen
2022-03-21 10:09 ` [PATCH V8 00/22] arch: Add basic LoongArch support Arnd Bergmann
2022-03-21 16:59   ` Linus Torvalds
2022-03-21 21:55     ` Arnd Bergmann
2022-03-21 22:03       ` Linus Torvalds

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='CAAhV-H7akp8RNyw=7qJPgWeApAzf0u4kBNbOHzgQN9Mx3PfzcQ@mail.gmail.com' \
    --to=chenhuacai@kernel.org \
    --cc=airlied@linux.ie \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@loongson.cn \
    --cc=corbet@lwn.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=siyanteng@loongson.cn \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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).