title: Linux kernel: Role of zero page allocation at paging_init time
body: <p>I am trying to understand the kernel memory reservation at bootup for arch/arm.</p>
  
  <p>There's a call paging_init() for setting page tables, initialization of zone memory map etc in <code>setup_arch()</code>. It also allocate one <code>zero page</code> before allocating actual <code>mem_map</code>.</p>
  
  <pre><code>void __init paging_init(const struct machine_desc *mdesc)
  {
      void *zero_page;
      ---
      zero_page = early_alloc(PAGE_SIZE);
      ---
      empty_zero_page = virt_to_page(zero_page);
      __flush_dcache_page(NULL, empty_zero_page);
  }
  </code></pre>
  
  <p>Can someone please explain the role of <code>zero page</code>?</p>
  
  <p>This question is a part of <a href="https://stackoverflow.com/questions/35504302/physical-memory-reservation-at-kernel-bootup-in-arm-32bit">this</a>.</p>