Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp127545rdb; Thu, 25 Jan 2024 10:06:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGaREs3mEq19t9Iwy1iBeyoPNNuQFFORUvRS5ZpX+cBcwCUJ4Qtx7RApdXt4QF6m4vn0I0g X-Received: by 2002:a17:906:3755:b0:a34:97d1:48eb with SMTP id e21-20020a170906375500b00a3497d148ebmr60565ejc.97.1706206009909; Thu, 25 Jan 2024 10:06:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706206009; cv=pass; d=google.com; s=arc-20160816; b=SnbwPV/3ZmOU/H3iFFyw28MnTJqlBuOtqvoZIXtSAu17G2KDwYsP/AYWhVoeMi0TuC mveRXaEGmG30td8ENq1KGVNxhWV4n0XO6uqnLQjwcnEBP3kTyZl5/tU7IcDoup3nZnlX 1zDibluHS/bTKXlyyuWJ0fqlGI7eSzHU8+Dr1Dss7aUEOR2lBgi8zNC0dkhx+XtruVJb YPL3VVPBxU9iXd83mZfbrLxt/TnaJ2C4Up3gip6b9uRIc8QdzfCgENsISrDLq8IfK2j8 oqwzgefpooTzFjoxj3sO9fblJa9/Morn9jqw8ydbg79dSpH4x3HFOZcLOy3OKiCS8dmJ PPrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=wS4X17240hW5y6LqImy6lF0Qfb1xrdQnZpun4ihgGxA=; fh=7fbNBK93+OmyJgRvN7Q77F6iBRcXBNKirw5e8fWRYz0=; b=tKvgWYzCATc7y1QuXajXmpAetGOwRFy224KWqg8jo/xV+8N3+9t8Up0VICmZXGI4Ns uDknCNZJxFLrRBpt+IHcnQcgIhrVQUbavidRpWWw625I5RHO83deL+R9+ZYJaj4HBpOx coJwIRe+u2S7qF9Cf5w9i8v/hNiMSE6x7x9nQ3yiKSy9wVIesn3wcI0ANCcFBBbRd0IN v4UoIcSTfdtkMjyX5Wxg4P36mISlS5zaMZ90T3pnUv8qywgr7wWAJDJNxAXDQz1K9iZL hxDo0g+ckxBVPMvtBZZOCsypqhHnPYxwGfvKjRZCDmXDjZjFw/WG32ZbRq1Jr15I6RTG gCSQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-39072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f17-20020a17090624d100b00a312652c3c8si1120021ejb.1039.2024.01.25.10.06.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 10:06:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-39072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AD6761F259EE for ; Thu, 25 Jan 2024 18:06:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C65A133997; Thu, 25 Jan 2024 18:06:26 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B535213343E for ; Thu, 25 Jan 2024 18:06:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706205985; cv=none; b=fYW1wVeLaj7m04tAjCj0gFdVVb8uAeyDiQkTOJdUgW5vH5V/FDUbWK1dcK44ItAmd6GLVjIKSa0AXFNK0t9jcV6uFZDAqPAnYaKU9EVpCqCUCMQBg7EQgb707H69MyUoUjfNKiP+YY4dfiNfcBUAzB8o6w2FwbUmdSM6sRsheJ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706205985; c=relaxed/simple; bh=CjTqTGstT8B/7bRAtewmoOtK58XNsNvRn3gjW9lsl2I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qlxleWRt65fiyBVl84eIXPIltXH/5xhE4SjntgNQTmhyKQSD5FV/nbRYCudL8lomemzm78+RtQmPfC508hjltsTF6kxgk/dMHYdKSpG7Z7hAmI/2Qhx1HbGB0bFkx4GWpaHEST+hLT10BWAK+qIsgx1umxVDyBY5K/j/6Etv9aU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43125C433F1; Thu, 25 Jan 2024 18:06:23 +0000 (UTC) Date: Thu, 25 Jan 2024 18:06:20 +0000 From: Catalin Marinas To: Nanyong Sun Cc: will@kernel.org, mike.kravetz@oracle.com, muchun.song@linux.dev, akpm@linux-foundation.org, anshuman.khandual@arm.com, willy@infradead.org, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 0/3] A Solution to Re-enable hugetlb vmemmap optimize Message-ID: References: <20240113094436.2506396-1-sunnanyong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240113094436.2506396-1-sunnanyong@huawei.com> On Sat, Jan 13, 2024 at 05:44:33PM +0800, Nanyong Sun wrote: > HVO was previously disabled on arm64 [1] due to the lack of necessary > BBM(break-before-make) logic when changing page tables. > This set of patches fix this by adding necessary BBM sequence when > changing page table, and supporting vmemmap page fault handling to > fixup kernel address translation fault if vmemmap is concurrently accessed. I'm not keen on this approach. I'm not even sure it's safe. In the second patch, you take the init_mm.page_table_lock on the fault path but are we sure this is unlocked when the fault was taken? Basically you can get a fault anywhere something accesses a struct page. How often is this code path called? I wonder whether a stop_machine() approach would be simpler. Andrew, I'd suggest we drop these patches from the mm tree for the time being. They haven't received much review from the arm64 folk. Thanks. -- Catalin