Re: [PATCH][2.6-mm] Fix 4G/4G w/ 8k+ stacks

From: Zwane Mwaikambo
Date: Tue Mar 16 2004 - 12:23:17 EST


On Tue, 16 Mar 2004, William Lee Irwin III wrote:

> On Tue, Mar 16, 2004 at 01:35:36AM -0500, Zwane Mwaikambo wrote:
> > +#ifdef CONFIG_4KSTACKS
> > +#define STACK_PAGE_COUNT (4096/PAGE_SIZE)
> > +#else
> > +#define STACK_PAGE_COUNT (8192/PAGE_SIZE) /* THREAD_SIZE/PAGE_SIZE */
> > +#endif
>
> This looks like it wants to be:
>
> #define STACK_PAGE_COUNT (PAGE_ALIGN(THREAD_SIZE)/PAGE_SIZE)
>
> (There are reasons to want THREAD_SIZE < PAGE_SIZE having to do with
> elevating PAGE_SIZE as opposed to shrinking THREAD_SIZE outright.)

Ah yes, i forgot about that case thanks for pointing it out.

> It looks like kmap_types.h should inherits PAGE_* from processor.h
> which in turn should inherit them from page.h
>
> Did the headers barf on this or something? I can't imagine you didn't
> think of it already.

Yes it does inherit PAGE_*, but i needed to specify the same thing in
processor.h so i made it one define to make grepping easier and the
intention more obvious.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/