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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 011ABC433B4 for ; Thu, 15 Apr 2021 11:43:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C25466124B for ; Thu, 15 Apr 2021 11:42:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232658AbhDOLnV (ORCPT ); Thu, 15 Apr 2021 07:43:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:44214 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230190AbhDOLnT (ORCPT ); Thu, 15 Apr 2021 07:43:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1618486976; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZxvJbfkWzNPA4y8TM5w+ufaw7NwfQQ+gZ7nfkT3HSSU=; b=erm68Nk3sewm7NX5iM2VCsgdh05X3/Zwz4C68LHbYdiOaanmZlJ/RfeLY+qkPhHavd7jI/ FHihJ8u+p+Zio6xGd5Or+LBvNG8hm5hyZNz/yRgydIk2aM/PAryyHSglShEWxswMiPdGpg F3izSIdO5zViP0KdH6bocp+6QghcMmc= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 465C9AE56; Thu, 15 Apr 2021 11:42:56 +0000 (UTC) Date: Thu, 15 Apr 2021 13:42:55 +0200 From: Michal Hocko To: Oscar Salvador Cc: Andrew Morton , Mike Kravetz , Vlastimil Babka , David Hildenbrand , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 7/7] mm,page_alloc: Drop unnecessary checks from pfn_range_valid_contig Message-ID: References: <20210415103544.6791-1-osalvador@suse.de> <20210415103544.6791-8-osalvador@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210415103544.6791-8-osalvador@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 15-04-21 12:35:44, Oscar Salvador wrote: > pfn_range_valid_contig() bails out when it finds an in-use page or a > hugetlb page, among other things. > We can drop the in-use page check since __alloc_contig_pages can migrate > away those pages, and the hugetlb page check can go too since > isolate_migratepages_range is now capable of dealing with hugetlb pages. > Either way, those checks are racy so let the end function handle it > when the time comes. > > Signed-off-by: Oscar Salvador > Suggested-by: David Hildenbrand > Reviewed-by: David Hildenbrand > Acked-by: Mike Kravetz Acked-by: Michal Hocko > --- > mm/page_alloc.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index b5a94de3cdde..c5338e912ace 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -8901,12 +8901,6 @@ static bool pfn_range_valid_contig(struct zone *z, unsigned long start_pfn, > > if (PageReserved(page)) > return false; > - > - if (page_count(page) > 0) > - return false; > - > - if (PageHuge(page)) > - return false; > } > return true; > } > -- > 2.16.3 -- Michal Hocko SUSE Labs