cvs commit: src/sys/dev/disk/vn vn.c src/sys/kern kern_slaballoc.c uipc_syscalls.c vfs_bio.c src/sys/sys thread.h vnode.h src/sys/vm swap_pager.c vm_fault.c vm_glue.c vm_page.c vm_pageout.c vm_pageout.h

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Jun 30 19:04:26 PDT 2008


dillon      2008/06/30 19:02:56 PDT

DragonFly src repository

  Modified files:
    sys/dev/disk/vn      vn.c 
    sys/kern             kern_slaballoc.c uipc_syscalls.c 
                         vfs_bio.c 
    sys/sys              thread.h vnode.h 
    sys/vm               swap_pager.c vm_fault.c vm_glue.c 
                         vm_page.c vm_pageout.c vm_pageout.h 
  Log:
  Fix numerous pageout daemon -> buffer cache deadlocks in the main system.
  These issues usually only occur on systems with small amounts of ram
  but it is possible to trigger them on any system.
  
  * Get rid of the IO_NOBWILL hack.  Just have the VN device use IO_DIRECT,
    which will clean out the buffer on completion of the write.
  
  * Add a timeout argument to vm_wait().
  
  * Add a thread->td_flags flag called TDF_SYSTHREAD.  kmalloc()'s made
    from designated threads are allowed to dip into the system reserve
    when allocating pages.  Only the pageout daemon and buf_daemon[_hw] use
    the flag.
  
  * Add a new static procedure, recoverbufpages(), which explicitly tries to
    free buffers and their backing pages on the clean queue.
  
  * Add a new static procedure, bio_page_alloc(), to do all the nasty work
    of allocating a page on behalf of a buffer cache buffer.
  
    This function will call vm_page_alloc() with VM_ALLOC_SYSTEM to allow
    it to dip into the system reserve.  If the allocation fails this
    function will call recoverbufpages() to try to recycle from VM pages
    from clean buffer cache buffers, and will then attempt to reallocate
    using VM_ALLOC_SYSTEM | VM_ALLOC_INTERRUPT to allow it to dip into
    the interrupt reserve as well.
  
    Warnings will blare on the console.  If the effort still fails we
    sleep for 1/20 of a second and retry.  The idea though is for all
    the effort above to not result in a failure at the end.
  
  Reported-by: Gergo Szakal <bastyaelvtars at gmail.com>
  
  Revision  Changes    Path
  1.38      +1 -1      src/sys/dev/disk/vn/vn.c
  1.54      +3 -3      src/sys/kern/kern_slaballoc.c
  1.86      +1 -1      src/sys/kern/uipc_syscalls.c
  1.109     +202 -27   src/sys/kern/vfs_bio.c
  1.94      +1 -1      src/sys/sys/thread.h
  1.81      +1 -5      src/sys/sys/vnode.h
  1.32      +1 -1      src/sys/vm/swap_pager.c
  1.47      +1 -1      src/sys/vm/vm_fault.c
  1.56      +2 -2      src/sys/vm/vm_glue.c
  1.39      +7 -6      src/sys/vm/vm_page.c
  1.36      +1 -0      src/sys/vm/vm_pageout.c
  1.8       +1 -1      src/sys/vm/vm_pageout.h


http://www.dragonflybsd.org/cvsweb/src/sys/dev/disk/vn/vn.c.diff?r1=1.37&r2=1.38&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/kern_slaballoc.c.diff?r1=1.53&r2=1.54&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/uipc_syscalls.c.diff?r1=1.85&r2=1.86&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/kern/vfs_bio.c.diff?r1=1.108&r2=1.109&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/thread.h.diff?r1=1.93&r2=1.94&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/sys/vnode.h.diff?r1=1.80&r2=1.81&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/swap_pager.c.diff?r1=1.31&r2=1.32&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_fault.c.diff?r1=1.46&r2=1.47&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_glue.c.diff?r1=1.55&r2=1.56&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_page.c.diff?r1=1.38&r2=1.39&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_pageout.c.diff?r1=1.35&r2=1.36&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/vm/vm_pageout.h.diff?r1=1.7&r2=1.8&f=u





More information about the Commits mailing list