public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: Youling Tang <youling.tang@linux.dev>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Youling Tang <tangyouling@kylinos.cn>
Subject: Re: [PATCH] bcachefs: fix alignment of VMA for memory mapped files on THP
Date: Fri, 21 Jun 2024 09:11:52 +0800	[thread overview]
Message-ID: <c24f044a-989d-4661-812d-3e2140f1f626@linux.dev> (raw)
In-Reply-To: <myw2h2mm7725gegy6pbqf4qpzghrfypnlbn4z6rh6idwfjzpjc@chzxxg47sw77>

Hi, Kent

Sorry to bother you, BTW, are the following patches still needed?

https://lore.kernel.org/linux-bcachefs/20240604084610.94558-1-youling.tang@linux.dev/
https://lore.kernel.org/linux-bcachefs/20240418083103.66703-1-youling.tang@linux.dev/
https://lore.kernel.org/linux-bcachefs/20240418005055.45482-1-youling.tang@linux.dev/

Thanks,
Youling.

On 20/06/2024 20:51, Kent Overstreet wrote:
> On Thu, Jun 20, 2024 at 09:22:42AM +0800, Youling Tang wrote:
>> From: Youling Tang <tangyouling@kylinos.cn>
>>
>> With CONFIG_READ_ONLY_THP_FOR_FS, the Linux kernel supports using THPs
>> for read-only mmapped files, such as shared libraries. However, the
>> kernel makes no attempt to actually align those mappings on 2MB
>> boundaries, which makes it impossible to use those THPs most of the
>> time. This issue applies to general file mapping THP as well as
>> existing setups using CONFIG_READ_ONLY_THP_FOR_FS. This is easily
>> fixed by using thp_get_unmapped_area for the unmapped_area function
>> in bcachefs, which is what ext2, ext4, fuse, xfs and btrfs all use.
>>
>> Similar to commit b0c582233a85 ("btrfs: fix alignment of VMA for
>> memory mapped files on THP").
>>
>> Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
> Thanks - applied


  reply	other threads:[~2024-06-21  1:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20  1:22 [PATCH] bcachefs: fix alignment of VMA for memory mapped files on THP Youling Tang
2024-06-20 12:51 ` Kent Overstreet
2024-06-21  1:11   ` Youling Tang [this message]
2024-06-21  1:41     ` Kent Overstreet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c24f044a-989d-4661-812d-3e2140f1f626@linux.dev \
    --to=youling.tang@linux.dev \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcachefs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tangyouling@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox