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 912D8C433DB for ; Thu, 18 Mar 2021 08:45:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B3FA64F18 for ; Thu, 18 Mar 2021 08:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbhCRIol (ORCPT ); Thu, 18 Mar 2021 04:44:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:57478 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbhCRIoX (ORCPT ); Thu, 18 Mar 2021 04:44:23 -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 62B29AC17; Thu, 18 Mar 2021 08:44:22 +0000 (UTC) Date: Thu, 18 Mar 2021 09:44:19 +0100 From: Oscar Salvador To: Michal Hocko Cc: David Hildenbrand , Andrew Morton , Vlastimil Babka , Muchun Song , Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 5/5] mm,page_alloc: Drop unnecessary checks from pfn_range_valid_contig Message-ID: References: <20210317111251.17808-1-osalvador@suse.de> <20210317111251.17808-6-osalvador@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 17, 2021 at 04:03:06PM +0100, Michal Hocko wrote: > > alloc_contig_pages() vs. alloc_contig_range(). The patches are active for > > virtio-mem and CMA AFAIKS. > > yeah, I meant to say "are not actually fully active". We could place this patch earlier in this patchset. The only thing is that we would lose the prevalidation (at leat for HugeTLB page) which is done upfront to find later on that we do not support hugetlb handling in isolate_migratepates_block. So the bad thing about placing it earlier, is that wrt. hugetlb pages, alloc_gigantic_page will take longer to fail (when we already know that will fail). Then we have the page_count check, which is also racy and isolate_migratepages_block will take care of it. So I guess can think of this patch as a preparatory patch that removes racy checks that will be re-checked later on in the end function which does the actual handling. What do you think? -- Oscar Salvador SUSE L3