Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Nov 2003 14:54:45 -0800 (PST)
From:      Peter Wemm <peter@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/amd64/amd64 machdep.c src/sys/amd64/include pcpu.h
Message-ID:  <200311202254.hAKMsj2Y009764@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
peter       2003/11/20 14:54:45 PST

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      machdep.c 
    sys/amd64/include    pcpu.h 
  Log:
  Provide a streamlined '#define curthread __curthread()' for amd64 to avoid
  the compiler having to parse and optimize the PCPU_GET(curthread) so often.
  __curthread() is an inline optimized version of PCPU_GET(curthread) that
  knows that pc_curthread is at offset zero in the pcpu struct.  Add a
  CTASSERT() to catch any possible changes to this.  This accounts for
  just over a 1% wall clock speedup for total kernel compile/link time,
  and 20% compile time speedup on some specific files depending on which
  compile options are used.
  
  Approved by:  re (jhb)
  
  Revision  Changes    Path
  1.600     +3 -0      src/sys/amd64/amd64/machdep.c
  1.41      +10 -0     src/sys/amd64/include/pcpu.h



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