DragonFly BSD
DragonFly commits List (threaded) for 2011-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - More many-cores SMP work


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Oct 2011 00:05:08 -0700 (PDT)

commit d2d8515bfb3ec54e781aeef674516e513bfbb8cb
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Thu Oct 27 23:50:51 2011 -0700

    kernel - More many-cores SMP work
    
    * Add lwkt_yield() calls in a few critical places which can hog the cpu
      on large many-cores boxes during periods of very heavy contention.  This
      allows other kernel threads on the same cpu to run and reduces symptoms
      of e.g. high ping times under certain load conditions.
    
    * Run the callout kernel threads at the same priority as other kernel
      threads so cpu-hogging operations run from callouts can yield to
      other kernel threads (e.g. yield to the netisr threads).
    
    * Change the vm_page_alloc() API to catch situations where the allocation
      races an insertion due to potentially blocking when dealing with
      PQ_CACHE pages.  VM_ALLOC_NULL_OK allows vm_page_alloc() to return NULL
      in this case (otherwise it will panic).
    
    * Change vm_page_insert() to return TRUE if the insertion succeeded and
      FALSE if it didn't due to a race against another thread.
    
    * Change the meaning of the cpuid argument to lwkt_alloc_thread() and
      lwkt_create().  A cpuid of -1 will cause the kernel to choose a cpu
      to run the thread on (instead of choosing the current cpu).
    
      Eventually this specification will allow dynamic migration (but not at
      the moment).
    
      Adjust lwp_fork() to specify the current cpu, required for initial
      LWKT calls when setting the forked thread up.
    
      Numerous kernel threads will now be spread around available cpus for
      now.  devfs core threads, NFS socket threads, etc.
    
      Interrupt threads are still fixed on cpu 0 awaiting additional work from
      Sephe.
    
      Put the emergency interrupt thread on the last cpu.
    
    * Change the vm_page_grab() API.  When VM_ALLOC_ZERO is specified the
      vm_page_grab() code will automatically set an invalid page valid and
      zero it (using the PG_ZERO optimization if possible).  Pages which are
      already valid are not zero'd.
    
      This simplies several use cases.
    
    * Change vm_fault_page() to enter the page into the pmap while the vm_map
      is still locked, instead of after unlocking it.  For now anyhow.
    
    * Minor change to ensure that a deterministic value is stored in *freebuf
      in vn_fullpath().
    
    * Minor debugging features added to help track down a x86-64 sge-fault
      issue.

Summary of changes:
 sys/dev/agp/agp.c                      |   15 ++--
 sys/dev/agp/agp_i810.c                 |    7 +-
 sys/kern/kern_fork.c                   |   11 ++-
 sys/kern/kern_intr.c                   |    6 +-
 sys/kern/kern_kthread.c                |    2 +
 sys/kern/kern_synch.c                  |    3 +
 sys/kern/kern_timeout.c                |    6 ++-
 sys/kern/lwkt_thread.c                 |   28 +++++---
 sys/kern/subr_disk.c                   |    2 +-
 sys/kern/uipc_syscalls.c               |    3 +-
 sys/kern/vfs_cache.c                   |    1 +
 sys/platform/pc32/i386/pmap.c          |   38 ++---------
 sys/platform/pc64/x86_64/trap.c        |   34 +++++++++-
 sys/platform/vkernel/platform/pmap.c   |   15 +----
 sys/platform/vkernel64/platform/pmap.c |   23 ++-----
 sys/sys/kthread.h                      |    2 -
 sys/vfs/devfs/devfs_core.c             |    2 +-
 sys/vfs/nfs/nfs_vfsops.c               |    4 +-
 sys/vm/device_pager.c                  |    5 +-
 sys/vm/swap_pager.c                    |    9 +++
 sys/vm/vm_contig.c                     |    6 ++-
 sys/vm/vm_fault.c                      |   61 ++++++++++++-----
 sys/vm/vm_kern.c                       |    7 +--
 sys/vm/vm_map.c                        |    5 +-
 sys/vm/vm_object.c                     |   14 ++--
 sys/vm/vm_page.c                       |  115 +++++++++++++++++++++----------
 sys/vm/vm_page.h                       |   15 +++--
 sys/vm/vm_pageout.c                    |    5 ++
 sys/vm/vm_swapcache.c                  |    2 +-
 29 files changed, 263 insertions(+), 183 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d2d8515bfb3ec54e781aeef674516e513bfbb8cb


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]