Re: [GIT PULL] core kernel update

From: Linus Torvalds
Date: Tue Nov 19 2013 - 14:18:16 EST


On Tue, Nov 19, 2013 at 11:09 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> As you pointed out offstack is definitely nonsensical for
> NR_CPUS <= 64. (on 64-bit CPUs) On-stack is known to crash with
> NR_CPUS >= 1024.
>
> The 128..512 CPUs range is somewhat of an unknown.

Agreed. And we could even decide to ask somewhere in that range.

I think 128 bits is still safely "don't bother with an external
pointer" (it's just two words, it's like a "struct list_head" -
there's no way that should be unsafe on the stack). Once we get to 256
bits I start going "Hmm, that's 32 bytes, maybe an external allocation
makes sense..."

I'd personally put the cut-off point at just keeping it on-stack if
it's smaller than or equal to 256. But I agree that at that point it's
really just a judgement call.

Linus
--
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/