RE: userret() , ast() and the end of syscalls

2002-07-10 Thread John Baldwin
On 09-Jul-2002 Julian Elischer wrote: On Wed, 10 Jul 2002, Bruce Evans wrote: Can these flags be changed asynchronously? If so, then everything needs to be handled by ast() anyway. userret() should only check for work that needs doing in the usual case, and hopefully there is none

RE: userret() , ast() and the end of syscalls

2002-07-10 Thread Bruce Evans
On Wed, 10 Jul 2002, John Baldwin wrote: On 09-Jul-2002 Julian Elischer wrote: On Wed, 10 Jul 2002, Bruce Evans wrote: Can these flags be changed asynchronously? If so, then everything needs to be handled by ast() anyway. userret() should only check for work that needs doing in the

userret() , ast() and the end of syscalls

2002-07-09 Thread Julian Elischer
A question to those who know.. why is userret() called both at the end of trap() or syscall() and also almost immediatly again (often) at the end of ast(). It seems that really there is no one place that one can put code that will be called ONCE and ONLY ONCE as a thread progresses to

Re: userret() , ast() and the end of syscalls

2002-07-09 Thread David Xu
] To: FreeBSD current users [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 2:40 PM Subject: userret() , ast() and the end of syscalls A question to those who know.. why is userret() called both at the end of trap() or syscall() and also almost immediatly again (often) at the end of ast

RE: userret() , ast() and the end of syscalls

2002-07-09 Thread John Baldwin
On 09-Jul-2002 Julian Elischer wrote: A question to those who know.. why is userret() called both at the end of trap() or syscall() and also almost immediatly again (often) at the end of ast(). ast() is really a special form of a trap that is triggered by doing a last-minute type check

Re: userret() , ast() and the end of syscalls

2002-07-09 Thread John Baldwin
On 09-Jul-2002 David Xu wrote: I found the problem two weeks ago, but I can not find a better way to avoid userret() to be called twice. so I keep silence. :( It is only called twice if an AST is posted. It is _not_ always called twice. -- John Baldwin [EMAIL PROTECTED]

RE: userret() , ast() and the end of syscalls

2002-07-09 Thread John Baldwin
On 09-Jul-2002 John Baldwin wrote: On 09-Jul-2002 Julian Elischer wrote: A question to those who know.. why is userret() called both at the end of trap() or syscall() and also almost immediatly again (often) at the end of ast(). ast() is really a special form of a trap that is

Re: userret() , ast() and the end of syscalls

2002-07-09 Thread David Xu
- Original Message - From: John Baldwin [EMAIL PROTECTED] To: John Baldwin [EMAIL PROTECTED] Cc: FreeBSD current users [EMAIL PROTECTED]; FreeBSD current users [EMAIL PROTECTED]; Julian Elischer [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 8:40 PM Subject: RE: userret() , ast

RE: userret() , ast() and the end of syscalls

2002-07-09 Thread Bruce Evans
On Tue, 9 Jul 2002, John Baldwin wrote: On 09-Jul-2002 John Baldwin wrote: On 09-Jul-2002 Julian Elischer wrote: A question to those who know.. why is userret() called both at the end of trap() or syscall() and also almost immediatly again (often) at the end of ast(). ast() is

RE: userret() , ast() and the end of syscalls

2002-07-09 Thread Julian Elischer
On Wed, 10 Jul 2002, Bruce Evans wrote: Hopefully there won't be any unconditional code. Unconditional code in userret() pessimizes all syscalls. Unconditional code added by KSEIII pessimized basic syscall overhead by 10% according to lmbench2. Mostly it's conditional.. if

RE: userret() , ast() and the end of syscalls

2002-07-09 Thread Julian Elischer
On Wed, 10 Jul 2002, Bruce Evans wrote: On Tue, 9 Jul 2002, Julian Elischer wrote: On Wed, 10 Jul 2002, Bruce Evans wrote: Hopefully there won't be any unconditional code. Unconditional code in userret() pessimizes all syscalls. Unconditional code added by KSEIII pessimized

RE: userret() , ast() and the end of syscalls

2002-07-09 Thread Julian Elischer
On Wed, 10 Jul 2002, Bruce Evans wrote: Can these flags be changed asynchronously? If so, then everything needs to be handled by ast() anyway. userret() should only check for work that needs doing in the usual case, and hopefully there is none (except for things like ktrace). That's an