From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967006AbdD0H6f (ORCPT ); Thu, 27 Apr 2017 03:58:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:56386 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753792AbdD0H63 (ORCPT ); Thu, 27 Apr 2017 03:58:29 -0400 Date: Thu, 27 Apr 2017 09:58:25 +0200 From: Michal Hocko To: linux-mm@kvack.org Cc: Andrew Morton , Mel Gorman , Vlastimil Babka , Andrea Arcangeli , Jerome Glisse , Reza Arbab , Yasuaki Ishimatsu , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML Subject: Re: [PATCH 07/13] mm: consider zone which is not fully populated to have holes Message-ID: <20170427075825.GB4706@dhcp22.suse.cz> References: <20170421120512.23960-1-mhocko@kernel.org> <20170421120512.23960-8-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170421120512.23960-8-mhocko@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I plan to fold the following into this patch. --- >>From 2cdb8e398eaeddf8b743bddb421dc5d9e49e442d Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Thu, 27 Apr 2017 09:53:01 +0200 Subject: [PATCH] fold me "mm: consider zone which is not fully populated to have holes" - clarify pfn_valid semantic - requested by Joonsoo --- include/linux/mmzone.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index aa8cc03287b0..f8c9453635e5 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1268,10 +1268,15 @@ unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long); #ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL /* * pfn_valid() is meant to be able to tell if a given PFN has valid memmap - * associated with it or not. In FLATMEM, it is expected that holes always - * have valid memmap as long as there is valid PFNs either side of the hole. - * In SPARSEMEM, it is assumed that a valid section has a memmap for the - * entire section. + * associated with it or not. This means that a struct page exists for this + * pfn. The caller cannot assume the page is fully initialized in general. + * Hotplugable pages might not have been onlined yet. pfn_to_online_page() + * will ensure the struct page is fully online and initialized. Special pages + * (e.g. ZONE_DEVICE) are never onlined and should be treated accordingly. + * + * In FLATMEM, it is expected that holes always have valid memmap as long as + * there is valid PFNs either side of the hole. In SPARSEMEM, it is assumed + * that a valid section has a memmap for the entire section. * * However, an ARM, and maybe other embedded architectures in the future * free memmap backing holes to save memory on the assumption the memmap is -- 2.11.0 -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id 32CAC6B03A4 for ; Thu, 27 Apr 2017 03:58:30 -0400 (EDT) Received: by mail-wr0-f197.google.com with SMTP id q91so2356222wrb.8 for ; Thu, 27 Apr 2017 00:58:30 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id w43si1843265wrc.260.2017.04.27.00.58.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 27 Apr 2017 00:58:29 -0700 (PDT) Date: Thu, 27 Apr 2017 09:58:25 +0200 From: Michal Hocko Subject: Re: [PATCH 07/13] mm: consider zone which is not fully populated to have holes Message-ID: <20170427075825.GB4706@dhcp22.suse.cz> References: <20170421120512.23960-1-mhocko@kernel.org> <20170421120512.23960-8-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170421120512.23960-8-mhocko@kernel.org> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Andrew Morton , Mel Gorman , Vlastimil Babka , Andrea Arcangeli , Jerome Glisse , Reza Arbab , Yasuaki Ishimatsu , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML I plan to fold the following into this patch. ---