linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH v3 00/23] Convert to filemap_get_folios_tag()
@ 2022-10-17 20:24 Vishal Moola (Oracle)
  2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 01/23] pagemap: Add filemap_grab_folio() Vishal Moola (Oracle)
                   ` (22 more replies)
  0 siblings, 23 replies; 61+ messages in thread
From: Vishal Moola (Oracle) @ 2022-10-17 20:24 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-cifs, linux-nilfs, Vishal Moola (Oracle), linux-kernel,
	linux-f2fs-devel, cluster-devel, linux-mm, ceph-devel, linux-ext4,
	linux-afs, linux-btrfs

This patch series replaces find_get_pages_range_tag() with
filemap_get_folios_tag(). This also allows the removal of multiple
calls to compound_head() throughout.
It also makes a good chunk of the straightforward conversions to folios,
and takes the opportunity to introduce a function that grabs a folio
from the pagecache.

F2fs and Ceph have quite alot of work to be done regarding folios, so
for now those patches only have the changes necessary for the removal of
find_get_pages_range_tag(), and only support folios of size 1 (which is
all they use right now anyways).

I've run xfstests on btrfs, ext4, f2fs, and nilfs2, but more testing may be
beneficial. The page-writeback and filemap changes implicitly work. Testing
and review of the other changes (afs, ceph, cifs, gfs2) would be appreciated.

---
v3:
  Rebased onto upstream 6.1
  Simplified the ceph patch to only necessary changes
  Changed commit messages throughout to be clearer
  Got an Acked-by for another nilfs patch
  Got Tested-by for afs

v2:
  Got Acked-By tags for nilfs and btrfs changes
  Fixed an error arising in f2fs
  - Reported-by: kernel test robot <lkp@intel.com>

Vishal Moola (Oracle) (23):
  pagemap: Add filemap_grab_folio()
  filemap: Added filemap_get_folios_tag()
  filemap: Convert __filemap_fdatawait_range() to use
    filemap_get_folios_tag()
  page-writeback: Convert write_cache_pages() to use
    filemap_get_folios_tag()
  afs: Convert afs_writepages_region() to use filemap_get_folios_tag()
  btrfs: Convert btree_write_cache_pages() to use
    filemap_get_folio_tag()
  btrfs: Convert extent_write_cache_pages() to use
    filemap_get_folios_tag()
  ceph: Convert ceph_writepages_start() to use filemap_get_folios_tag()
  cifs: Convert wdata_alloc_and_fillpages() to use
    filemap_get_folios_tag()
  ext4: Convert mpage_prepare_extent_to_map() to use
    filemap_get_folios_tag()
  f2fs: Convert f2fs_fsync_node_pages() to use filemap_get_folios_tag()
  f2fs: Convert f2fs_flush_inline_data() to use filemap_get_folios_tag()
  f2fs: Convert f2fs_sync_node_pages() to use filemap_get_folios_tag()
  f2fs: Convert f2fs_write_cache_pages() to use filemap_get_folios_tag()
  f2fs: Convert last_fsync_dnode() to use filemap_get_folios_tag()
  f2fs: Convert f2fs_sync_meta_pages() to use filemap_get_folios_tag()
  gfs2: Convert gfs2_write_cache_jdata() to use filemap_get_folios_tag()
  nilfs2: Convert nilfs_lookup_dirty_data_buffers() to use
    filemap_get_folios_tag()
  nilfs2: Convert nilfs_lookup_dirty_node_buffers() to use
    filemap_get_folios_tag()
  nilfs2: Convert nilfs_btree_lookup_dirty_buffers() to use
    filemap_get_folios_tag()
  nilfs2: Convert nilfs_copy_dirty_pages() to use
    filemap_get_folios_tag()
  nilfs2: Convert nilfs_clear_dirty_pages() to use
    filemap_get_folios_tag()
  filemap: Remove find_get_pages_range_tag()

 fs/afs/write.c          | 114 +++++++++++++++++++++-------------------
 fs/btrfs/extent_io.c    |  57 ++++++++++----------
 fs/ceph/addr.c          |  58 ++++++++++----------
 fs/cifs/file.c          |  33 ++++++++++--
 fs/ext4/inode.c         |  55 ++++++++++---------
 fs/f2fs/checkpoint.c    |  49 +++++++++--------
 fs/f2fs/compress.c      |  13 ++---
 fs/f2fs/data.c          |  69 +++++++++++++-----------
 fs/f2fs/f2fs.h          |   5 +-
 fs/f2fs/node.c          |  72 +++++++++++++------------
 fs/gfs2/aops.c          |  64 ++++++++++++----------
 fs/nilfs2/btree.c       |  14 ++---
 fs/nilfs2/page.c        |  59 +++++++++++----------
 fs/nilfs2/segment.c     |  44 ++++++++--------
 include/linux/pagemap.h |  32 +++++++----
 include/linux/pagevec.h |   8 ---
 mm/filemap.c            |  87 +++++++++++++++---------------
 mm/page-writeback.c     |  44 ++++++++--------
 mm/swap.c               |  10 ----
 19 files changed, 467 insertions(+), 420 deletions(-)

-- 
2.36.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 61+ messages in thread
* [f2fs-dev] [PATCH 0/5] Support enhanced hot/cold data separation for f2fs
@ 2022-11-28  8:58 qixiaoyu1
  2022-11-29  7:49 ` [f2fs-dev] [PATCH] f2fs: " Yangtao Li via Linux-f2fs-devel
  0 siblings, 1 reply; 61+ messages in thread
From: qixiaoyu1 @ 2022-11-28  8:58 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu
  Cc: xiongping1, qixiaoyu1, linux-kernel, linux-f2fs-devel

This patch series introduce a runtime hot/cold data separation
method for f2fs, in order to improve the accuracy for data
temperature classification, reduce the garbage collection overhead
after long-term data updates.

Enhanced hot/cold data separation can record data block update
frequency as "age" of the extent per inode, and take use of the age
info to indicate better temperature type for data block allocation:
 - It record total data blocks allocated since mount;
 - When file extent has been updated, it calculate the count of data
blocks allocated since last update as the age of the extent;
 - Before the data block allocated, it search for the age info and
choose the suitable segment for allocation.

Patch 1 records total data blocks allocated since mount.

Patch 2 implements cache to manager block update frequency per inode.

Patch 3 adds age_extent_cache mount option to enable this feature only
when age_extent_cache mount option is on.

Patch 4 updates block age info during out of place update.

Patch 5 implements data block seperation with block update frequency.

Test and result:
 - Prepare: create about 30000 files
  * 3% for cold files (with cold file extension like .apk, from 3M to 10M)
  * 50% for warm files (with random file extension like .FcDxq, from 1K
to 4M)
  * 47% for hot files (with hot file extension like .db, from 1K to 256K)
 - create(5%)/random update(90%)/delete(5%) the files
  * total write amount is about 70G
  * fsync will be called for .db files, and buffered write will be used
for other files

The storage of test device is large enough(128G) so that it will not
switch to SSR mode during the test.

Benefit: dirty segment count increment reduce about 14%
 - before: Dirty +21110
 - after:  Dirty +18286

qixiaoyu1 (2):
  f2fs: update block age info during out of place update
  f2fs: implement data block seperation with block update frequency

xiongping1 (3):
  f2fs: record total data blocks allocated since mount
  f2fs: implement cache to manager block update frequency per inode
  f2fs: add age_extent_cache mount option

 Documentation/ABI/testing/sysfs-fs-f2fs |  14 +
 Documentation/filesystems/f2fs.rst      |   4 +
 fs/f2fs/Kconfig                         |   7 +
 fs/f2fs/Makefile                        |   1 +
 fs/f2fs/block_age.c                     | 733 ++++++++++++++++++++++++
 fs/f2fs/debug.c                         |  20 +
 fs/f2fs/f2fs.h                          |  83 +++
 fs/f2fs/file.c                          |  10 +
 fs/f2fs/inode.c                         |   8 +
 fs/f2fs/namei.c                         |   4 +
 fs/f2fs/node.c                          |   7 +-
 fs/f2fs/node.h                          |   3 +
 fs/f2fs/segment.c                       |  23 +
 fs/f2fs/shrinker.c                      |   3 +
 fs/f2fs/super.c                         |  51 ++
 fs/f2fs/sysfs.c                         |  28 +
 include/trace/events/f2fs.h             | 239 ++++++++
 17 files changed, 1237 insertions(+), 1 deletion(-)
 create mode 100644 fs/f2fs/block_age.c

-- 
2.36.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2024-01-27  7:05 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 20:24 [f2fs-dev] [PATCH v3 00/23] Convert to filemap_get_folios_tag() Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 01/23] pagemap: Add filemap_grab_folio() Vishal Moola (Oracle)
2022-10-24 19:36   ` Vishal Moola
2022-10-24 19:38   ` Matthew Wilcox
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 02/23] filemap: Added filemap_get_folios_tag() Vishal Moola (Oracle)
2022-10-24 19:42   ` Matthew Wilcox
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 03/23] filemap: Convert __filemap_fdatawait_range() to use filemap_get_folios_tag() Vishal Moola (Oracle)
2022-10-24 20:06   ` Matthew Wilcox
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 04/23] page-writeback: Convert write_cache_pages() " Vishal Moola (Oracle)
2022-10-24 20:12   ` Matthew Wilcox
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 05/23] afs: Convert afs_writepages_region() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 06/23] btrfs: Convert btree_write_cache_pages() to use filemap_get_folio_tag() Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 07/23] btrfs: Convert extent_write_cache_pages() to use filemap_get_folios_tag() Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 08/23] ceph: Convert ceph_writepages_start() " Vishal Moola (Oracle)
2022-10-28 17:20   ` Jeff Layton
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 09/23] cifs: Convert wdata_alloc_and_fillpages() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 10/23] ext4: Convert mpage_prepare_extent_to_map() " Vishal Moola (Oracle)
2022-10-24 19:26   ` Vishal Moola
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 11/23] f2fs: Convert f2fs_fsync_node_pages() " Vishal Moola (Oracle)
2022-10-24 19:31   ` Vishal Moola
2022-11-10 18:51     ` Vishal Moola
2022-10-29  4:46   ` Chao Yu
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 12/23] f2fs: Convert f2fs_flush_inline_data() " Vishal Moola (Oracle)
2022-10-29  4:47   ` Chao Yu
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 13/23] f2fs: Convert f2fs_sync_node_pages() " Vishal Moola (Oracle)
2022-10-29  4:47   ` Chao Yu
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 14/23] f2fs: Convert f2fs_write_cache_pages() " Vishal Moola (Oracle)
2022-11-14  7:02   ` Chao Yu
2022-11-14 21:38     ` Vishal Moola
2022-11-23  2:26       ` Vishal Moola
2022-11-23  7:51         ` Vishal Moola
2022-12-05 20:34         ` Vishal Moola
2022-12-12 14:41           ` Chao Yu
2022-12-12 19:13             ` [f2fs-dev] [RFC PATCH] " Vishal Moola (Oracle)
2022-12-15  1:48               ` Chao Yu
2022-12-15 18:45                 ` Matthew Wilcox
2022-12-21 17:17                   ` Vishal Moola
2022-12-23  8:07                     ` Christoph Hellwig
2022-12-15 19:02               ` Jaegeuk Kim
2023-01-03 20:53                 ` Matthew Wilcox
2022-11-29 19:14     ` [f2fs-dev] [PATCH v3 14/23] " Matthew Wilcox
2022-11-30 12:48       ` [f2fs-dev] [PATCH] f2fs: Support enhanced hot/cold data separation for f2fs Yangtao Li via Linux-f2fs-devel
2022-11-30 15:18         ` Matthew Wilcox
2022-12-07 20:51           ` Luis Chamberlain
2024-01-25 20:47             ` Matthew Wilcox
2024-01-25 20:54               ` Luis Chamberlain
2024-01-26 21:01                 ` Matthew Wilcox
2024-01-26 21:32                   ` Luis Chamberlain
2024-01-27  7:05                     ` Eric Biggers
2022-11-30 12:51       ` [f2fs-dev] [PATCH]f2fs: Convert f2fs_write_cache_pages() to use filemap_get_folios_tag() Yangtao Li via Linux-f2fs-devel
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 15/23] f2fs: Convert last_fsync_dnode() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 16/23] f2fs: Convert f2fs_sync_meta_pages() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 17/23] gfs2: Convert gfs2_write_cache_jdata() " Vishal Moola (Oracle)
2022-10-24 19:23   ` Vishal Moola
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 18/23] nilfs2: Convert nilfs_lookup_dirty_data_buffers() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 19/23] nilfs2: Convert nilfs_lookup_dirty_node_buffers() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 20/23] nilfs2: Convert nilfs_btree_lookup_dirty_buffers() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 21/23] nilfs2: Convert nilfs_copy_dirty_pages() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 22/23] nilfs2: Convert nilfs_clear_dirty_pages() " Vishal Moola (Oracle)
2022-10-17 20:24 ` [f2fs-dev] [PATCH v3 23/23] filemap: Remove find_get_pages_range_tag() Vishal Moola (Oracle)
  -- strict thread matches above, loose matches on Subject: below --
2022-11-28  8:58 [f2fs-dev] [PATCH 0/5] Support enhanced hot/cold data separation for f2fs qixiaoyu1
2022-11-29  7:49 ` [f2fs-dev] [PATCH] f2fs: " Yangtao Li via Linux-f2fs-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).