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 08C39C433E0 for ; Thu, 18 Mar 2021 08:44:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 74D7D64EF9 for ; Thu, 18 Mar 2021 08:44:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74D7D64EF9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E4C4F8D0001; Thu, 18 Mar 2021 04:44:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DFC2C6B0073; Thu, 18 Mar 2021 04:44:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CC3838D0001; Thu, 18 Mar 2021 04:44:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id ADE2A6B0072 for ; Thu, 18 Mar 2021 04:44:24 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 736437587 for ; Thu, 18 Mar 2021 08:44:24 +0000 (UTC) X-FDA: 77932358448.05.E8A8E85 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf28.hostedemail.com (Postfix) with ESMTP id C56C62000252 for ; Thu, 18 Mar 2021 08:44:23 +0000 (UTC) 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: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C56C62000252 X-Stat-Signature: 94fc8jizsuzxftk7e9xs6mdcdjatsukb Received-SPF: none (suse.de>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1616057063-906294 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 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