Re: [PATCH] limit thread stack size with >4K pages

James Bottomley <[email protected]>
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
On Sat, 2007-03-17 at 13:23 +0100, Helge Deller wrote:
> -#define THREAD_ORDER            2
> +#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
> +# define THREAD_ORDER  2
> +#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
> +# define THREAD_ORDER  0
> +#elif defined(CONFIG_PARISC_PAGE_SIZE_64KB)
> +# define THREAD_ORDER  0
> +#endif

That's a bit ugly ... and would break if someone added new page sizes.
Can't we do something like

#if PAGE_BITS > 16
#define THREAD_ORDER 0
#else
#define THREAD_ORDER (16 - PAGE_BITS)
#endif

?

James
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.