Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp285038lqi; Wed, 6 Mar 2024 18:02:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWxoH/TOLIs3k+7KNMKtriPP4iORhq3DsZrd+VauNcIMyi7vn2FwQHR9bP79r/bidtKLqu3QUsjlgUfr3VPYZMG0YS09QCoF7jBBjoIIg== X-Google-Smtp-Source: AGHT+IFy/EB1nTcbOF5rQuOhrvLtQsLq2qsvXNH7KDnDT/qwKr1zl7gDvwFR7kIoTtUNOJNbSaxu X-Received: by 2002:ad4:42b1:0:b0:68f:eed8:40af with SMTP id e17-20020ad442b1000000b0068feed840afmr7406221qvr.6.1709776963942; Wed, 06 Mar 2024 18:02:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709776963; cv=pass; d=google.com; s=arc-20160816; b=DD5X5haorrrjmbOT9auH8sDDGmpXVKThdU10bBVfmGAQ/h+B2MWqfy/VXbjnFkSZkt BAtbKmqVT/fA9uHVDn4a9jYr39i1H2GriwImETzIjsh5UhrPDLBf4xqgDeLuH8Vu5WSr rlf1rTJyNKaJWjUU6LD8SlvDj7zfBMVmSc8hLSDs4osJr3zFmp2jagsrxZg10d5C4cpC P+ZxWZsXfFF+xf8uuN4XKtlTI/ITTM2lJg4ZWY/obbo74myjryoTJD+9LzGjhBT13CHm ZqJ891A4/q5JBb5mEEaGOd1YMuumvMxhVuTv+adLxDC6Qk+WvLgHhr0IzUOkj1Hz4vqT ujpg== 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:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=JBfqtPn8k1lCO84oA6JKbGN+1vMEH2khXMOKAyW0fAs=; fh=4MWTM1cXefrQaJPq2PCLbe394XQMVOldskbMddaZU1Y=; b=eR4YpgTW/94ppP56I1KSzsJvZrNXVPSroaMlFt9drx8JnWbwzLpTV++qFp8yqSXFec AhsA75fq5a+zSKplSsxJz4c/LSTyDypBD3rAc0kFbTTmBMYmM7CRkZvRKUTo48Coo6jb 1g/7wt2CTu4sWlkpLS/cmppb5syPIMZxd2b0VlR4Z0CDXGBo6CuqUof+EN2CqPND5E90 Ac4JCd9yRCFsAFbcwLwZEW5F3wyeDDWqTa9/0ZMTA/MKzHPS9B86LxsjntdZYig7olJl f/t8Q9mkfbtI/fnrIi+rXizwTFEKwlmjIjW05wuzM0iKinbWbvx0M7vcESJd5bxKfnqA RL+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=buIw++UH; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-94845-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o2-20020ad45c82000000b0069048320d5fsi15876108qvh.521.2024.03.06.18.02.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 18:02:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94845-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=buIw++UH; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-94845-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A84991C22AA3 for ; Thu, 7 Mar 2024 02:02:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 733998F66; Thu, 7 Mar 2024 02:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="buIw++UH" Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) (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 BDBD27484 for ; Thu, 7 Mar 2024 02:02:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709776947; cv=none; b=s2RAbVeD/PXAPXpYhM0msN9//ho1+1AIrYOlOkENgbB5pphJmPRVwhngyLOZvHgYAuSEyTpk9UVu8Y6xT+Z8VhkuZiNXSWal6r+eODBJvxRVyEPT4QgP7sslG50GZB8ehU+FjuN40DZyGZKy8GUfWv7P8n9uZNDPU1McUtpsPEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709776947; c=relaxed/simple; bh=3dofe8XBTF5qxX/nAQfcCvkyYnl+W4TNyFSd7kdrbEY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uvwavv85RArlSKJ1bpzbY39PIBEWSsYDKomWIMfXbGAQngtvBYKH39zh4nJrcWM8AglriBt8Kf8pOfq0oyieD6xOVj/LZ5ksSHHYYqPwievR65HlySzz4rNyYV2lO6mBeZxpevXnH1L+fwMFguQ3UTs06ZuEexBTjbH3xtO7sJw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=buIw++UH; arc=none smtp.client-ip=115.124.30.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1709776942; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=JBfqtPn8k1lCO84oA6JKbGN+1vMEH2khXMOKAyW0fAs=; b=buIw++UHIkodJt1yavK/HLEd94q30mO3yZpIbt9yPbIu9XNwJ5PxL4lbOM2DO34aUwNPXGXorb4zG6KkdFRsS+JE1HKuunTYBljXZ1qKydcsyDtHk5W+1P/T/Jl5pPcc3utSbl+cl2C76mY+vc8RIXK4lXbSbZUPwKA6EljT1Ns= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R791e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0W1z3fTt_1709776940; Received: from 30.97.48.224(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0W1z3fTt_1709776940) by smtp.aliyun-inc.com; Thu, 07 Mar 2024 10:02:21 +0800 Message-ID: <1096418c-7657-4d38-8344-bf6cf3c1b8bb@linux.alibaba.com> Date: Thu, 7 Mar 2024 10:02:20 +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 To: Chao Yu , linux-erofs@lists.ozlabs.org Cc: LKML References: <20240306053138.2240206-1-hsiangkao@linux.alibaba.com> <30300dc7-3063-4e09-bb21-22951ec23a38@linux.alibaba.com> From: Gao Xiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/3/7 09:07, Chao Yu wrote: > 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, added! Thanks, Gao Xiang > > Thanks,