From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756208AbcETPlN (ORCPT ); Fri, 20 May 2016 11:41:13 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34578 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751479AbcETPlM (ORCPT ); Fri, 20 May 2016 11:41:12 -0400 Subject: Re: [v2 PATCH] mm: move page_ext_init after all struct pages are initialized To: Michal Hocko References: <1463696006-31360-1-git-send-email-yang.shi@linaro.org> <20160520131649.GC5197@dhcp22.suse.cz> Cc: akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linaro-kernel@lists.linaro.org From: "Shi, Yang" Message-ID: Date: Fri, 20 May 2016 08:41:09 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160520131649.GC5197@dhcp22.suse.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/20/2016 6:16 AM, Michal Hocko wrote: > On Thu 19-05-16 15:13:26, Yang Shi wrote: > [...] >> diff --git a/init/main.c b/init/main.c >> index b3c6e36..2075faf 100644 >> --- a/init/main.c >> +++ b/init/main.c >> @@ -606,7 +606,6 @@ asmlinkage __visible void __init start_kernel(void) >> initrd_start = 0; >> } >> #endif >> - page_ext_init(); >> debug_objects_mem_init(); >> kmemleak_init(); >> setup_per_cpu_pageset(); >> @@ -1004,6 +1003,8 @@ static noinline void __init kernel_init_freeable(void) >> sched_init_smp(); >> >> page_alloc_init_late(); >> + /* Initialize page ext after all struct pages are initializaed */ >> + page_ext_init(); >> >> do_basic_setup(); > > I might be missing something but don't we have the same problem with > CONFIG_FLATMEM? page_ext_init_flatmem is called way earlier. Or > CONFIG_DEFERRED_STRUCT_PAGE_INIT is never enabled for CONFIG_FLATMEM? Yes, CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on MEMORY_HOTPLUG which depends on SPARSEMEM. So, this config is not valid for FLATMEM at all. Thanks, Yang >