mbox series

[f2fs-dev,-next,00/14] btrfs: Cleaned up folio->page conversion

Message ID 20240822013714.3278193-1-lizetao1@huawei.com (mailing list archive)
Headers show
Series btrfs: Cleaned up folio->page conversion | expand

Message

Li Zetao Aug. 22, 2024, 1:37 a.m. UTC
Hi all,

In btrfs, because there are some interfaces that do not use folio,
there is page-folio-page mutual conversion. This patch set should
clean up folio-page conversion as much as possible and use folio
directly to reduce invalid conversions.

This patch set starts with the rectification of function parameters,
using folio as parameters directly. And some of those functions have
already been converted to folio internally, so this part has little
impact. 

I have tested with fsstress more than 10 hours, and no problems were
found. For the convenience of reviewing, I try my best to only modify
a single interface in each patch.

Josef also worked on converting pages to folios, and this patch set was
inspired by him:
https://lore.kernel.org/all/cover.1722022376.git.josef@toxicpanda.com/

Thanks,
Li Zetao

Li Zetao (14):
  btrfs: convert clear_page_extent_mapped() to take a folio
  btrfs: convert get_next_extent_buffer() to take a folio
  btrfs: convert try_release_subpage_extent_buffer() to take a folio
  btrfs: convert try_release_extent_buffer() to take a folio
  btrfs: convert read_key_bytes() to take a folio
  btrfs: convert submit_eb_subpage() to take a folio
  btrfs: convert submit_eb_page() to take a folio
  btrfs: convert try_release_extent_state() to take a folio
  btrfs: convert try_release_extent_mapping() to take a folio
  btrfs: convert zlib_decompress() to take a folio
  btrfs: convert lzo_decompress() to take a folio
  btrfs: convert zstd_decompress() to take a folio
  btrfs: convert btrfs_decompress() to take a folio
  btrfs: convert copy_inline_to_page() to use folio

 fs/btrfs/compression.c | 14 +++----
 fs/btrfs/compression.h |  8 ++--
 fs/btrfs/disk-io.c     |  2 +-
 fs/btrfs/extent_io.c   | 92 ++++++++++++++++++++----------------------
 fs/btrfs/extent_io.h   |  6 +--
 fs/btrfs/inode.c       |  8 ++--
 fs/btrfs/lzo.c         | 12 +++---
 fs/btrfs/reflink.c     | 35 ++++++++--------
 fs/btrfs/verity.c      | 14 +++----
 fs/btrfs/zlib.c        | 14 +++----
 fs/btrfs/zstd.c        | 16 ++++----
 11 files changed, 109 insertions(+), 112 deletions(-)

Comments

Josef Bacik Aug. 23, 2024, 7:50 p.m. UTC | #1
On Thu, Aug 22, 2024 at 09:37:00AM +0800, Li Zetao wrote:
> Hi all,
> 
> In btrfs, because there are some interfaces that do not use folio,
> there is page-folio-page mutual conversion. This patch set should
> clean up folio-page conversion as much as possible and use folio
> directly to reduce invalid conversions.
> 
> This patch set starts with the rectification of function parameters,
> using folio as parameters directly. And some of those functions have
> already been converted to folio internally, so this part has little
> impact. 
> 
> I have tested with fsstress more than 10 hours, and no problems were
> found. For the convenience of reviewing, I try my best to only modify
> a single interface in each patch.
> 
> Josef also worked on converting pages to folios, and this patch set was
> inspired by him:
> https://lore.kernel.org/all/cover.1722022376.git.josef@toxicpanda.com/
> 

This looks good, I'm running it through the CI.  If that comes out clean then
I'll put my reviewed-by on it and push it to our for-next branch.  The CI run
can be seen here

https://github.com/btrfs/linux/actions/runs/10531503734

Don't worry if you see errors on the zoned run or the RST run, Johannes is
running down the RST stuff and I need to sit down and figure out what's going on
with zoned.  If anything else fails I'll look at it to see if it's legit or not.
Thanks,

Josef
Josef Bacik Aug. 23, 2024, 9:15 p.m. UTC | #2
On Fri, Aug 23, 2024 at 03:50:51PM -0400, Josef Bacik wrote:
> On Thu, Aug 22, 2024 at 09:37:00AM +0800, Li Zetao wrote:
> > Hi all,
> > 
> > In btrfs, because there are some interfaces that do not use folio,
> > there is page-folio-page mutual conversion. This patch set should
> > clean up folio-page conversion as much as possible and use folio
> > directly to reduce invalid conversions.
> > 
> > This patch set starts with the rectification of function parameters,
> > using folio as parameters directly. And some of those functions have
> > already been converted to folio internally, so this part has little
> > impact. 
> > 
> > I have tested with fsstress more than 10 hours, and no problems were
> > found. For the convenience of reviewing, I try my best to only modify
> > a single interface in each patch.
> > 
> > Josef also worked on converting pages to folios, and this patch set was
> > inspired by him:
> > https://lore.kernel.org/all/cover.1722022376.git.josef@toxicpanda.com/
> > 
> 
> This looks good, I'm running it through the CI.  If that comes out clean then
> I'll put my reviewed-by on it and push it to our for-next branch.  The CI run
> can be seen here
> 
> https://github.com/btrfs/linux/actions/runs/10531503734
> 

Looks like the compression stuff panic'ed, the run has to finish before it
collects the dmesg so IDK where it failed yet, but I'd go over the compression
stuff again to see if you can spot it.  When the whole run finishes there will
be test artifacts you can get to.  If you don't have permissions (I honestly
don't know how the artifacts permission stuff works) then no worries, I'll grab
it in the morning and send you the test and dmesg of what fell over.  Thanks,

Josef
Josef Bacik Aug. 26, 2024, 2:08 p.m. UTC | #3
On Fri, Aug 23, 2024 at 05:15:22PM -0400, Josef Bacik wrote:
> On Fri, Aug 23, 2024 at 03:50:51PM -0400, Josef Bacik wrote:
> > On Thu, Aug 22, 2024 at 09:37:00AM +0800, Li Zetao wrote:
> > > Hi all,
> > > 
> > > In btrfs, because there are some interfaces that do not use folio,
> > > there is page-folio-page mutual conversion. This patch set should
> > > clean up folio-page conversion as much as possible and use folio
> > > directly to reduce invalid conversions.
> > > 
> > > This patch set starts with the rectification of function parameters,
> > > using folio as parameters directly. And some of those functions have
> > > already been converted to folio internally, so this part has little
> > > impact. 
> > > 
> > > I have tested with fsstress more than 10 hours, and no problems were
> > > found. For the convenience of reviewing, I try my best to only modify
> > > a single interface in each patch.
> > > 
> > > Josef also worked on converting pages to folios, and this patch set was
> > > inspired by him:
> > > https://lore.kernel.org/all/cover.1722022376.git.josef@toxicpanda.com/
> > > 
> > 
> > This looks good, I'm running it through the CI.  If that comes out clean then
> > I'll put my reviewed-by on it and push it to our for-next branch.  The CI run
> > can be seen here
> > 
> > https://github.com/btrfs/linux/actions/runs/10531503734
> > 
> 
> Looks like the compression stuff panic'ed, the run has to finish before it
> collects the dmesg so IDK where it failed yet, but I'd go over the compression
> stuff again to see if you can spot it.  When the whole run finishes there will
> be test artifacts you can get to.  If you don't have permissions (I honestly
> don't know how the artifacts permission stuff works) then no worries, I'll grab
> it in the morning and send you the test and dmesg of what fell over.  Thanks,
> 

They all fell over, so I suggest running fstests against your series before you
resend.  btrfs/069 paniced on one machine, btrfs/060 paniced on one machine.
None of the machines passsed without panicing.  Thanks,

Josef
Li Zetao Aug. 28, 2024, 1:08 p.m. UTC | #4
在 2024/8/26 22:08, Josef Bacik 写道:
> On Fri, Aug 23, 2024 at 05:15:22PM -0400, Josef Bacik wrote:
>> On Fri, Aug 23, 2024 at 03:50:51PM -0400, Josef Bacik wrote:
>>> On Thu, Aug 22, 2024 at 09:37:00AM +0800, Li Zetao wrote:
>>>> Hi all,
>>>>
>>>> In btrfs, because there are some interfaces that do not use folio,
>>>> there is page-folio-page mutual conversion. This patch set should
>>>> clean up folio-page conversion as much as possible and use folio
>>>> directly to reduce invalid conversions.
>>>>
>>>> This patch set starts with the rectification of function parameters,
>>>> using folio as parameters directly. And some of those functions have
>>>> already been converted to folio internally, so this part has little
>>>> impact.
>>>>
>>>> I have tested with fsstress more than 10 hours, and no problems were
>>>> found. For the convenience of reviewing, I try my best to only modify
>>>> a single interface in each patch.
>>>>
>>>> Josef also worked on converting pages to folios, and this patch set was
>>>> inspired by him:
>>>> https://lore.kernel.org/all/cover.1722022376.git.josef@toxicpanda.com/
>>>>
>>>
>>> This looks good, I'm running it through the CI.  If that comes out clean then
>>> I'll put my reviewed-by on it and push it to our for-next branch.  The CI run
>>> can be seen here
>>>
>>> https://github.com/btrfs/linux/actions/runs/10531503734
>>>
>>
>> Looks like the compression stuff panic'ed, the run has to finish before it
>> collects the dmesg so IDK where it failed yet, but I'd go over the compression
>> stuff again to see if you can spot it.  When the whole run finishes there will
>> be test artifacts you can get to.  If you don't have permissions (I honestly
>> don't know how the artifacts permission stuff works) then no worries, I'll grab
>> it in the morning and send you the test and dmesg of what fell over.  Thanks,
>>
> 
> They all fell over, so I suggest running fstests against your series before you
> resend.  btrfs/069 paniced on one machine, btrfs/060 paniced on one machine.
> None of the machines passsed without panicing.  Thanks,
> 
Thank you for your test. When btrfs/060 and btrfs/069 failed due to my 
carelessness, Dan has issued a patch[1] to fix it. After applying his 
patch, it was still found that 3 test cases reported errors. I reverted 
my patchset and the error still persists, so the errors may not be 
caused by my patch. Below is the test log:

   Failures: btrfs/012 btrfs/249 btrfs/284
   Failed 3 of 322 tests

My xfstests project is forked from https://github.com/kdave/xfstests.git

> Josef
> 

[1]: 
https://lore.kernel.org/linux-btrfs/20240827153739.GY25962@twin.jikos.cz/T/#m3f3e28dad05a9c8385a72f5503a5b9c130b44c04


Thanks,
Li Zetao.
patchwork-bot+f2fs--- via Linux-f2fs-devel Sept. 25, 2024, 3:41 a.m. UTC | #5
Hello:

This series was applied to jaegeuk/f2fs.git (dev)
by David Sterba <dsterba@suse.com>:

On Thu, 22 Aug 2024 09:37:00 +0800 you wrote:
> Hi all,
> 
> In btrfs, because there are some interfaces that do not use folio,
> there is page-folio-page mutual conversion. This patch set should
> clean up folio-page conversion as much as possible and use folio
> directly to reduce invalid conversions.
> 
> [...]

Here is the summary with links:
  - [f2fs-dev,01/14] btrfs: convert clear_page_extent_mapped() to take a folio
    (no matching commit)
  - [f2fs-dev,02/14] btrfs: convert get_next_extent_buffer() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/d4aeb5f7a7e6
  - [f2fs-dev,03/14] btrfs: convert try_release_subpage_extent_buffer() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/0145aa38cb39
  - [f2fs-dev,04/14] btrfs: convert try_release_extent_buffer() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/b8ae2bfa685f
  - [f2fs-dev,05/14] btrfs: convert read_key_bytes() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/884937793db5
  - [f2fs-dev,06/14] btrfs: convert submit_eb_subpage() to take a folio
    (no matching commit)
  - [f2fs-dev,07/14] btrfs: convert submit_eb_page() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/08dd8507b116
  - [f2fs-dev,08/14] btrfs: convert try_release_extent_state() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/dd0a8df45566
  - [f2fs-dev,09/14] btrfs: convert try_release_extent_mapping() to take a folio
    (no matching commit)
  - [f2fs-dev,10/14] btrfs: convert zlib_decompress() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/54c78d497b38
  - [f2fs-dev,11/14] btrfs: convert lzo_decompress() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/9f9a4e43a870
  - [f2fs-dev,12/14] btrfs: convert zstd_decompress() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/b70f3a45464b
  - [f2fs-dev,13/14] btrfs: convert btrfs_decompress() to take a folio
    https://git.kernel.org/jaegeuk/f2fs/c/aeb6d8814841
  - [f2fs-dev,14/14] btrfs: convert copy_inline_to_page() to use folio
    (no matching commit)

You are awesome, thank you!