cvs commit: src/sys/amd64/amd64 cpu_switch.S machdep.c

David Xu davidxu at FreeBSD.org
Mon Oct 17 16:10:32 PDT 2005


davidxu     2005-10-17 23:10:31 UTC

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      cpu_switch.S machdep.c 
  Log:
  Micro optimization for context switch. Eliminate code for saving gs.base
  and fs.base. We always update pcb.pcb_gsbase and pcb.pcb_fsbase
  when user wants to set them, in context switch routine, we only need to
  write them into registers, we never have to read them out from registers
  when thread is switched away. Since rdmsr is a serialization instruction,
  micro benchmark shows it is worthy to do.
  
  Reviewed by: peter, jhb
  
  Revision  Changes    Path
  1.154     +0 -15     src/sys/amd64/amd64/cpu_switch.S
  1.642     +2 -0      src/sys/amd64/amd64/machdep.c


More information about the cvs-src mailing list