lkml.org 
[lkml]   [2013]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] mm: speedup in __early_pfn_to_nid


    On 03/24/2013 04:37 AM, Yinghai Lu wrote:
    > +#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
    > +int __init_memblock memblock_search_pfn_nid(unsigned long pfn,
    > + unsigned long *start_pfn, unsigned long *end_pfn)
    > +{
    > + struct memblock_type *type = &memblock.memory;
    > + int mid = memblock_search(type, (phys_addr_t)pfn << PAGE_SHIFT);

    I'm really eager to see how much time can we save using binary search compared to
    linear search in this case :)

    (quote)
    > A 4 TB (single rack) UV1 system takes 512 seconds to get through
    > the zone code. This performance optimization reduces the time
    > by 189 seconds, a 36% improvement.
    >
    > A 2 TB (single rack) UV2 system goes from 212.7 seconds to 99.8 seconds,
    > a 112.9 second (53%) reduction.
    (quote)

    thanks,
    linfeng


    \
     
     \ /
      Last update: 2013-03-25 04:01    [W:2.273 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site