git: DragonFly_RELEASE_2_6 kernel - Fix lwbuf leak for i386

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Mar 31 00:07:08 PDT 2010


commit 360dc0fa99f761a51be278b81f55ecf85613d72d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Mar 30 23:45:52 2010 -0700

    kernel - Fix lwbuf leak for i386
    
    * lwbufs were not being freed back to the originating cpu, creating a
      situation where an infinite number of lwbufs could be allocated.
    
    * Refactor the lwbuf code for i386.  Track the cpu in the lwbuf, remove
      lwbuf_free_kvp, track the number of lwbufs on the free list for each
      cpu.
    
      Free a lwbuf back to the cpu it was originally created on.
    
      Destroy lwbufs and related kmem if the number of free lwbufs on a cpu
      exceeds 256.
    
    * This is a temporary fix until the i386 code can be adjusted to use the
      objcache again.

Summary of changes:
 sys/cpu/i386/include/lwbuf.h           |   13 ++--
 sys/cpu/i386/misc/lwbuf.c              |  110 ++++++++++++++------------------
 sys/platform/pc32/include/globaldata.h |    3 +-
 3 files changed, 56 insertions(+), 70 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/360dc0fa99f761a51be278b81f55ecf85613d72d


-- 
DragonFly BSD source repository





More information about the Commits mailing list