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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 294A3C678D4 for ; Thu, 2 Mar 2023 03:47:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbjCBDrY (ORCPT ); Wed, 1 Mar 2023 22:47:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjCBDrV (ORCPT ); Wed, 1 Mar 2023 22:47:21 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA77D3E087 for ; Wed, 1 Mar 2023 19:47:19 -0800 (PST) Received: from dggpemm500014.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4PRxn06YC7zfbPJ; Thu, 2 Mar 2023 11:44:36 +0800 (CST) Received: from [10.174.178.120] (10.174.178.120) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 2 Mar 2023 11:47:16 +0800 Message-ID: <95fcd42c-cb41-d280-32a4-97708061fe41@huawei.com> Date: Thu, 2 Mar 2023 11:47:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 CC: , , , , , , Subject: Re: [RFC PATCH 1/1] x86/mm/pat: Clear VM_PAT if copy_p4d_range failed Content-Language: en-US To: , , , , References: <20230217025615.1595558-1-mawupeng1@huawei.com> <7016f30f-65dd-b1a1-a44a-fb7af689959b@intel.com> From: mawupeng In-Reply-To: <7016f30f-65dd-b1a1-a44a-fb7af689959b@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.120] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/2/23 4:03, Dave Hansen wrote: > On 2/16/23 18:56, Wupeng Ma wrote: >> dup_mm >> dup_mmap >> copy_page_range >> copy_p4d_range >> copy_pud_range >> copy_pmd_range >> pmd_alloc >> __pmd_alloc >> pmd_alloc_one >> page = alloc_pages(gfp, 0); >> if (!page) >> return NULL; >> mmput >> exit_mmap >> unmap_vmas >> unmap_single_vma >> untrack_pfn >> follow_phys >> WARN_ON_ONCE(1); > > What's the point of that warning in the first place? I can certainly > imagine follow_phys() failing for sparse mappings, for instance. Is > there some requirement that VM_PFNMAP can't be sparse? Hi Dave Thanks for reviewing. Sorry,I have no idea why warning in the first place. I think we can delete this WARN_ON_ONCE with another patch?