Re: [RFC] 4KB stack + irq stack for x86

Linus Torvalds (torvalds@transmeta.com)
Wed, 5 Jun 2002 11:53:10 -0700 (PDT)


On Wed, 5 Jun 2002, Benjamin LaHaise wrote:
>
> Ah, you're right. If anyone uses current_thread_info from IRQ context
> it will set the flags in the wrong structure. However, it actually
> works because nobody does that currently: all of the _thread_flag users
> appear to be coming in from task context. Mostly that's luck as I
> didn't change the smp ipis to switch stacks, so the only place that
> is an interrupt and needs to access the actual thread data, does.

Hmm..

How about just making the interrupt code (ie do_IRQ()) or in the flags
into the "parent" flags.

All of the flags should be "sticky one-bits", so just oring them should do
the right thing.

That way we don't have to add nasty BUG checks to the code, and since
we're already dirtying both cache-lines the extra overhead should
literally be just the cost of doing one locked "orl".

Linus

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