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

Linus Torvalds (torvalds@transmeta.com)
Wed, 5 Jun 2002 08:33:13 -0700 (PDT)


On Tue, 4 Jun 2002, Benjamin LaHaise wrote:
>
> Below is a patch against 2.5.20 that implements 4KB stacks for tasks,
> plus a seperate 4KB irq stack for use by interrupts.

Hmm.. Interesting.

However, you seem to be moving only the task structure pointer into the
new interrupt stack thread info, which seems to ignore all the "flags"
things.

So, as far as I can tell, we now get a nasty aliasing issue on
"current_thread_info()->flags", and information like NEED_RESCHED and
SIGPENDING end up being set in the wrong place. They get set on the
_interrupt_ thread_info, not the "process native" thread_info.

Or did I miss some subtlety?

Note that some of this may be hidden by the fact that not everybody uses
the "current_thread_info()" thing, most people still use the old format
"tsk->thread_info".

For example: "set_need_resched()" -> "set_thread_flag(TIF_NEED_RESCHED)"
-> "set_bit(fTIF_NEED_RESCHED,&current_thread_info()->flags)".

So any interrupt causing a "set_need_resched()" would appear to not do the
right thing now.

Comments? We can deprecate "current_thread_info()", but that would make
some things slightly less efficient.

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/