CVS: cvs.openbsd.org: src

2012-08-01 Thread Mike Belopuhov
CVSROOT:/cvs
Module name:src
Changes by: mi...@cvs.openbsd.org   2012/08/01 09:44:14

Modified files:
sys/arch/amd64/amd64: amd64_mem.c 
sys/arch/i386/i386: i686_mem.c 

Log message:
Use mtrrmask instead of hardcoded values to accommodate newer CPUs
with a large physical address size (greater than 36 bit). Fixes a
major performance hit seen on newer servers where an incorrectly
programmed memory region length affects the PCI device mappings.

While here, make sure to invalidate the TLB after programming MSRs
and fix an incorrect behavior found by deraadt@ where MTRRdefType
was updated outside of the protected region.

The fix was partly obtained from FreeBSD, tested by many.
With and OK deraadt



CVS: cvs.openbsd.org: src

2012-08-01 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2012/08/01 21:18:48

Modified files:
sys/kern   : kern_clock.c kern_exec.c kern_exit.c 
 kern_fork.c subr_prof.c 
sys/sys: proc.h systm.h 
bin/ps : ps.1 

Log message:
Apply profiling to all threads instead of just the thread that called
profil() by moving P_PROFIL from proc-p_flag to process-ps_flags with
matching adjustment in fork1() and exit1()

ok matthew@