From owner-svn-src-all@FreeBSD.ORG Thu Apr 7 21:52:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 4567D106566B; Thu, 7 Apr 2011 21:52:08 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Thu, 7 Apr 2011 17:51:58 -0400 User-Agent: KMail/1.6.2 References: <201104072132.p37LWPuu052536@svn.freebsd.org> In-Reply-To: <201104072132.p37LWPuu052536@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104071752.00349.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, John Baldwin Subject: Re: svn commit: r220430 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 21:52:09 -0000 On Thursday 07 April 2011 05:32 pm, John Baldwin wrote: > Author: jhb > Date: Thu Apr 7 21:32:25 2011 > New Revision: 220430 > URL: http://svn.freebsd.org/changeset/base/220430 > > Log: > If a system call does not request a full interrupt return, use a > fast path via the sysretq instruction to return from the system > call. This was removed in 190620 and not quite fully restored in > 195486. This resolves most of the performance regression in system > call microbenchmarks between 7 and 8 on amd64. > > Reviewed by: kib > MFC after: 1 week > > Modified: > head/sys/amd64/amd64/exception.S > > Modified: head/sys/amd64/amd64/exception.S > =================================================================== >=========== --- head/sys/amd64/amd64/exception.S Thu Apr 7 21:29:34 > 2011 (r220429) +++ head/sys/amd64/amd64/exception.S Thu Apr 7 > 21:32:25 2011 (r220430) @@ -339,6 +339,9 @@ IDTVEC(prot) > * and the new privilige level. We are still running on the old > user stack * pointer. We have to juggle a few things around to > find our stack etc. * swapgs gives us access to our PCPU space > only. > + * > + * We do not support invoking this from a custom %cs or %ss (e.g. > using + * entries from an LDT). > */ > IDTVEC(fast_syscall) > swapgs > @@ -380,6 +383,36 @@ IDTVEC(fast_syscall) > movq %rsp,%rdi > call syscall > movq PCPU(CURPCB),%rax > + testq $PCB_FULL_IRET,PCB_FLAGS(%rax) FYI, pcb_flags is u_int now, i.e., we need testl here. Jung-uk Kim