Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jun 2001 23:35:33 -0700 (PDT)
From:      Bosko Milekic <bmilekic@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/conf files param.c src/sys/kern subr_mbuf.c kern_malloc.c uipc_mbuf.c src/sys/sys mbuf.h sysctl.h src/sys/vm vm_kern.c vm_kern.h vm_map.c vm_object.c src/usr.bin/netstat main.c mbuf.c netstat.h src/usr.bin/systat mbufs.c
Message-ID:  <200106220635.f5M6ZXg55752@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bmilekic    2001/06/21 23:35:33 PDT

  Modified files:
    sys/conf             files param.c 
    sys/kern             kern_malloc.c uipc_mbuf.c 
    sys/sys              mbuf.h sysctl.h 
    sys/vm               vm_kern.c vm_kern.h vm_map.c vm_object.c 
    usr.bin/netstat      main.c mbuf.c netstat.h 
    usr.bin/systat       mbufs.c 
  Added files:
    sys/kern             subr_mbuf.c 
  Log:
  Introduce numerous SMP friendly changes to the mbuf allocator. Namely,
  introduce a modified allocation mechanism for mbufs and mbuf clusters; one
  which can scale under SMP and which offers the possibility of resource
  reclamation to be implemented in the future. Notable advantages:
  
   o Reduce contention for SMP by offering per-CPU pools and locks.
   o Better use of data cache due to per-CPU pools.
   o Much less code cache pollution due to excessively large allocation macros.
   o Framework for `grouping' objects from same page together so as to be able
     to possibly free wired-down pages back to the system if they are no longer
     needed by the network stacks.
  
   Additional things changed with this addition:
  
    - Moved some mbuf specific declarations and initializations from
      sys/conf/param.c into mbuf-specific code where they belong.
    - m_getclr() has been renamed to m_get_clrd() because the old name is really
      confusing. m_getclr() HAS been preserved though and is defined to the new
      name. No tree sweep has been done "to change the interface," as the old
      name will continue to be supported and is not depracated. The change was
      merely done because m_getclr() sounds too much like "m_get a cluster."
    - TEMPORARILY disabled mbtypes statistics displaying in netstat(1) and
      systat(1) (see TODO below).
    - Fixed systat(1) to display number of "free mbufs" based on new per-CPU
      stat structures.
    - Fixed netstat(1) to display new per-CPU stats based on sysctl-exported
      per-CPU stat structures. All infos are fetched via sysctl.
  
   TODO (in order of priority):
  
    - Re-enable mbtypes statistics in both netstat(1) and systat(1) after
      introducing an SMP friendly way to collect the mbtypes stats under the
      already introduced per-CPU locks (i.e. hopefully don't use atomic() - it
      seems too costly for a mere stat update, especially when other locks are
      already present).
    - Optionally have systat(1) display not only "total free mbufs" but also
      "total free mbufs per CPU pool."
    - Fix minor length-fetching issues in netstat(1) related to recently
      re-enabled option to read mbuf stats from a core file.
    - Move reference counters at least for mbuf clusters into an unused portion
      of the cluster itself, to save space and need to allocate a counter.
    - Look into introducing resource freeing possibly from a kproc.
  
  Reviewed by (in parts): jlemon, jake, silby, terry
  Tested by: jlemon (Intel & Alpha), mjacob (Intel & Alpha)
  Preliminary performance measurements: jlemon (and me, obviously)
  URL: http://people.freebsd.org/~bmilekic/mb_alloc/
  
  Revision  Changes    Path
  1.535     +2 -1      src/sys/conf/files
  1.41      +4 -11     src/sys/conf/param.c
  1.89      +9 -2      src/sys/kern/kern_malloc.c
  1.86      +9 -462    src/sys/kern/uipc_mbuf.c
  1.82      +136 -399  src/sys/sys/mbuf.h
  1.97      +1 -3      src/sys/sys/sysctl.h
  1.71      +7 -9      src/sys/vm/vm_kern.c
  1.23      +1 -3      src/sys/vm/vm_kern.h
  1.204     +6 -6      src/sys/vm/vm_map.c
  1.193     +1 -3      src/sys/vm/vm_object.c
  1.49      +18 -3     src/usr.bin/netstat/main.c
  1.25      +164 -65   src/usr.bin/netstat/mbuf.c
  1.29      +3 -2      src/usr.bin/netstat/netstat.h
  1.12      +55 -23    src/usr.bin/systat/mbufs.c


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106220635.f5M6ZXg55752>