Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    mm/vmalloc: Introduce DEBUG_VMALLOCINFO to reduce spinlock contention



    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:




    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
    @mod

    please delete

    will post in "General Linux" sub-forum

    thanks

    Comment

    Working...
    X