lkml.org 
[lkml]   [2005]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject2.4.29 arch/i386/entry.S question
Date


Hi !

Kernel 2.4.29 (unpatched)
Arch i386

I'm trying to understand the details of what is going on here. As I
understand this, the cli/sti braces are intended for atomicity of
need_resched and signals, but what does the comment at the sti them mean ?
can one get to signal_return without entering at ret_from_sys_call ?
I assumed the sti is just balancing the cli - woong ?

arch/i386/kernel/entry.S:

ENTRY(ret_from_sys_call)
cli # need_resched and signals atomic test
cmpl $0,need_resched(%ebx)
jne reschedule
cmpl $0,sigpending(%ebx)
jne signal_return
restore_all:
RESTORE_ALL

ALIGN
signal_return:
sti # we can get here from an interrupt handler

Also if need_resched and sigpending were not handled atomically, that is if
one removes the cli/sti - would that actually break anything ? It seems that
it could be inefficient as one would reschedule in cases without this
being necessary, and could call do_signal without that it is needed, or is
there more to it ? I removed the cli/sti and rebuilt the system, but could
not find any imediate problems (which off course does not really say much
yet).

thx !
hofrat
-
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-06-05 10:04    [W:0.025 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site