[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080815155457.GA5210@shareable.org>
Date: Fri, 15 Aug 2008 16:54:57 +0100
From: Jamie Lokier <jamie@...reable.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Ulrich Drepper <drepper@...hat.com>,
Arjan van de Ven <arjan@...radead.org>,
akpm@...ux-foundation.org, hugh@...itas.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, briangrant@...gle.com,
cgd@...gle.com, mbligh@...gle.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: pthread_create() slow for many threads; also time to revisit 64b context switch optimization?
Ingo Molnar wrote:
> As unimplemented flags just get ignored by the kernel, if this flag goes
> into v2.6.27 as-is and is ignored by the kernel (i.e. we just use a
> plain old 64-bit [47-bit] allocation), then you could do the glibc
> change straight away, correct? So then if people complain we can fix it
> in the kernel purely.
>
> how about this then?
> +#define MAP_64BIT_STACK 0x20000 /* give out 32bit addresses on old CPUs */
I think the flag makes sense but it's name is confusing - 64BIT for a
flag which means "maybe request 32-bit stack"! Suggest:
+#define MAP_STACK 0x20000 /* 31bit or 64bit address for stack, */
+ /* whichever is faster on this CPU */
Also, is this _only_ useful for thread stacks, or are there other
memory allocations where 31-bitness affects execution speed on old P4s?
-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists