lkml.org 
[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages()
    On Mon, 9 Feb 2009 23:24:16 +0100
    Johannes Weiner <hannes@cmpxchg.org> wrote:

    > The commit missed to actually adjust do_try_to_free_pages() which now
    > does not initialize sc.nr_reclaimed and makes shrink_zone() make
    > assumptions on whether to bail out of the reclaim cycle based on an
    > uninitialized value.

    Both callers of do_try_to_free_pages() _do_ initialise
    scan_control.nr_reclaimed. The unitemised fields in a struct
    initaliser are reliably zeroed.

    We often rely upon this, and the only reason for mentioning such a
    field is for documentation reasons, or if you want to add a comment at
    the initialisation site.




    \
     
     \ /
      Last update: 2009-02-10 23:19    [W:0.021 / U:0.436 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site