freebsd-dev/sys/powerpc
Alan Cox 51321f7c31 Significantly reduce the cost, i.e., run time, of calls to madvise(...,
MADV_DONTNEED) and madvise(..., MADV_FREE).  Specifically, introduce a new
pmap function, pmap_advise(), that operates on a range of virtual addresses
within the specified pmap, allowing for a more efficient implementation of
MADV_DONTNEED and MADV_FREE.  Previously, the implementation of
MADV_DONTNEED and MADV_FREE relied on per-page pmap operations, such as
pmap_clear_reference().  Intuitively, the problem with this implementation
is that the pmap-level locks are acquired and released and the page table
traversed repeatedly, once for each resident page in the range
that was specified to madvise(2).  A more subtle flaw with the previous
implementation is that pmap_clear_reference() would clear the reference bit
on all mappings to the specified page, not just the mapping in the range
specified to madvise(2).

Since our malloc(3) makes heavy use of madvise(2), this change can have a
measureable impact.  For example, the system time for completing a parallel
"buildworld" on a 6-core amd64 machine was reduced by about 1.5% to 2.0%.

Note: This change only contains pmap_advise() implementations for a subset
of our supported architectures.  I will commit implementations for the
remaining architectures after further testing.  For now, a stub function is
sufficient because of the advisory nature of pmap_advise().

Discussed with: jeff, jhb, kib
Tested by:      pho (i386), marcel (ia64)
Sponsored by:   EMC / Isilon Storage Division
2013-08-29 15:49:05 +00:00
..
aim Revert r254501. Instead, reuse the type stability of the struct pmap 2013-08-22 18:12:24 +00:00
booke Revert r254501. Instead, reuse the type stability of the struct pmap 2013-08-22 18:12:24 +00:00
conf Enable DTrace hooks in ppc64. 2013-08-22 05:07:50 +00:00
cpufreq Remove unused variables. Spotted by a cppcheck 2011-01-06 20:19:01 +00:00
fpu Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs. 2011-11-07 15:43:11 +00:00
include Remove duplicate definition of SPR MMCR0. 2013-08-03 18:05:12 +00:00
mambo kern cons: introduce infrastructure for console grabbing by kernel 2011-12-17 15:08:43 +00:00
mpc85xx Align the PCI Express #defines with the style used for the PCI-X 2012-09-18 22:04:59 +00:00
ofw Micro-optimize OFW syscons 8-bit blank. 2013-08-06 03:09:44 +00:00
powermac Return EIO iso -1, the kiic_transfer has an signed return. 2013-08-23 20:39:41 +00:00
powerpc Significantly reduce the cost, i.e., run time, of calls to madvise(..., 2013-08-29 15:49:05 +00:00
ps3 MFcalloutng: 2013-02-28 10:46:54 +00:00
psim - With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related 2013-04-06 19:12:49 +00:00
wii Fix indentation. 2013-07-02 07:17:56 +00:00