lkml.org 
[lkml]   [2009]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 23/35] Update NR_FREE_PAGES only as necessary
    On Mon, 16 Mar 2009, Mel Gorman wrote:

    > When pages are being freed to the buddy allocator, the zone
    > NR_FREE_PAGES counter must be updated. In the case of bulk per-cpu page
    > freeing, it's updated once per page. This retouches cache lines more
    > than necessary. Update the counters one per per-cpu bulk free.

    Not sure about the reasoning here since the individual updates are batched
    and you are touching the same cacheline as the pcp you are operating on
    and have to touch anyways.

    But if its frequent that __rmqueue_smallest() and free_pages_bulk() are
    called with multiple pages then its always a win.

    Reviewed-by: Christoph Lameter <cl@linux-foundation.org>

    > + __mod_zone_page_state(zone, NR_FREE_PAGES, -(1UL << order) * i);

    A multiplication? Okay with contemporary cpus I guess.



    \
     
     \ /
      Last update: 2009-03-16 19:59    [W:4.212 / U:0.364 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site