1. 20 8月, 2011 6 次提交
    • C
      slub: per cpu cache for partial pages · 49e22585
      Christoph Lameter 提交于
      Allow filling out the rest of the kmem_cache_cpu cacheline with pointers to
      partial pages. The partial page list is used in slab_free() to avoid
      per node lock taking.
      
      In __slab_alloc() we can then take multiple partial pages off the per
      node partial list in one go reducing node lock pressure.
      
      We can also use the per cpu partial list in slab_alloc() to avoid scanning
      partial lists for pages with free objects.
      
      The main effect of a per cpu partial list is that the per node list_lock
      is taken for batches of partial pages instead of individual ones.
      
      Potential future enhancements:
      
      1. The pickup from the partial list could be perhaps be done without disabling
         interrupts with some work. The free path already puts the page into the
         per cpu partial list without disabling interrupts.
      
      2. __slab_free() may have some code paths that could use optimization.
      
      Performance:
      
      				Before		After
      ./hackbench 100 process 200000
      				Time: 1953.047	1564.614
      ./hackbench 100 process 20000
      				Time: 207.176   156.940
      ./hackbench 100 process 20000
      				Time: 204.468	156.940
      ./hackbench 100 process 20000
      				Time: 204.879	158.772
      ./hackbench 10 process 20000
      				Time: 20.153	15.853
      ./hackbench 10 process 20000
      				Time: 20.153	15.986
      ./hackbench 10 process 20000
      				Time: 19.363	16.111
      ./hackbench 1 process 20000
      				Time: 2.518	2.307
      ./hackbench 1 process 20000
      				Time: 2.258	2.339
      ./hackbench 1 process 20000
      				Time: 2.864	2.163
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NPekka Enberg <penberg@kernel.org>
      49e22585
    • C
      slub: return object pointer from get_partial() / new_slab(). · 497b66f2
      Christoph Lameter 提交于
      There is no need anymore to return the pointer to a slab page from get_partial()
      since the page reference can be stored in the kmem_cache_cpu structures "page" field.
      
      Return an object pointer instead.
      
      That in turn allows a simplification of the spaghetti code in __slab_alloc().
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NPekka Enberg <penberg@kernel.org>
      497b66f2
    • C
      slub: pass kmem_cache_cpu pointer to get_partial() · acd19fd1
      Christoph Lameter 提交于
      Pass the kmem_cache_cpu pointer to get_partial(). That way
      we can avoid the this_cpu_write() statements.
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NPekka Enberg <penberg@kernel.org>
      acd19fd1
    • C
      slub: Prepare inuse field in new_slab() · e6e82ea1
      Christoph Lameter 提交于
      inuse will always be set to page->objects. There is no point in
      initializing the field to zero in new_slab() and then overwriting
      the value in __slab_alloc().
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NPekka Enberg <penberg@kernel.org>
      e6e82ea1
    • C
      slub: Remove useless statements in __slab_alloc · 7db0d705
      Christoph Lameter 提交于
      Two statements in __slab_alloc() do not have any effect.
      
      1. c->page is already set to NULL by deactivate_slab() called right before.
      
      2. gfpflags are masked in new_slab() before being passed to the page
         allocator. There is no need to mask gfpflags in __slab_alloc in particular
         since most frequent processing in __slab_alloc does not require the use of a
         gfpmask.
      
      Cc: torvalds@linux-foundation.org
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NPekka Enberg <penberg@kernel.org>
      7db0d705
    • C
      slub: free slabs without holding locks · 69cb8e6b
      Christoph Lameter 提交于
      There are two situations in which slub holds a lock while releasing
      pages:
      
      	A. During kmem_cache_shrink()
      	B. During kmem_cache_close()
      
      For A build a list while holding the lock and then release the pages
      later. In case of B we are the last remaining user of the slab so
      there is no need to take the listlock.
      
      After this patch all calls to the page allocator to free pages are
      done without holding any spinlocks. kmem_cache_destroy() will still
      hold the slub_lock semaphore.
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NPekka Enberg <penberg@kernel.org>
      69cb8e6b
  2. 15 8月, 2011 3 次提交
  3. 14 8月, 2011 27 次提交
  4. 13 8月, 2011 4 次提交
    • L
      Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6 · 73e0881d
      Linus Torvalds 提交于
      * 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6:
        dt: add empty of_get_property for non-dt
      73e0881d
    • L
      Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · e211bc8d
      Linus Torvalds 提交于
      * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits)
        USB: Serial: Add PID(0xF7C0) to FTDI SIO driver for a zeitcontrol-device
        USB: Serial: Add device ID for Sierra Wireless MC8305
        USB: Serial: Added device ID for Qualcomm Modem in Sagemcom's HiLo3G
        usb/host/pci-quirks.c: correct annotation of `ehci_dmi_nohandoff_table'
        USB: option driver: add PID for Vodafone-Huawei K4511
        USB: option driver: add PID for Vodafone-Huawei K4510
        USB: option driver: add PID for Vodafone-Huawei K3771
        USB: option driver: add PID for Vodafone-Huawei K3770
        usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index needs to be shifted too
        usb/isp1760: Added missing call to usb_hcd_check_unlink_urb() during unlink
        USB: EHCI: Fix test mode sequence
        USB: ftdi_sio: fix minor typo in get_ftdi_divisor
        USB: at91_udc: include linux/prefetch.h explicitly
        USB: usb-storage: unusual_devs entry for ARM V2M motherboard.
        usb/ehci-mxc: add missing inclusion of mach/hardware.h
        USB: assign instead of equal in usbtmc.c
        usb: renesas_usbhs: fixup usbhsg_for_each_uep 1st pos
        usb: renesas_usbhs: fix DMA build by including dma-mapping.h
        usb: gadget: net2272 - Correct includes
        usb: musb: fix oops on musb_gadget_pullup
        ...
      e211bc8d
    • L
      Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 · 8c70aac0
      Linus Torvalds 提交于
      * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
        zcache: Fix build error when sysfs is not defined
        zcache: Use div_u64 for 64-bit division
        staging:rts_pstor: fix thread synchronization flow
        drivers:staging:solo6x10:add the missed slab.h
        staging: zcache: include module.h for MODULE_LICENSE
        drivers/staging/hv/blkvsc_drv.c: eliminate NULL pointer dereference
        Staging: Add clk API note to nvec/TODO
        drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c: adjust array index
        staging: more missing slab.h inclusions
        drivers/staging/solo6x10/p2m.c needs slab.h
        drivers/staging/solo6x10/core.c needs slab.h
        drivers/staging/dt3155v4l/dt3155v4l.c needs slab.h
        drivers/staging/speakup/devsynth.c: fix "buffer size is not provably correct" error
        Staging: iio: add some unlocks to raw_read() functions
        staging: ft1000_proc needs asm/io.h for inw/outw on sparc
        staging: rtl8192u: declare MODULE_FIRMWARE
        gma500: Fix clashes with DRM updates
        staging: zcache: module is GPL
        staging: fix zcache building
      8c70aac0
    • L
      Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-tip · 06e727d2
      Linus Torvalds 提交于
      * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-tip:
        x86-64: Rework vsyscall emulation and add vsyscall= parameter
        x86-64: Wire up getcpu syscall
        x86: Remove unnecessary compile flag tweaks for vsyscall code
        x86-64: Add vsyscall:emulate_vsyscall trace event
        x86-64: Add user_64bit_mode paravirt op
        x86-64, xen: Enable the vvar mapping
        x86-64: Work around gold bug 13023
        x86-64: Move the "user" vsyscall segment out of the data segment.
        x86-64: Pad vDSO to a page boundary
      06e727d2