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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 74574C433DB for ; Wed, 17 Mar 2021 09:44:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2032564F41 for ; Wed, 17 Mar 2021 09:44:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbhCQJoG (ORCPT ); Wed, 17 Mar 2021 05:44:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:42194 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbhCQJnz (ORCPT ); Wed, 17 Mar 2021 05:43:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 22E7BAC75; Wed, 17 Mar 2021 09:43:54 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 17 Mar 2021 10:43:53 +0100 From: Oscar Salvador To: David Hildenbrand Cc: Andrew Morton , Vlastimil Babka , Michal Hocko , Muchun Song , Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Anshuman Khandual Subject: Re: [PATCH v4 0/4] Make alloc_contig_range handle Hugetlb pages In-Reply-To: References: <20210310150853.13541-1-osalvador@suse.de> User-Agent: Roundcube Webmail Message-ID: X-Sender: osalvador@suse.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-03-15 10:06, David Hildenbrand wrote: > BTW, I stumbled yesterday over > > alloc_contig_pages()->pfn_range_valid_contig(): > > if (page_count(page) > 0) > rerurn false; > if (PageHuge(page)) > return false; > > As used by memtrace and for gigantic pages. We can now > > a) Drop these check completely, as it's best-effort only and racy. > alloc_contig_pages()/alloc_contig_range() will handle it properly. I was preparing v5, and I wanted to be sure I understood you here. Right you are that the in-use page check can be dropped, as those pages can be migrated away, and the Hugetlb page check can also be dropped since isolate_migratepages_range is now capable of dealing with those kind of pages. > b) Similarly, check for gigantic pages and/or movability/migratability. I lost you here. isolate_or_dissolve_huge_page() already bails out on hugetlb-gigantic pages. Or do you mean to place an upfront check here? (hstate_is_gigantic())? -- Oscar Salvador SUSE L3