1. 04 Dec, 2010 1 commit
    • Tero Roponen's avatar
      slub: Fix a crash during slabinfo -v · 8165984a
      Tero Roponen authored
      Commit f7cb1933 ("SLUB: Pass active
      and inactive redzone flags instead of boolean to debug functions")
      missed two instances of check_object(). This caused a lot of warnings
      during 'slabinfo -v' finally leading to a crash:
      
        BUG ext4_xattr: Freepointer corrupt
        ...
        BUG buffer_head: Freepointer corrupt
        ...
        BUG ext4_alloc_context: Freepointer corrupt
        ...
        ...
        BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
        IP: [<ffffffff810a291f>] file_sb_list_del+0x1c/0x35
        PGD 79d78067 PUD 79e67067 PMD 0
        Oops: 0002 [#1] SMP
        last sysfs file: /sys/kernel/slab/:t-0000192/validate
      
      This patch fixes the problem by converting the two missed instances.
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarTero Roponen <tero.roponen@gmail.com>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      8165984a
  2. 28 Nov, 2010 1 commit
    • Steven Rostedt's avatar
      tracing/slab: Move kmalloc tracepoint out of inline code · 85beb586
      Steven Rostedt authored
      The tracepoint for kmalloc is in the slab inlined code which causes
      every instance of kmalloc to have the tracepoint.
      
      This patch moves the tracepoint out of the inline code to the
      slab C file, which removes a large number of inlined trace
      points.
      
        objdump -dr vmlinux.slab| grep 'jmpq.*<trace_kmalloc' |wc -l
      213
        objdump -dr vmlinux.slab.patched| grep 'jmpq.*<trace_kmalloc' |wc -l
      1
      
      This also has a nice impact on size.
      
         text	   data	    bss	    dec	    hex	filename
      7023060	2121564	2482432	11627056	 b16a30	vmlinux.slab
      6970579	2109772	2482432	11562783	 b06f1f	vmlinux.slab.patched
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      85beb586
  3. 06 Nov, 2010 4 commits
    • Pavel Emelyanov's avatar
      slub: Fix slub_lock down/up imbalance · 98072e4d
      Pavel Emelyanov authored
      There are two places, that do not release the slub_lock.
      
      Respective bugs were introduced by sysfs changes ab4d5ed5 (slub: Enable
      sysfs support for !CONFIG_SLUB_DEBUG) and 2bce6485 ( slub: Allow removal
      of slab caches during boot).
      Acked-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      98072e4d
    • Pekka Enberg's avatar
      slub: Fix build breakage in Documentation/vm · 716ce5d4
      Pekka Enberg authored
      This patch fixes a build breakage introduced by commit
      f5ac4916e9840292edd33c7a52b10364526547f3 ("slub: move slabinfo.c to
      tools/slub/slabinfo.c") that was repoted by Stephen:
      
        After merging the slab tree, today's linux-next build (x86_64 allmodconfig)
        failed like this:
      
        gcc: /scratch/sfr/next/Documentation/vm/slabinfo.c: No such file or directory
        gcc: no input files
      
        Caused by commit f5ac4916e9840292edd33c7a52b10364526547f3 ("slub: move
        slabinfo.c to tools/slub/slabinfo.c").  Missing update to
        Documentation/vm/Makefile?
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      716ce5d4
    • Richard Kennedy's avatar
      slub tracing: move trace calls out of always inlined functions to reduce kernel code size · 4a92379b
      Richard Kennedy authored
      Having the trace calls defined in the always inlined kmalloc functions
      in include/linux/slub_def.h causes a lot of code duplication as the
      trace functions get instantiated for each kamalloc call site. This can
      simply be removed by pushing the trace calls down into the functions in
      slub.c.
      
      On my x86_64 built this patch shrinks the code size of the kernel by
      approx 36K and also shrinks the code size of many modules -- too many to
      list here ;)
      
      size vmlinux (2.6.36) reports
             text        data     bss     dec     hex filename
          5410611	 743172	 828928	6982711	 6a8c37	vmlinux
          5373738	 744244	 828928	6946910	 6a005e	vmlinux + patch
      
      The resulting kernel has had some testing & kmalloc trace still seems to
      work.
      
      This patch
      - moves trace_kmalloc out of the inlined kmalloc() and pushes it down
      into kmem_cache_alloc_trace() so this it only get instantiated once.
      
      - rename kmem_cache_alloc_notrace()  to kmem_cache_alloc_trace() to
      indicate that now is does have tracing. (maybe this would better being
      called something like kmalloc_kmem_cache ?)
      
      - adds a new function kmalloc_order() to handle allocation and tracing
      of large allocations of page order.
      
      - removes tracing from the inlined kmalloc_large() replacing them with a
      call to kmalloc_order();
      
      - move tracing out of inlined kmalloc_node() and pushing it down into
      kmem_cache_alloc_node_trace
      
      - rename kmem_cache_alloc_node_notrace() to
      kmem_cache_alloc_node_trace()
      
      - removes the include of trace/events/kmem.h from slub_def.h.
      
      v2
      - keep kmalloc_order_trace inline when !CONFIG_TRACE
      Signed-off-by: default avatarRichard Kennedy <richard@rsk.demon.co.uk>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      4a92379b
    • Christoph Lameter's avatar
      slub: move slabinfo.c to tools/slub/slabinfo.c · 0d24db33
      Christoph Lameter authored
      We now have a tools directory for these things.
      Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
      0d24db33
  4. 01 Nov, 2010 10 commits
  5. 31 Oct, 2010 14 commits
  6. 30 Oct, 2010 10 commits