lkml.org 
[lkml]   [2003]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 4G/4G preempt on vstack
On Sat, 30 Aug 2003, Mika Penttila wrote:
> hmm. you make the window smaller, but can't the preempt happen even
> inside repeat_if_esp_changed, after xorl? Disabling interrupts seems the
> only solution.

Your conclusion may very well be right.

Certainly the preempt can happen anywhere there, and I was going
to argue that it doesn't matter. All we need is to be looking up
TI_real_stack(%ebp) at a time when %ebp is sure to be pointing at
our task's virtual stack. That real stack will be valid whatever
cpu we're on, but we need to be sure we were looking through the
right window at the moment when we looked it up.

But my error is to say "the preempt": there could be more than one.
Then you can imagine that cpu and %esp at the end are the same as
cpu and %esp at the beginning; but in between, when looking up
TI_real_stack(%ebp), it was actually on another cpu and %ebp was
the wrong pointer. Very unlikely, but possible.

I was trying to avoid pushfl, cli, popfl, being ignorant of how
much overhead they add (into what I'm sure Ingo would like to keep
as fast a path as possible). Perhaps there's still a neat way they
can be avoided, perhaps I'm just being silly to try to avoid them.

Sorry, I'm sleepy, perhaps someone else will fix this up now?

Hugh

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

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.507 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site