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 D7B23C10F14 for ; Tue, 15 Oct 2019 12:01:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9B1B6218DE for ; Tue, 15 Oct 2019 12:01:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B1B6218DE 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 1F7B88E0005; Tue, 15 Oct 2019 08:01:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1CF3A8E0001; Tue, 15 Oct 2019 08:01:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0E5948E0005; Tue, 15 Oct 2019 08:01:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0087.hostedemail.com [216.40.44.87]) by kanga.kvack.org (Postfix) with ESMTP id E16028E0001 for ; Tue, 15 Oct 2019 08:01:39 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 8459562C0 for ; Tue, 15 Oct 2019 12:01:39 +0000 (UTC) X-FDA: 76045879518.12.view76_82c84e3476212 X-HE-Tag: view76_82c84e3476212 X-Filterd-Recvd-Size: 4504 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Oct 2019 12:01:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3B8F1056F8C; Tue, 15 Oct 2019 12:01:36 +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 6B2745C548; Tue, 15 Oct 2019 12:01:28 +0000 (UTC) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use From: David Hildenbrand 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> <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Organization: Red Hat GmbH Message-ID: <3eaa50db-0b66-9d9d-3293-77216f3df91e@redhat.com> Date: Tue, 15 Oct 2019 14:01:27 +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: <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 15 Oct 2019 12:01:37 +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:50, David Hildenbrand wrote: > 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?) > Will send a patch. -- Thanks, David / dhildenb 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 63134C10F14 for ; Tue, 15 Oct 2019 12:04:39 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D34BB218DE for ; Tue, 15 Oct 2019 12:04:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D34BB218DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46svHS3xnKzDr42 for ; Tue, 15 Oct 2019 23:04:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=redhat.com (client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=david@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46svD41RCGzDr13 for ; Tue, 15 Oct 2019 23:01:39 +1100 (AEDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3B8F1056F8C; Tue, 15 Oct 2019 12:01:36 +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 6B2745C548; Tue, 15 Oct 2019 12:01:28 +0000 (UTC) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use From: David Hildenbrand To: Michal Hocko 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> <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Organization: Red Hat GmbH Message-ID: <3eaa50db-0b66-9d9d-3293-77216f3df91e@redhat.com> Date: Tue, 15 Oct 2019 14:01:27 +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: <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 15 Oct 2019 12:01:37 +0000 (UTC) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , Andrea Arcangeli , linux-s390@vger.kernel.org, x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , David Rientjes , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Kees Cook , Anshuman Khandual , Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Oscar Salvador , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , Dave Hansen , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , Mel Gorman , "David S. Miller" , Mike Kravetz Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 15.10.19 13:50, David Hildenbrand wrote: > 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?) > Will send a patch. -- Thanks, David / dhildenb 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 B4608ECE588 for ; Tue, 15 Oct 2019 12:01:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86A9F218DE for ; Tue, 15 Oct 2019 12:01:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jqHemG7g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86A9F218DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sErfQNYSMGEliuei4DYORaaFYJMJk9goL/29OczsyH0=; b=jqHemG7gBfCgyTguU1yJLDoOV 9WL2mXNzA1pNaTrCX8e4Fn359r4zs3NczPWU0CYiwu3Gs5kEWvwnF9kOyO9vEIwK4e1BXDza8svD5 d7p14LcMOC+ulL5/nZojXj8gED4W+0qorDyDhjAG9xSCqGSok5akBRAlnmgOMxB0kv2Se2LBgSuBt 5ssj+ZjhtJ41iKOoVFPyyV/MZt5zAK+Y/QwwcOGqbLMjXhUydNejnLbiTRIuGikQoSvMDJrIQGDTB KWd+068LsmFCPFuYlcWhlTTV2jUJrdiHqyJ0iyCG5styHL06gkfP4kQhwpwQCYP12G2H8GM23WYfh tB/PbndmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKLWN-0008Pc-EW; Tue, 15 Oct 2019 12:01:47 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKLWE-0008Hq-7h; Tue, 15 Oct 2019 12:01:39 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3B8F1056F8C; Tue, 15 Oct 2019 12:01:36 +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 6B2745C548; Tue, 15 Oct 2019 12:01:28 +0000 (UTC) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use From: David Hildenbrand To: Michal Hocko 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> <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Organization: Red Hat GmbH Message-ID: <3eaa50db-0b66-9d9d-3293-77216f3df91e@redhat.com> Date: Tue, 15 Oct 2019 14:01:27 +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: <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 15 Oct 2019 12:01:37 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191015_050138_317969_75697554 X-CRM114-Status: GOOD ( 18.79 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , Andrea Arcangeli , linux-s390@vger.kernel.org, Michael Ellerman , x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , David Rientjes , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Kees Cook , Anshuman Khandual , Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Oscar Salvador , Christophe Leroy , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , Dave Hansen , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , Mel Gorman , "David S. Miller" , Mike Kravetz Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org On 15.10.19 13:50, David Hildenbrand wrote: > 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?) > Will send a patch. -- Thanks, David / dhildenb _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 AD634C10F14 for ; Tue, 15 Oct 2019 12:01:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7EFED218DE for ; Tue, 15 Oct 2019 12:01:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sYKExsuO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EFED218DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Iszr3PTQTExj5aWKlppIyXTixD2oTxEoDnL0tFUEjD8=; b=sYKExsuOey5dUr1ZylTW1zDAX YJUlBeLpSdhQvByxwxDpzLYr1TcxOv7rg80F7Toapj3A79cPQ8VpcDAF7qG5UYoNyMEwgFSjyrd64 WdGARKONoLRcoPL37lLjrHmtnSc+B1NynD3c41HYQz/nD/+k0ESYSwWwng8N6/iiohTf0RDNWjswo /edkY4Cf9/ty6O7Cq9qwJEX2cw0s/j6DWsrUCTvHxWmQOguUC3hIZ/St0ps2au/dht5HLrYEGp8J0 FPb63uDt+aqLvPZQO1s4449MqbMTj320ID5sFPJhAZPsLnQfCayjWbw9fcjno6l5mol2zBlP/QRy4 yhU0lMwaA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKLWI-0008IJ-2V; Tue, 15 Oct 2019 12:01:42 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKLWE-0008Hq-7h; Tue, 15 Oct 2019 12:01:39 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3B8F1056F8C; Tue, 15 Oct 2019 12:01:36 +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 6B2745C548; Tue, 15 Oct 2019 12:01:28 +0000 (UTC) Subject: Re: [PATCH V6 1/2] mm/page_alloc: Make alloc_gigantic_page() available for general use From: David Hildenbrand To: Michal Hocko 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> <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Organization: Red Hat GmbH Message-ID: <3eaa50db-0b66-9d9d-3293-77216f3df91e@redhat.com> Date: Tue, 15 Oct 2019 14:01:27 +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: <513bc2f7-8110-58f7-36c1-a04b59f11f7e@redhat.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 15 Oct 2019 12:01:37 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191015_050138_317969_75697554 X-CRM114-Status: GOOD ( 18.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , James Hogan , Tetsuo Handa , Heiko Carstens , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Mackerras , sparclinux@vger.kernel.org, Thomas Gleixner , Andrea Arcangeli , linux-s390@vger.kernel.org, Michael Ellerman , x86@kernel.org, Russell King - ARM Linux , Matthew Wilcox , Steven Price , Jason Gunthorpe , Gerald Schaefer , David Rientjes , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Kees Cook , Anshuman Khandual , Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, Mark Brown , "Kirill A . Shutemov" , Dan Williams , Vlastimil Babka , Oscar Salvador , Christophe Leroy , Sri Krishna chowdary , Ard Biesheuvel , Greg Kroah-Hartman , Dave Hansen , linux-mips@vger.kernel.org, Ralf Baechle , Paul Burton , Mike Rapoport , Vineet Gupta , Martin Schwidefsky , Andrew Morton , Mel Gorman , "David S. Miller" , Mike Kravetz Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 15.10.19 13:50, David Hildenbrand wrote: > 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?) > Will send a patch. -- Thanks, David / dhildenb _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel