agp(4): Fix some minor issues.

* Move AGP_DEBUG to the global 'options' file. No need to split it by
  platform.

* Add missing file to the Makefile.

* Fix a cast.
kern.fwd.mk: Move comments to the start of the line.

Else they would get output to the screen.

Reported-by: tuxillo
Remove MFILES from kernel module Makefiles. It should not be needed.
iso639: Sync with Library of Congress list.
rc.conf.5: Document rc.conf.d/

Taken-from:     FreeBSD
Pointed-out-by: fgudin
etc/Makefile: Some cleanup.

* Stop creating .profile and .cshrc symlinks in the / directory.

* Silence a bmake warning (the check only applies to i386).

Reported-by: ftigeot, sephe

While here, simplify the way /COPYRIGHT is installed.
kernel - Fix issues where tmpfs loses file data

* For TMPFS, UIO_NOCOPY writes must use bawrite() or bwrite() and must NEVER
  used buwrite() because these operations are being called via the VM page
  cleaning code via the pageout daemon or the vnode termination code
  (when maxvnodes is reached), and the underlying pages are about to be
  destroyed.

* vm_object_terminate() must call vinvalbuf() both before (for normal
  filesystems) and also after (for tmpfs style filesystems).  Otherwise
  buffers potentially not disposed of during the page cleaning might
  get left hanging.  This is a safety feature.

* Remove post-flush test code from vm_object_page_collect_flush() entirely.
  The IO's are in progress at this point so it makes no sense to set
  PG_CLEANCHK here.

* vm_page_need_commit() must make the object writeable and dirty, I think.

* Fix multiple places where m->dirty is tested and PG_NEED_COMMIT is not.

Reported-by: vsrinivas, others
kernel - Fix filesystem lookup error due to parent directory recyclement race

* When looking up a path the parent ncp's vnode is needed to pass into
  the VFS code as the directory vnode (dvp) for the element being looked up.

* Fix a timing race whereby a system under extreme vnode pressure (such as
  when kern.maxvnodes is set to a very low value) can squeek in recyclement
  of this directory vnode when there are no children under it in the
  namecache.

  We fix the problem by holding the directory vnode during the nlookup() and
  cache_resolve().
kernel - Change allocvnode() to not recursively block freeing vnodes

allocvnode() has caused many deadlock issues over the years, including
recent issues with softupdates, because it is often called from deep
within VFS modules and attempts to clean and free unrelated vnodes when
the vnode limit is reached to make room for the new one.

* numvnodes is not protected by any locks and needs atomic ops.

* Change allocvnode() to always allocate and not attempt to free
  other vnodes.

* allocvnode() now flags the LWP to handle reducing the number of vnodes
  in the system as of when it returns to userland instead.  Consolidate
  several flags into a single conditional function call, lwpuserret().

  When triggered, this code will do a limited scan of the free list to
  try to find vnodes to free.

* The vnlru_proc_wait() code existed to handle a separate algorithm
  related to vnodes with cached buffers and VM pages but represented
  a major bottleneck in the system.

  Remove vnlru_proc_wait() and allow vnodes with buffers and/or non-empty
  VM objects to be placed on the free list.

  This also requires not vhold()ing the vnode for related buffer cache
  buffer since the vnode will not go away until related buffers have been
  cleaned out.  We shouldn't need those holds.

Testing-by: vsrinivas
kernel - Adjust NFS server for new allocvnode() code

* Adjust the NFS server to check for LWP_MP_VNLRU garbage collection
  requests and act on them.

  This prevents excessive allocation of vnodes by the nfsd's.
kernel: Import sglist subsystem from FreeBSD

Fixes-from: swildner
Blessed-by: vsrinivas
kernel: Move MPASS and MPASS4 definitions around

They are generic enough to be used in the entire kernel, no need to
keep them in an acpica-specific file.
kernel: Remove MPASS{,4} entirely and use KKASSERT instead.

In-discussion-with: ftigeot
Documentation: MPASS conversion
kernel: add VM_OBJECT_LOCK/UNLOCK macros
kernel - Fix improper assertion panic in vinvalbuf()

* Related to the removal of vhold/vdrop from buffer cache buffers, the
  state of a vnode being cleaned can now contain more active buffers and
  I/O's at the time of the vinvalbuf() call.

* Remove the 'vinvalbuf: dirty bufs' assertion and panic.  It is no longer
  a correct assertion.  Note that we've also had sporatic reports of this
  panic even prior to the work so it might not have been a completely
  correct assertion before either.

* Rework the vinvalbuf buffer-flushing and I/O-waiting code a bit.  We
  have to wait for I/O at least once and it is probably a good idea to
  wait for I/O after each buffer flush pass too, to avoid live-locks.

Reported-by: vsrinivas
igb: Improve tiny packets reception performance on low frequency CPU

Update RDT register a little bit often, so the RX descriptors are made
to the NIC chip on a more regularly base:
The RDT register is updated after certain amount of RX descriptors are
added to the hardware RX ring.  The default value of the amount of RX
descriptors are 32.  This value could be further tuned by per-device
sysctl node hw.igbX.rxY_wreg.

The default value improves tiny packets reception performance w/ 82576
on AMD970@800Mhz under interrupt mode for single stream (1.28Mpps ->
1.48Mpps) and it does not increase CPU usage on AMD970@3500Mhz (CPU
usage stays @36%).

This commit does _not_ seem to affect the tiny packet reception
performance when the workload are evenly distributed to all CPUs.
pktgen: Fix csum_data setting for in_delayed_csum()
kernel: Add cpu_wbinvd_on_all_cpus()

This function invalidates cache on all active cpus

With-help-from: vsrinivas
bnx: Remove redundant TX/RX index reading from polling code