Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp265796lqi; Wed, 6 Mar 2024 17:09:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW3lB3ayOSJ75jyUha1JxCkeBHSYxa4sx2hE2dA/MzB5RsLx8MDl1Y6xU10yygFAMpnuFEkMIWJ1+XVKBODt5kSwzoVVZvtjizJFcRsQA== X-Google-Smtp-Source: AGHT+IGXttOqQ69mSQb/4XXCnqyOoZ6WDyx0INVn37MSIX5GONzqWfwTNefJBuYkCYEuoHMGIgKN X-Received: by 2002:a9d:7996:0:b0:6e4:fa15:6dd6 with SMTP id h22-20020a9d7996000000b006e4fa156dd6mr5987289otm.0.1709773772754; Wed, 06 Mar 2024 17:09:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709773772; cv=pass; d=google.com; s=arc-20160816; b=Pu0YRv9pjeoUNBzqdMkqyzW7uMmKhR5KjHCbobLljqz/XYpFlDSAzKcyN19z4Qbfek AGhcq8qFbVUW9ziEVEImC/5jyZIwjSQZNvynl0H3btRihtlFcDZyZ2DXN6jrFq5XSFkg 0PBlmq387q2XG3IGUzSSrnuHjVwn0dSCjrAb/phG+Ij88daosx0761ZtHZY5o0GfXYPt buej38Lcm4diTIGINVIGB3i9aQYVo4jqh5dv7LUHcROeGb7vr8OmDal+t3t6u/XUFwho uQTC1iTEIv5cExN2ezJtxj98Y1Q4k9yZmfmhU0uiWtcJmSVT5NXDr99iWx8ZdpcGYwbR hObA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=+ihCWe5zgWKtKbsCtLi2zGhVWJWcNRW8adpGXB05ZU4=; fh=jsJwwuYTy3Q3bk3qROGtmq2W5LGrWtFhrJYiKtfg4qQ=; b=hmuCar7YJPFouTt3aT7T6oFPM3u9wjETfz54B21Df7QSw43PQsa9y+gmbUP6Zt4zKY ubCwPFCh9gSYtQn8zV05cbg85a8BuB1rlVzizIXQ2TmVqih41XzVBVsVn0ej9L6WpVtb so1wRdv+bcpzyDrx4KpyxkyZTxL/Fr2E3sKHpXkZQhV7DXTIGcyhM3PmkJjZyKo6Etdo 7UhQLBA2jUp9Vpfxgtiu+EqQLTqKsH0d2O8g6kBi5v5j1Ju3IO3fPevpi0bzo6DFRlqG SHDR4sSzoMp+hC9u3PCGCeWVZvU3knjK8hMLp7QOeyAv0XdtHrBZnttpwjb9ik5gR2Cg Xy1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jrCNbtB5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94815-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d16-20020a656210000000b005dc4d954a84si13036984pgv.226.2024.03.06.17.09.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 17:09:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jrCNbtB5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94815-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94815-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 22F39283A86 for ; Thu, 7 Mar 2024 01:09:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7BD074C92; Thu, 7 Mar 2024 01:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jrCNbtB5" 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 935141391 for ; Thu, 7 Mar 2024 01:07:05 +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=1709773625; cv=none; b=q5vDzzbQ6aRzzsm65nLRUZ5hfypzHZND+jUAObury+1T6faG5SJj/R7RW36Oefgk7q3DIM+qNNYxQeY4yd+osPlp8QQGSBuQPQxzrmK5RgMi08qmO5VY9SxMuFhnG2cM+fEEnftZW+ZPuK5J/gbl1grq5HOH+6/3TAffRsmQdFk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709773625; c=relaxed/simple; bh=4bqWptoKbnRgrpqaRERXOF58F2B3DTRxO8EnLm4nMi4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CWzQ4DDSkePy8Pg2CBZHVTP/kvue6smp+WgkwWfAtmbMZ/Y4jfE21NTG6xwxxdVijigJwwkpoVdaoKaPpITP5kJwA7td3/CgE6K/En4dLb4zMbcdM+wJFZVpFksT9AtJza59RxAzdNJGjmyV/fM60qJZO19WloLVXrcr/cEuc3s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jrCNbtB5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F6A7C433F1; Thu, 7 Mar 2024 01:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709773625; bh=4bqWptoKbnRgrpqaRERXOF58F2B3DTRxO8EnLm4nMi4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=jrCNbtB5YcSuEDMNq1BjhKJby+ulYRhhfEgvyaD6HS83j6LLzr4zGgEum1aMRBPuI bV3ZqX/QGlLYpzAuXjV2syAfOSsMspXu+++FJ6AddCtrWXg1vgtknrlRHyt1MuptGl DiNEnMUvG54BNfY8Z0CYT2qahjhlM7IcISZHkepKoPMjXPt1M9F4vI9MLCOg/gRbMW YT3oeSDCQ4AFaUyKpuxJVN1MJib+7weIJLayFbKDCst0gaO6YBVOZup3advBOCUzQo oOuIsyhSAGkmt8LB4v3bfbDR1rWzpcAEW/kNBL3XcMyxQ8YzzTEbYuZH5Jpm2vb/Fn wDjmX6zgF4g/A== Message-ID: Date: Thu, 7 Mar 2024 09:07:01 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] erofs: apply proper VMA alignment for memory mapped files on THP Content-Language: en-US To: Gao Xiang , linux-erofs@lists.ozlabs.org Cc: LKML References: <20240306053138.2240206-1-hsiangkao@linux.alibaba.com> <30300dc7-3063-4e09-bb21-22951ec23a38@linux.alibaba.com> From: Chao Yu In-Reply-To: <30300dc7-3063-4e09-bb21-22951ec23a38@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/3/6 14:51, Gao Xiang wrote: > > > On 2024/3/6 13:31, Gao Xiang wrote: >> There are mainly two reasons that thp_get_unmapped_area() should be >> used for EROFS as other filesystems: >> >>   - It's needed to enable PMD mappings as a FSDAX filesystem, see >>     commit 74d2fad1334d ("thp, dax: add thp_get_unmapped_area for pmd >>     mappings"); >> >>   - It's useful together with CONFIG_READ_ONLY_THP_FOR_FS which enables >>     THPs for read-only mmapped files (e.g. shared libraries) even without >>     FSDAX.  See commit 1854bc6e2420 ("mm/readahead: Align file mappings >>     for non-DAX"). > > Refine this part as > >  - It's useful together with large folios and CONFIG_READ_ONLY_THP_FOR_FS >    which enable THPs for mmapped files (e.g. shared libraries) even without >    ... > >> >> Fixes: 06252e9ce05b ("erofs: dax support for non-tailpacking regular file") > > Fixes: ce529cc25b18 ("erofs: enable large folios for iomap mode") > Fixes: be62c5198861 ("erofs: enable large folios for fscache mode") > >> Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,