From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6CFCECE588 for ; Tue, 15 Oct 2019 11:50:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 914E62064B for ; Tue, 15 Oct 2019 11:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 914E62064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3AD5B8E0005; Tue, 15 Oct 2019 07:50:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3378A8E0001; Tue, 15 Oct 2019 07:50:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D7738E0005; Tue, 15 Oct 2019 07:50:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0101.hostedemail.com [216.40.44.101]) by kanga.kvack.org (Postfix) with ESMTP id EB88F8E0001 for ; Tue, 15 Oct 2019 07:50:16 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 8FE0C75BB for ; Tue, 15 Oct 2019 11:50:16 +0000 (UTC) X-FDA: 76045850832.30.sheet64_1f6d16723a713 X-HE-Tag: sheet64_1f6d16723a713 X-Filterd-Recvd-Size: 4348 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Oct 2019 11:50:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DB5E63082E61; Tue, 15 Oct 2019 11:50:13 +0000 (UTC) Received: from [10.36.116.26] (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48AD410027AB; Tue, 15 Oct 2019 11:50:03 +0000 (UTC) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use To: Michal Hocko Cc: Anshuman Khandual , linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Greg Kroah-Hartman , Thomas Gleixner , Mike Rapoport , Mike Kravetz , Jason Gunthorpe , Dan Williams , Peter Zijlstra , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Sri Krishna chowdary , Dave Hansen , Russell King - ARM Linux , Michael Ellerman , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , "Kirill A . Shutemov" , Gerald Schaefer , Christophe Leroy , David Rientjes , Andrea Arcangeli , Oscar Salvador , Mel Gorman , linux-snps-arc@lists.infradead.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org References: <1571131302-32290-1-git-send-email-anshuman.khandual@arm.com> <1571131302-32290-2-git-send-email-anshuman.khandual@arm.com> <9da1f196-51bd-06ac-c5dc-b55776fce2be@redhat.com> <20191015114723.GD317@dhcp22.suse.cz> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Date: Tue, 15 Oct 2019 13:50:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20191015114723.GD317@dhcp22.suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 15 Oct 2019 11:50:14 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 15.10.19 13:47, Michal Hocko wrote: > On Tue 15-10-19 13:42:03, David Hildenbrand wrote: > [...] >>> -static bool pfn_range_valid_gigantic(struct zone *z, >>> - unsigned long start_pfn, unsigned long nr_pages) >>> -{ >>> - unsigned long i, end_pfn = start_pfn + nr_pages; >>> - struct page *page; >>> - >>> - for (i = start_pfn; i < end_pfn; i++) { >>> - if (!pfn_valid(i)) >>> - return false; >>> - >>> - page = pfn_to_page(i); >> >> Am I missing something or should here really be a pfn_to_online_page() here >> instead of a pfn_valid() ? > > http://lkml.kernel.org/r/20180423000943.GO17484@dhcp22.suse.cz > So we managed to add PageReserved(page) but not pfn_to_online_page(). But it is the right thing to do? (or am I missing something?) -- Thanks, David / dhildenb