1. 24 Jul, 2008 2 commits
    • Mel Gorman's avatar
      mm: verify the page links and memory model · 708614e6
      Mel Gorman authored
      Print out information on how the page flags are being used if mminit_loglevel
      is MMINIT_VERIFY or higher and unconditionally performs sanity checks on the
      flags regardless of loglevel.
      
      When the page flags are updated with section, node and zone information, a
      check are made to ensure the values can be retrieved correctly.  Finally we
      confirm that pfn_to_page and page_to_pfn are the correct inverse functions.
      
      [akpm@linux-foundation.org: fix printk warnings]
      Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      708614e6
    • Mel Gorman's avatar
      mm: add a basic debugging framework for memory initialisation · 6b74ab97
      Mel Gorman authored
      Boot initialisation is very complex, with significant numbers of
      architecture-specific routines, hooks and code ordering.  While significant
      amounts of the initialisation is architecture-independent, it trusts the data
      received from the architecture layer.  This is a mistake, and has resulted in
      a number of difficult-to-diagnose bugs.
      
      This patchset adds some validation and tracing to memory initialisation.  It
      also introduces a few basic defensive measures.  The validation code can be
      explicitly disabled for embedded systems.
      
      This patch:
      
      Add additional debugging and verification code for memory initialisation.
      
      Once enabled, the verification checks are always run and when required
      additional debugging information may be outputted via a mminit_loglevel=
      command-line parameter.
      
      The verification code is placed in a new file mm/mm_init.c.  Ideally other mm
      initialisation code will be moved here over time.
      Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Andy Whitcroft <apw@shadowen.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6b74ab97