Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2002 09:31:49 -0400 (EDT)
From:      Andrew Gallatin <gallatin@cs.duke.edu>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Ian Dowse <iedowse@maths.tcd.ie>, arch@FreeBSD.ORG
Subject:   Re: Solving the stack gap issue
Message-ID:  <15714.17605.575558.398279@grasshopper.cs.duke.edu>
In-Reply-To: <20020818055951.N12475-100000@gamplex.bde.org>
References:  <200208171918.aa72556@salmon.maths.tcd.ie> <20020818055951.N12475-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Bruce Evans writes:
 > 
 > I'd like normal calls to have a fast path.  We're already 1 or 2 layers
 > slower than Linux.  (Linux on i386's does something like
 > "pushal; call syscalltable(,%eax,4)" for the fast path, so it goes directly
 > from the lowest layer to sys_foo(), but FreeBSD calls syscall() from the
 > lowest label and syscall() does lots of relatively slow things.)

Is there any chance of getting this fastpath?  Or at least making
syscall() more streamlined?

For example, why do we check MPSAFE and conditionally grab and release
GIANT in syscall instead of just grabbing/releasing it in the syscall
itself?  A few thousand instructions worth of bloat might be worth 2
compares in the critical path..  Also, if the copyin fails, why do we
not just set the ret value and jump past the call, rather than setting
error and doing an extra compare a few lines later?

Drew

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15714.17605.575558.398279>