[lkml]   [2009]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] vmscan: initialize sc->nr_reclaimed in do_try_to_free_pages()
On Mon, 9 Feb 2009 23:24:16 +0100
Johannes Weiner <> 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.037 / U:0.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site