Results 1 to 2 of 2

Thread: patch suggested, another global (?) lock says bye bye

  1. #1
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    628

    Default patch suggested, another global (?) lock says bye bye

    mm/vmalloc: Introduce DEBUG_VMALLOCINFO to reduce spinlock contention

    http://marc.info/?l=linux-mm&m=139714810128208&w=2

    Performance analysis of software compilation by Gentoo portage on an
    Intel E5-2620 with 64GB of RAM revealed that a sizeable amount of time,
    anywhere from 5% to 15%, was spent in get_vmalloc_info(), with at least
    40% of that time spent in the _raw_spin_lock() invoked by it.

    The spinlock call is done on vmap_area_lock to protect vmap_area_list,
    but changes to vmap_area_list are made under RCU. The only consumer that
    requires a spinlock on an RCU-ified list is /proc/vmallocinfo. That is
    only intended for use by kernel developers doing debugging, but even few
    kernel developers appear to use it. Introducing DEBUG_VMALLOCINFO allows
    us to fully RCU-ify the list, which eliminates this list as a source of
    contention.

    This patch brings a substantial reduction in time spent in spinlocks on
    my system. Flame graphs from my early analysis are available on my
    developer space. They were created by profiling the system under
    concurrent package builds done by emerge at a sample rate of 99Hz for 10
    seconds and using Brendan Gregg's scripts to process the data:

    http://dev.gentoo.org/~ryao/emerge.svg
    http://dev.gentoo.org/~ryao/emerge-patched.svg

    In this example, 6.64% of system time is spent in get_vmalloc_info()
    with 2.59% spent in the spinlock. The patched version sees only 0.50% of
    time spent in get_vmalloc_info() with neligible time spent in spin
    locks. The low utilization of get_vmalloc_info() in this is partly
    attributable to measurement error, but the reduction in time spent
    spinning is clear.
    I applied this patch to my kernel source (3.13-based) and everything seems to work smoother

    anyone else wanna try ?

    we need a news entry about this on phoronix !

    every lock removed - towards a lockless state - improves responsiveness and cuts down latency

  2. #2
    Join Date
    Jan 2009
    Location
    Vienna, Austria; Germany; hello world :)
    Posts
    628

    Default

    @mod

    please delete

    will post in "General Linux" sub-forum

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •