2022-11-28 09:22:48

by qixiaoyu1

[permalink] [raw]
Subject: [PATCH 0/5] Support enhanced hot/cold data separation for f2fs

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


2022-11-28 09:25:59

by qixiaoyu1

[permalink] [raw]
Subject: [PATCH 1/5] f2fs: record total data blocks allocated since mount

From: xiongping1 <[email protected]>

Signed-off-by: xiongping1 <[email protected]>
Signed-off-by: qixiaoyu1 <[email protected]>
---
fs/f2fs/Kconfig | 7 +++++++
fs/f2fs/Makefile | 1 +
fs/f2fs/block_age.c | 28 ++++++++++++++++++++++++++++
fs/f2fs/debug.c | 7 +++++++
fs/f2fs/f2fs.h | 15 +++++++++++++++
fs/f2fs/segment.c | 4 ++++
fs/f2fs/super.c | 4 ++++
7 files changed, 66 insertions(+)
create mode 100644 fs/f2fs/block_age.c

diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig
index 03ef087537c7..84915f9c6bc8 100644
--- a/fs/f2fs/Kconfig
+++ b/fs/f2fs/Kconfig
@@ -150,3 +150,10 @@ config F2FS_UNFAIR_RWSEM
help
Use unfair rw_semaphore, if system configured IO priority by block
cgroup.
+
+config F2FS_FS_DATA_SEPARATION
+ bool "F2FS hot/cold data separation feature"
+ depends on F2FS_FS
+ help
+ Enable data blocks separation according to block update frequency.
+
diff --git a/fs/f2fs/Makefile b/fs/f2fs/Makefile
index 8a7322d229e4..70d8f0e23b46 100644
--- a/fs/f2fs/Makefile
+++ b/fs/f2fs/Makefile
@@ -10,3 +10,4 @@ f2fs-$(CONFIG_F2FS_FS_POSIX_ACL) += acl.o
f2fs-$(CONFIG_FS_VERITY) += verity.o
f2fs-$(CONFIG_F2FS_FS_COMPRESSION) += compress.o
f2fs-$(CONFIG_F2FS_IOSTAT) += iostat.o
+f2fs-$(CONFIG_F2FS_FS_DATA_SEPARATION) += block_age.o
diff --git a/fs/f2fs/block_age.c b/fs/f2fs/block_age.c
new file mode 100644
index 000000000000..1e8711a03959
--- /dev/null
+++ b/fs/f2fs/block_age.c
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * fs/f2fs/block_age.c
+ *
+ * Copyright (c) 2022 xiaomi Co., Ltd.
+ * http://www.xiaomi.com/
+ */
+#include <linux/fs.h>
+#include <linux/f2fs_fs.h>
+
+#include "f2fs.h"
+#include "segment.h"
+
+static inline void f2fs_inc_data_block_alloc(struct f2fs_sb_info *sbi)
+{
+ atomic64_inc(&sbi->total_data_alloc);
+}
+
+void f2fs_init_block_age_info(struct f2fs_sb_info *sbi)
+{
+ atomic64_set(&sbi->total_data_alloc, 0);
+}
+
+void f2fs_inc_block_alloc_count(struct f2fs_sb_info *sbi, int type)
+{
+ if (IS_DATASEG(type))
+ f2fs_inc_data_block_alloc(sbi);
+}
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index a216dcdf6941..d24abdac20bb 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -81,6 +81,9 @@ static void update_general_status(struct f2fs_sb_info *sbi)
si->ext_tree = atomic_read(&sbi->total_ext_tree);
si->zombie_tree = atomic_read(&sbi->total_zombie_tree);
si->ext_node = atomic_read(&sbi->total_ext_node);
+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ si->total_data_blocks_alloc = atomic64_read(&sbi->total_data_alloc);
+#endif
si->ndirty_node = get_pages(sbi, F2FS_DIRTY_NODES);
si->ndirty_dent = get_pages(sbi, F2FS_DIRTY_DENTS);
si->ndirty_meta = get_pages(sbi, F2FS_DIRTY_META);
@@ -373,6 +376,10 @@ static int stat_show(struct seq_file *s, void *v)
seq_printf(s, "Utilization: %u%% (%u valid blocks)\n",
si->utilization, si->valid_count);

+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ seq_printf(s, " - Data Block Allocated: %llu\n",
+ si->total_data_blocks_alloc);
+#endif
seq_printf(s, " - Node: %u (Inode: %u, ",
si->valid_node_count, si->valid_inode_count);
seq_printf(s, "Other: %u)\n - Data: %u\n",
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index e6355a5683b7..686f09846de4 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1807,6 +1807,10 @@ struct f2fs_sb_info {
u64 sectors_written_start;
u64 kbytes_written;

+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ atomic64_t total_data_alloc;
+#endif
+
/* Reference to checksum algorithm driver via cryptoapi */
struct crypto_shash *s_chksum_driver;

@@ -3858,6 +3862,9 @@ struct f2fs_stat_info {
int main_area_segs, main_area_sections, main_area_zones;
unsigned long long hit_largest, hit_cached, hit_rbtree;
unsigned long long hit_total, total_ext;
+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ unsigned long long total_data_blocks_alloc;
+#endif
int ext_tree, zombie_tree, ext_node;
int ndirty_node, ndirty_dent, ndirty_meta, ndirty_imeta;
int ndirty_data, ndirty_qdata;
@@ -4166,6 +4173,14 @@ void f2fs_init_extent_cache_info(struct f2fs_sb_info *sbi);
int __init f2fs_create_extent_cache(void);
void f2fs_destroy_extent_cache(void);

+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+/*
+ * block_age.c
+ */
+void f2fs_init_block_age_info(struct f2fs_sb_info *sbi);
+void f2fs_inc_block_alloc_count(struct f2fs_sb_info *sbi, int type);
+#endif
+
/*
* sysfs.c
*/
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index acf3d3fa4363..0cf022fd3560 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -3280,6 +3280,10 @@ void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
locate_dirty_segment(sbi, GET_SEGNO(sbi, old_blkaddr));
locate_dirty_segment(sbi, GET_SEGNO(sbi, *new_blkaddr));

+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ f2fs_inc_block_alloc_count(sbi, type);
+#endif
+
up_write(&sit_i->sentry_lock);

if (page && IS_NODESEG(type)) {
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 3834ead04620..bf799d92282a 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4475,6 +4475,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)

f2fs_join_shrinker(sbi);

+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ f2fs_init_block_age_info(sbi);
+#endif
+
f2fs_tuning_parameters(sbi);

f2fs_notice(sbi, "Mounted with checkpoint version = %llx",
--
2.36.1

2022-11-28 09:47:14

by qixiaoyu1

[permalink] [raw]
Subject: [PATCH 4/5] f2fs: update block age info during out of place update

Signed-off-by: qixiaoyu1 <[email protected]>
Signed-off-by: xiongping1 <[email protected]>
---
fs/f2fs/block_age.c | 89 ++++++++++++++++++++++++++++++++++++++++++++-
fs/f2fs/f2fs.h | 1 +
fs/f2fs/segment.c | 4 ++
3 files changed, 92 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/block_age.c b/fs/f2fs/block_age.c
index bc009616adfb..488461b3f4bf 100644
--- a/fs/f2fs/block_age.c
+++ b/fs/f2fs/block_age.c
@@ -9,9 +9,14 @@
#include <linux/f2fs_fs.h>

#include "f2fs.h"
+#include "node.h"
#include "segment.h"
#include <trace/events/f2fs.h>

+
+#define LAST_AGE_WEIGHT 30
+#define SAME_AGE_REGION 1024
+
static struct kmem_cache *age_extent_tree_slab;
static struct kmem_cache *age_extent_node_slab;

@@ -264,8 +269,8 @@ static inline bool __is_age_extent_mergeable(struct age_extent_info *back,
struct age_extent_info *front)
{
return (back->fofs + back->len == front->fofs &&
- back->age == front->age &&
- back->last_blocks == front->last_blocks);
+ abs(back->age - front->age) <= SAME_AGE_REGION &&
+ abs(back->last_blocks - front->last_blocks) <= SAME_AGE_REGION);
}

static inline bool __is_back_age_ext_mergeable(struct age_extent_info *cur,
@@ -497,6 +502,86 @@ void f2fs_truncate_age_extent_cache(struct inode *inode, pgoff_t fofs, unsigned
f2fs_update_age_extent_cache(inode, fofs, len, 0, 0);
}

+unsigned long long f2fs_get_cur_dblock_allocated(struct f2fs_sb_info *sbi)
+{
+ return atomic64_read(&sbi->total_data_alloc);
+}
+
+static unsigned long long calculate_block_age(unsigned long long new,
+ unsigned long long old)
+{
+ if (new >= old)
+ return new - (new - old) * LAST_AGE_WEIGHT / 100;
+ else
+ return new + (old - new) * LAST_AGE_WEIGHT / 100;
+}
+
+void f2fs_update_data_block_age(struct dnode_of_data *dn)
+{
+ struct f2fs_sb_info *sbi = F2FS_I_SB(dn->inode);
+ unsigned long long cur_total_blk_alloced = f2fs_get_cur_dblock_allocated(sbi);
+ pgoff_t fofs;
+ unsigned long long cur_age, new_age;
+ struct age_extent_info ei;
+ bool find;
+ loff_t f_size = i_size_read(dn->inode);
+
+ if (!f2fs_may_age_extent_tree(dn->inode))
+ return;
+
+ fofs = f2fs_start_bidx_of_node(ofs_of_node(dn->node_page), dn->inode) +
+ dn->ofs_in_node;
+
+
+ /* When I/O is not aligned to a PAGE_SIZE, update will happen to the last
+ * file block even in seq write. So don't record age for newly last file
+ * block here.
+ */
+ if ((f_size >> PAGE_SHIFT) == fofs && f_size & (PAGE_SIZE - 1) &&
+ dn->data_blkaddr == NEW_ADDR)
+ return;
+
+ find = f2fs_lookup_age_extent_cache(dn->inode, fofs, &ei);
+ if (find) {
+ if (cur_total_blk_alloced >= ei.last_blocks)
+ cur_age = cur_total_blk_alloced - ei.last_blocks;
+ else
+ /* total_data_alloc overflow */
+ cur_age = ULLONG_MAX - ei.last_blocks + cur_total_blk_alloced;
+
+ if (ei.age)
+ new_age = calculate_block_age(cur_age, ei.age);
+ else
+ new_age = cur_age;
+
+ WARN(new_age > cur_total_blk_alloced,
+ "inode block(%lu: %lu) age changed from: %llu to %llu",
+ dn->inode->i_ino, fofs, ei.age, new_age);
+ } else {
+ f2fs_bug_on(sbi, dn->data_blkaddr == NULL_ADDR);
+
+ if (dn->data_blkaddr == NEW_ADDR)
+ /* the data block was allocated for the first time */
+ new_age = 0;
+ else {
+ if (__is_valid_data_blkaddr(dn->data_blkaddr) &&
+ !f2fs_is_valid_blkaddr(sbi, dn->data_blkaddr,
+ DATA_GENERIC_ENHANCE)) {
+ f2fs_bug_on(sbi, 1);
+ return;
+ }
+
+ /*
+ * init block age with zero, this can happen when the block age extent
+ * was reclaimed due to memory constraint or system reboot
+ */
+ new_age = 0;
+ }
+ }
+
+ f2fs_update_age_extent_cache(dn->inode, fofs, 1, new_age, cur_total_blk_alloced);
+}
+
void f2fs_destroy_age_extent_tree(struct inode *inode)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 428cc560b721..23516498b6d0 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -4238,6 +4238,7 @@ bool f2fs_lookup_age_extent_cache(struct inode *inode, pgoff_t pgofs,
void f2fs_update_age_extent_cache(struct inode *inode, pgoff_t fofs,
unsigned int len, u64 age,
unsigned long long cur_blk_alloced);
+void f2fs_update_data_block_age(struct dnode_of_data *dn);
void f2fs_truncate_age_extent_cache(struct inode *inode, pgoff_t fofs,
unsigned int len);
int __init f2fs_create_age_extent_cache(void);
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index b105d8418f77..d4c338f332fa 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -3417,6 +3417,10 @@ void f2fs_outplace_write_data(struct dnode_of_data *dn,
struct f2fs_summary sum;

f2fs_bug_on(sbi, dn->data_blkaddr == NULL_ADDR);
+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ if (fio->io_type == FS_DATA_IO || fio->io_type == FS_CP_DATA_IO)
+ f2fs_update_data_block_age(dn);
+#endif
set_summary(&sum, dn->nid, dn->ofs_in_node, fio->version);
do_write_page(&sum, fio);
f2fs_update_data_blkaddr(dn, fio->new_blkaddr);
--
2.36.1

2022-11-28 10:02:07

by qixiaoyu1

[permalink] [raw]
Subject: [PATCH 5/5] f2fs: implement data block seperation with block update frequency

Signed-off-by: qixiaoyu1 <[email protected]>
Signed-off-by: xiongping1 <[email protected]>
---
Documentation/ABI/testing/sysfs-fs-f2fs | 14 ++++++++++++
fs/f2fs/block_age.c | 29 +++++++++++++++++++++++++
fs/f2fs/f2fs.h | 4 ++++
fs/f2fs/segment.c | 9 ++++++++
fs/f2fs/sysfs.c | 28 ++++++++++++++++++++++++
include/trace/events/f2fs.h | 2 +-
6 files changed, 85 insertions(+), 1 deletion(-)

diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs
index 483639fb727b..34952666b2fe 100644
--- a/Documentation/ABI/testing/sysfs-fs-f2fs
+++ b/Documentation/ABI/testing/sysfs-fs-f2fs
@@ -634,3 +634,17 @@ Date: July 2022
Contact: "Daeho Jeong" <[email protected]>
Description: Show the accumulated total revoked atomic write block count after boot.
If you write "0" here, you can initialize to "0".
+
+What: /sys/fs/f2fs/<disk>/hot_data_age_threshold
+Date: November 2022
+Contact: "Ping Xiong" <[email protected]>
+Description: When DATA SEPARATION is on, it controls the age threshold to indicate
+ the data blocks as hot. By default it was initialized as 262144 blocks
+ (equals to 1GB).
+
+What: /sys/fs/f2fs/<disk>/warm_data_age_threshold
+Date: November 2022
+Contact: "Ping Xiong" <[email protected]>
+Description: When DATA SEPARATION is on, it controls the age threshold to indicate
+ the data blocks as warm. By default it was initialized as 2621440 blocks
+ (equals to 10GB).
diff --git a/fs/f2fs/block_age.c b/fs/f2fs/block_age.c
index 488461b3f4bf..d0b578544df7 100644
--- a/fs/f2fs/block_age.c
+++ b/fs/f2fs/block_age.c
@@ -17,6 +17,13 @@
#define LAST_AGE_WEIGHT 30
#define SAME_AGE_REGION 1024

+/*
+ * Define data block with age less than 1GB as hot data
+ * define data block with age less than 10GB but more than 1GB as warm data
+ */
+#define DEF_HOT_DATA_AGE_THRESHOLD 262144
+#define DEF_WARM_DATA_AGE_THRESHOLD 2621440
+
static struct kmem_cache *age_extent_tree_slab;
static struct kmem_cache *age_extent_node_slab;

@@ -29,6 +36,9 @@ static inline void f2fs_inc_data_block_alloc(struct f2fs_sb_info *sbi)
static void f2fs_init_block_age_info(struct f2fs_sb_info *sbi)
{
atomic64_set(&sbi->total_data_alloc, 0);
+
+ sbi->hot_data_age_threshold = DEF_HOT_DATA_AGE_THRESHOLD;
+ sbi->warm_data_age_threshold = DEF_WARM_DATA_AGE_THRESHOLD;
}

static inline bool f2fs_may_age_extent_tree(struct inode *inode)
@@ -697,6 +707,25 @@ unsigned long f2fs_count_age_extent_cache(struct f2fs_sb_info *sbi)
atomic_read(&sbi->total_age_ext_node);
}

+int f2fs_get_data_segment_type(struct inode *inode, pgoff_t pgofs)
+{
+ struct age_extent_info ei;
+ struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
+
+ if (f2fs_lookup_age_extent_cache(inode, pgofs, &ei)) {
+ if (ei.age != 0) {
+ if (ei.age <= sbi->hot_data_age_threshold)
+ return CURSEG_HOT_DATA;
+ else if (ei.age <= sbi->warm_data_age_threshold)
+ return CURSEG_WARM_DATA;
+ else
+ return CURSEG_COLD_DATA;
+ }
+ }
+
+ return NO_CHECK_TYPE;
+}
+
void f2fs_destroy_age_extent_cache(void)
{
kmem_cache_destroy(age_extent_node_slab);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 23516498b6d0..50f6f21b23bf 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1854,6 +1854,9 @@ struct f2fs_sb_info {

#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
atomic64_t total_data_alloc;
+ /* The threshold used for hot and warm data seperation*/
+ unsigned int hot_data_age_threshold;
+ unsigned int warm_data_age_threshold;
#endif

/* Reference to checksum algorithm driver via cryptoapi */
@@ -4241,6 +4244,7 @@ void f2fs_update_age_extent_cache(struct inode *inode, pgoff_t fofs,
void f2fs_update_data_block_age(struct dnode_of_data *dn);
void f2fs_truncate_age_extent_cache(struct inode *inode, pgoff_t fofs,
unsigned int len);
+int f2fs_get_data_segment_type(struct inode *inode, pgoff_t pgofs);
int __init f2fs_create_age_extent_cache(void);
void f2fs_destroy_age_extent_cache(void);
#endif
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index d4c338f332fa..2fa5b22119ac 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -3163,6 +3163,9 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)
if (fio->type == DATA) {
struct inode *inode = fio->page->mapping->host;

+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ int type;
+#endif
if (is_inode_flag_set(inode, FI_ALIGNED_WRITE))
return CURSEG_COLD_DATA_PINNED;

@@ -3176,6 +3179,12 @@ static int __get_segment_type_6(struct f2fs_io_info *fio)
}
if (file_is_cold(inode) || f2fs_need_compress_data(inode))
return CURSEG_COLD_DATA;
+
+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ type = f2fs_get_data_segment_type(inode, fio->page->index);
+ if (type != NO_CHECK_TYPE)
+ return type;
+#endif
if (file_is_hot(inode) ||
is_inode_flag_set(inode, FI_HOT_DATA) ||
f2fs_is_cow_file(inode))
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index df27afd71ef4..68ba8c1c2cb3 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -648,6 +648,25 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
sbi->revoked_atomic_block = 0;
return count;
}
+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ if (!strcmp(a->attr.name, "hot_data_age_threshold")) {
+ if (t == 0 || t >= sbi->warm_data_age_threshold)
+ return -EINVAL;
+ if (t == *ui)
+ return count;
+ *ui = (unsigned int)t;
+ return count;
+ }
+
+ if (!strcmp(a->attr.name, "warm_data_age_threshold")) {
+ if (t == 0 || t <= sbi->hot_data_age_threshold)
+ return -EINVAL;
+ if (t == *ui)
+ return count;
+ *ui = (unsigned int)t;
+ return count;
+ }
+#endif

*ui = (unsigned int)t;

@@ -902,6 +921,11 @@ F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, peak_atomic_write, peak_atomic_write);
F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, committed_atomic_block, committed_atomic_block);
F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, revoked_atomic_block, revoked_atomic_block);

+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, hot_data_age_threshold, hot_data_age_threshold);
+F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, warm_data_age_threshold, warm_data_age_threshold);
+#endif
+
#define ATTR_LIST(name) (&f2fs_attr_##name.attr)
static struct attribute *f2fs_attrs[] = {
ATTR_LIST(gc_urgent_sleep_time),
@@ -995,6 +1019,10 @@ static struct attribute *f2fs_attrs[] = {
ATTR_LIST(peak_atomic_write),
ATTR_LIST(committed_atomic_block),
ATTR_LIST(revoked_atomic_block),
+#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
+ ATTR_LIST(hot_data_age_threshold),
+ ATTR_LIST(warm_data_age_threshold),
+#endif
NULL,
};
ATTRIBUTE_GROUPS(f2fs);
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index b19c057ff801..0adb26397e68 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -1692,7 +1692,7 @@ DECLARE_EVENT_CLASS(f2fs_add_age_extent_node,
__entry->blocks = ei->last_blocks;
),

- TP_printk("dev = (%d,%d), ino = %lu, node_cnt = %lu, "
+ TP_printk("dev = (%d,%d), ino = %lu, node_cnt = %u, "
"age_ext_info(fofs: %u, len: %u, age: %llu, blocks: %llu)",
show_dev_ino(__entry),
__entry->cnt,
--
2.36.1

2022-11-28 12:18:02

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 4/5] f2fs: update block age info during out of place update

Hi qixiaoyu1,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v6.1-rc7]
[also build test WARNING on linus/master next-20221128]
[cannot apply to jaegeuk-f2fs/dev-test jaegeuk-f2fs/dev]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/qixiaoyu1/Support-enhanced-hot-cold-data-separation-for-f2fs/20221128-170808
patch link: https://lore.kernel.org/r/20221128085859.5295-5-qixiaoyu1%40xiaomi.com
patch subject: [PATCH 4/5] f2fs: update block age info during out of place update
config: sparc-allyesconfig
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/0ac666d056ce1e58a5ffea1fe153c413dd8b7148
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review qixiaoyu1/Support-enhanced-hot-cold-data-separation-for-f2fs/20221128-170808
git checkout 0ac666d056ce1e58a5ffea1fe153c413dd8b7148
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash fs/f2fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> fs/f2fs/block_age.c:505:20: warning: no previous prototype for 'f2fs_get_cur_dblock_allocated' [-Wmissing-prototypes]
505 | unsigned long long f2fs_get_cur_dblock_allocated(struct f2fs_sb_info *sbi)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/f2fs_get_cur_dblock_allocated +505 fs/f2fs/block_age.c

504
> 505 unsigned long long f2fs_get_cur_dblock_allocated(struct f2fs_sb_info *sbi)
506 {
507 return atomic64_read(&sbi->total_data_alloc);
508 }
509

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (2.24 kB)
config (328.61 kB)
Download all attachments

2022-11-29 03:14:34

by Jaegeuk Kim

[permalink] [raw]
Subject: Re: [PATCH 1/5] f2fs: record total data blocks allocated since mount

On 11/28, qixiaoyu1 wrote:
> From: xiongping1 <[email protected]>
>
> Signed-off-by: xiongping1 <[email protected]>
> Signed-off-by: qixiaoyu1 <[email protected]>
> ---
> fs/f2fs/Kconfig | 7 +++++++
> fs/f2fs/Makefile | 1 +
> fs/f2fs/block_age.c | 28 ++++++++++++++++++++++++++++
> fs/f2fs/debug.c | 7 +++++++
> fs/f2fs/f2fs.h | 15 +++++++++++++++
> fs/f2fs/segment.c | 4 ++++
> fs/f2fs/super.c | 4 ++++
> 7 files changed, 66 insertions(+)
> create mode 100644 fs/f2fs/block_age.c
>
> diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig
> index 03ef087537c7..84915f9c6bc8 100644
> --- a/fs/f2fs/Kconfig
> +++ b/fs/f2fs/Kconfig
> @@ -150,3 +150,10 @@ config F2FS_UNFAIR_RWSEM
> help
> Use unfair rw_semaphore, if system configured IO priority by block
> cgroup.
> +
> +config F2FS_FS_DATA_SEPARATION
> + bool "F2FS hot/cold data separation feature"
> + depends on F2FS_FS
> + help
> + Enable data blocks separation according to block update frequency.
> +
> diff --git a/fs/f2fs/Makefile b/fs/f2fs/Makefile
> index 8a7322d229e4..70d8f0e23b46 100644
> --- a/fs/f2fs/Makefile
> +++ b/fs/f2fs/Makefile
> @@ -10,3 +10,4 @@ f2fs-$(CONFIG_F2FS_FS_POSIX_ACL) += acl.o
> f2fs-$(CONFIG_FS_VERITY) += verity.o
> f2fs-$(CONFIG_F2FS_FS_COMPRESSION) += compress.o
> f2fs-$(CONFIG_F2FS_IOSTAT) += iostat.o
> +f2fs-$(CONFIG_F2FS_FS_DATA_SEPARATION) += block_age.o
> diff --git a/fs/f2fs/block_age.c b/fs/f2fs/block_age.c
> new file mode 100644
> index 000000000000..1e8711a03959
> --- /dev/null
> +++ b/fs/f2fs/block_age.c
> @@ -0,0 +1,28 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * fs/f2fs/block_age.c
> + *
> + * Copyright (c) 2022 xiaomi Co., Ltd.
> + * http://www.xiaomi.com/

I don't think this is a right way, since it seems you copied lots of codes
from extent_cache.c which has another copyrights.

I'm thinking to integrate your extent_cache code into the original path in
order to keep the single code path for easy debugging. Stay tuned.

> + */
> +#include <linux/fs.h>
> +#include <linux/f2fs_fs.h>
> +
> +#include "f2fs.h"
> +#include "segment.h"
> +
> +static inline void f2fs_inc_data_block_alloc(struct f2fs_sb_info *sbi)
> +{
> + atomic64_inc(&sbi->total_data_alloc);
> +}
> +
> +void f2fs_init_block_age_info(struct f2fs_sb_info *sbi)
> +{
> + atomic64_set(&sbi->total_data_alloc, 0);
> +}
> +
> +void f2fs_inc_block_alloc_count(struct f2fs_sb_info *sbi, int type)
> +{
> + if (IS_DATASEG(type))
> + f2fs_inc_data_block_alloc(sbi);
> +}
> diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
> index a216dcdf6941..d24abdac20bb 100644
> --- a/fs/f2fs/debug.c
> +++ b/fs/f2fs/debug.c
> @@ -81,6 +81,9 @@ static void update_general_status(struct f2fs_sb_info *sbi)
> si->ext_tree = atomic_read(&sbi->total_ext_tree);
> si->zombie_tree = atomic_read(&sbi->total_zombie_tree);
> si->ext_node = atomic_read(&sbi->total_ext_node);
> +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> + si->total_data_blocks_alloc = atomic64_read(&sbi->total_data_alloc);
> +#endif
> si->ndirty_node = get_pages(sbi, F2FS_DIRTY_NODES);
> si->ndirty_dent = get_pages(sbi, F2FS_DIRTY_DENTS);
> si->ndirty_meta = get_pages(sbi, F2FS_DIRTY_META);
> @@ -373,6 +376,10 @@ static int stat_show(struct seq_file *s, void *v)
> seq_printf(s, "Utilization: %u%% (%u valid blocks)\n",
> si->utilization, si->valid_count);
>
> +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> + seq_printf(s, " - Data Block Allocated: %llu\n",
> + si->total_data_blocks_alloc);
> +#endif
> seq_printf(s, " - Node: %u (Inode: %u, ",
> si->valid_node_count, si->valid_inode_count);
> seq_printf(s, "Other: %u)\n - Data: %u\n",
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index e6355a5683b7..686f09846de4 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -1807,6 +1807,10 @@ struct f2fs_sb_info {
> u64 sectors_written_start;
> u64 kbytes_written;
>
> +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> + atomic64_t total_data_alloc;
> +#endif
> +
> /* Reference to checksum algorithm driver via cryptoapi */
> struct crypto_shash *s_chksum_driver;
>
> @@ -3858,6 +3862,9 @@ struct f2fs_stat_info {
> int main_area_segs, main_area_sections, main_area_zones;
> unsigned long long hit_largest, hit_cached, hit_rbtree;
> unsigned long long hit_total, total_ext;
> +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> + unsigned long long total_data_blocks_alloc;
> +#endif
> int ext_tree, zombie_tree, ext_node;
> int ndirty_node, ndirty_dent, ndirty_meta, ndirty_imeta;
> int ndirty_data, ndirty_qdata;
> @@ -4166,6 +4173,14 @@ void f2fs_init_extent_cache_info(struct f2fs_sb_info *sbi);
> int __init f2fs_create_extent_cache(void);
> void f2fs_destroy_extent_cache(void);
>
> +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> +/*
> + * block_age.c
> + */
> +void f2fs_init_block_age_info(struct f2fs_sb_info *sbi);
> +void f2fs_inc_block_alloc_count(struct f2fs_sb_info *sbi, int type);
> +#endif
> +
> /*
> * sysfs.c
> */
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index acf3d3fa4363..0cf022fd3560 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -3280,6 +3280,10 @@ void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
> locate_dirty_segment(sbi, GET_SEGNO(sbi, old_blkaddr));
> locate_dirty_segment(sbi, GET_SEGNO(sbi, *new_blkaddr));
>
> +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> + f2fs_inc_block_alloc_count(sbi, type);
> +#endif
> +
> up_write(&sit_i->sentry_lock);
>
> if (page && IS_NODESEG(type)) {
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 3834ead04620..bf799d92282a 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -4475,6 +4475,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
>
> f2fs_join_shrinker(sbi);
>
> +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> + f2fs_init_block_age_info(sbi);
> +#endif
> +
> f2fs_tuning_parameters(sbi);
>
> f2fs_notice(sbi, "Mounted with checkpoint version = %llx",
> --
> 2.36.1

2022-11-29 08:28:43

by 李扬韬

[permalink] [raw]
Subject: Re: [PATCH] f2fs: Support enhanced hot/cold data separation for f2fs

Hi qixiaoyu1,

Thanks for your patchset.

Does this patchset have data related to memory and performance impact?
Can you provide scripts or commands for related tests?

Thx,
Yangtao

2022-12-05 20:48:12

by Jaegeuk Kim

[permalink] [raw]
Subject: Re: [f2fs-dev] [PATCH 1/5] f2fs: record total data blocks allocated since mount

On 11/28, Jaegeuk Kim wrote:
> On 11/28, qixiaoyu1 wrote:
> > From: xiongping1 <[email protected]>
> >
> > Signed-off-by: xiongping1 <[email protected]>
> > Signed-off-by: qixiaoyu1 <[email protected]>
> > ---
> > fs/f2fs/Kconfig | 7 +++++++
> > fs/f2fs/Makefile | 1 +
> > fs/f2fs/block_age.c | 28 ++++++++++++++++++++++++++++
> > fs/f2fs/debug.c | 7 +++++++
> > fs/f2fs/f2fs.h | 15 +++++++++++++++
> > fs/f2fs/segment.c | 4 ++++
> > fs/f2fs/super.c | 4 ++++
> > 7 files changed, 66 insertions(+)
> > create mode 100644 fs/f2fs/block_age.c
> >
> > diff --git a/fs/f2fs/Kconfig b/fs/f2fs/Kconfig
> > index 03ef087537c7..84915f9c6bc8 100644
> > --- a/fs/f2fs/Kconfig
> > +++ b/fs/f2fs/Kconfig
> > @@ -150,3 +150,10 @@ config F2FS_UNFAIR_RWSEM
> > help
> > Use unfair rw_semaphore, if system configured IO priority by block
> > cgroup.
> > +
> > +config F2FS_FS_DATA_SEPARATION
> > + bool "F2FS hot/cold data separation feature"
> > + depends on F2FS_FS
> > + help
> > + Enable data blocks separation according to block update frequency.
> > +
> > diff --git a/fs/f2fs/Makefile b/fs/f2fs/Makefile
> > index 8a7322d229e4..70d8f0e23b46 100644
> > --- a/fs/f2fs/Makefile
> > +++ b/fs/f2fs/Makefile
> > @@ -10,3 +10,4 @@ f2fs-$(CONFIG_F2FS_FS_POSIX_ACL) += acl.o
> > f2fs-$(CONFIG_FS_VERITY) += verity.o
> > f2fs-$(CONFIG_F2FS_FS_COMPRESSION) += compress.o
> > f2fs-$(CONFIG_F2FS_IOSTAT) += iostat.o
> > +f2fs-$(CONFIG_F2FS_FS_DATA_SEPARATION) += block_age.o
> > diff --git a/fs/f2fs/block_age.c b/fs/f2fs/block_age.c
> > new file mode 100644
> > index 000000000000..1e8711a03959
> > --- /dev/null
> > +++ b/fs/f2fs/block_age.c
> > @@ -0,0 +1,28 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * fs/f2fs/block_age.c
> > + *
> > + * Copyright (c) 2022 xiaomi Co., Ltd.
> > + * http://www.xiaomi.com/
>
> I don't think this is a right way, since it seems you copied lots of codes
> from extent_cache.c which has another copyrights.
>
> I'm thinking to integrate your extent_cache code into the original path in
> order to keep the single code path for easy debugging. Stay tuned.

Hi,

Could you please check this patch series?

https://lore.kernel.org/linux-f2fs-devel/[email protected]/T/#t


Thanks,

>
> > + */
> > +#include <linux/fs.h>
> > +#include <linux/f2fs_fs.h>
> > +
> > +#include "f2fs.h"
> > +#include "segment.h"
> > +
> > +static inline void f2fs_inc_data_block_alloc(struct f2fs_sb_info *sbi)
> > +{
> > + atomic64_inc(&sbi->total_data_alloc);
> > +}
> > +
> > +void f2fs_init_block_age_info(struct f2fs_sb_info *sbi)
> > +{
> > + atomic64_set(&sbi->total_data_alloc, 0);
> > +}
> > +
> > +void f2fs_inc_block_alloc_count(struct f2fs_sb_info *sbi, int type)
> > +{
> > + if (IS_DATASEG(type))
> > + f2fs_inc_data_block_alloc(sbi);
> > +}
> > diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
> > index a216dcdf6941..d24abdac20bb 100644
> > --- a/fs/f2fs/debug.c
> > +++ b/fs/f2fs/debug.c
> > @@ -81,6 +81,9 @@ static void update_general_status(struct f2fs_sb_info *sbi)
> > si->ext_tree = atomic_read(&sbi->total_ext_tree);
> > si->zombie_tree = atomic_read(&sbi->total_zombie_tree);
> > si->ext_node = atomic_read(&sbi->total_ext_node);
> > +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> > + si->total_data_blocks_alloc = atomic64_read(&sbi->total_data_alloc);
> > +#endif
> > si->ndirty_node = get_pages(sbi, F2FS_DIRTY_NODES);
> > si->ndirty_dent = get_pages(sbi, F2FS_DIRTY_DENTS);
> > si->ndirty_meta = get_pages(sbi, F2FS_DIRTY_META);
> > @@ -373,6 +376,10 @@ static int stat_show(struct seq_file *s, void *v)
> > seq_printf(s, "Utilization: %u%% (%u valid blocks)\n",
> > si->utilization, si->valid_count);
> >
> > +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> > + seq_printf(s, " - Data Block Allocated: %llu\n",
> > + si->total_data_blocks_alloc);
> > +#endif
> > seq_printf(s, " - Node: %u (Inode: %u, ",
> > si->valid_node_count, si->valid_inode_count);
> > seq_printf(s, "Other: %u)\n - Data: %u\n",
> > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> > index e6355a5683b7..686f09846de4 100644
> > --- a/fs/f2fs/f2fs.h
> > +++ b/fs/f2fs/f2fs.h
> > @@ -1807,6 +1807,10 @@ struct f2fs_sb_info {
> > u64 sectors_written_start;
> > u64 kbytes_written;
> >
> > +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> > + atomic64_t total_data_alloc;
> > +#endif
> > +
> > /* Reference to checksum algorithm driver via cryptoapi */
> > struct crypto_shash *s_chksum_driver;
> >
> > @@ -3858,6 +3862,9 @@ struct f2fs_stat_info {
> > int main_area_segs, main_area_sections, main_area_zones;
> > unsigned long long hit_largest, hit_cached, hit_rbtree;
> > unsigned long long hit_total, total_ext;
> > +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> > + unsigned long long total_data_blocks_alloc;
> > +#endif
> > int ext_tree, zombie_tree, ext_node;
> > int ndirty_node, ndirty_dent, ndirty_meta, ndirty_imeta;
> > int ndirty_data, ndirty_qdata;
> > @@ -4166,6 +4173,14 @@ void f2fs_init_extent_cache_info(struct f2fs_sb_info *sbi);
> > int __init f2fs_create_extent_cache(void);
> > void f2fs_destroy_extent_cache(void);
> >
> > +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> > +/*
> > + * block_age.c
> > + */
> > +void f2fs_init_block_age_info(struct f2fs_sb_info *sbi);
> > +void f2fs_inc_block_alloc_count(struct f2fs_sb_info *sbi, int type);
> > +#endif
> > +
> > /*
> > * sysfs.c
> > */
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index acf3d3fa4363..0cf022fd3560 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -3280,6 +3280,10 @@ void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
> > locate_dirty_segment(sbi, GET_SEGNO(sbi, old_blkaddr));
> > locate_dirty_segment(sbi, GET_SEGNO(sbi, *new_blkaddr));
> >
> > +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> > + f2fs_inc_block_alloc_count(sbi, type);
> > +#endif
> > +
> > up_write(&sit_i->sentry_lock);
> >
> > if (page && IS_NODESEG(type)) {
> > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > index 3834ead04620..bf799d92282a 100644
> > --- a/fs/f2fs/super.c
> > +++ b/fs/f2fs/super.c
> > @@ -4475,6 +4475,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
> >
> > f2fs_join_shrinker(sbi);
> >
> > +#ifdef CONFIG_F2FS_FS_DATA_SEPARATION
> > + f2fs_init_block_age_info(sbi);
> > +#endif
> > +
> > f2fs_tuning_parameters(sbi);
> >
> > f2fs_notice(sbi, "Mounted with checkpoint version = %llx",
> > --
> > 2.36.1
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

2022-12-12 03:26:29

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 4/5] f2fs: update block age info during out of place update

Hi qixiaoyu1,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v6.1-rc7]
[also build test ERROR on linus/master]
[cannot apply to jaegeuk-f2fs/dev-test jaegeuk-f2fs/dev next-20221208]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/qixiaoyu1/Support-enhanced-hot-cold-data-separation-for-f2fs/20221128-170808
patch link: https://lore.kernel.org/r/20221128085859.5295-5-qixiaoyu1%40xiaomi.com
patch subject: [PATCH 4/5] f2fs: update block age info during out of place update
config: xtensa-allyesconfig
compiler: xtensa-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/0ac666d056ce1e58a5ffea1fe153c413dd8b7148
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review qixiaoyu1/Support-enhanced-hot-cold-data-separation-for-f2fs/20221128-170808
git checkout 0ac666d056ce1e58a5ffea1fe153c413dd8b7148
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=xtensa SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

`.exit.text' referenced in section `__jump_table' of fs/cifs/cifsfs.o: defined in discarded section `.exit.text' of fs/cifs/cifsfs.o
`.exit.text' referenced in section `__jump_table' of fs/cifs/cifsfs.o: defined in discarded section `.exit.text' of fs/cifs/cifsfs.o
`.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o: defined in discarded section `.exit.text' of fs/fuse/inode.o
`.exit.text' referenced in section `__jump_table' of fs/fuse/inode.o: defined in discarded section `.exit.text' of fs/fuse/inode.o
xtensa-linux-ld: fs/f2fs/block_age.o: in function `f2fs_get_cur_dblock_allocated':
>> block_age.c:(.text+0x2bc4): undefined reference to `__udivdi3'
xtensa-linux-ld: fs/f2fs/block_age.o: in function `f2fs_update_data_block_age':
block_age.c:(.text+0x30ce): undefined reference to `__udivdi3'
xtensa-linux-ld: fs/f2fs/block_age.o: in function `f2fs_get_cur_dblock_allocated':
block_age.c:(.text+0x2bd0): undefined reference to `__udivdi3'
xtensa-linux-ld: fs/f2fs/block_age.o: in function `f2fs_update_data_block_age':
block_age.c:(.text+0x3113): undefined reference to `__udivdi3'
`.exit.text' referenced in section `__jump_table' of fs/ceph/super.o: defined in discarded section `.exit.text' of fs/ceph/super.o
`.exit.text' referenced in section `__jump_table' of fs/ceph/super.o: defined in discarded section `.exit.text' of fs/ceph/super.o
`.exit.text' referenced in section `__jump_table' of lib/test_dynamic_debug.o: defined in discarded section `.exit.text' of lib/test_dynamic_debug.o
`.exit.text' referenced in section `__jump_table' of lib/test_dynamic_debug.o: defined in discarded section `.exit.text' of lib/test_dynamic_debug.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/rio_cm.o: defined in discarded section `.exit.text' of drivers/rapidio/rio_cm.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/rio_cm.o: defined in discarded section `.exit.text' of drivers/rapidio/rio_cm.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen2.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen2.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen2.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen2.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen2.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen3.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen3.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen3.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen3.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen3.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen3.o
`.exit.text' referenced in section `__jump_table' of drivers/rapidio/switches/idt_gen3.o: defined in discarded section `.exit.text' of drivers/rapidio/switches/idt_gen3.o
`.exit.text' referenced in section `__jump_table' of drivers/video/fbdev/vt8623fb.o: defined in discarded section `.exit.text' of drivers/video/fbdev/vt8623fb.o
`.exit.text' referenced in section `__jump_table' of drivers/video/fbdev/vt8623fb.o: defined in discarded section `.exit.text' of drivers/video/fbdev/vt8623fb.o
`.exit.text' referenced in section `__jump_table' of drivers/video/fbdev/s3fb.o: defined in discarded section `.exit.text' of drivers/video/fbdev/s3fb.o
`.exit.text' referenced in section `__jump_table' of drivers/video/fbdev/s3fb.o: defined in discarded section `.exit.text' of drivers/video/fbdev/s3fb.o
`.exit.text' referenced in section `__jump_table' of drivers/video/fbdev/arkfb.o: defined in discarded section `.exit.text' of drivers/video/fbdev/arkfb.o
`.exit.text' referenced in section `__jump_table' of drivers/video/fbdev/arkfb.o: defined in discarded section `.exit.text' of drivers/video/fbdev/arkfb.o
`.exit.text' referenced in section `__jump_table' of drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.o: defined in discarded section `.exit.text' of drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.o
`.exit.text' referenced in section `__jump_table' of drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.o: defined in discarded section `.exit.text' of drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.o
`.exit.text' referenced in section `__jump_table' of drivers/gpu/drm/msm/msm_drv.o: defined in discarded section `.exit.text' of drivers/gpu/drm/msm/msm_drv.o
`.exit.text' referenced in section `__jump_table' of drivers/gpu/drm/msm/msm_drv.o: defined in discarded section `.exit.text' of drivers/gpu/drm/msm/msm_drv.o
`.exit.text' referenced in section `__jump_table' of drivers/gpu/drm/msm/dsi/dsi.o: defined in discarded section `.exit.text' of drivers/gpu/drm/msm/dsi/dsi.o
`.exit.text' referenced in section `__jump_table' of drivers/gpu/drm/msm/dsi/dsi.o: defined in discarded section `.exit.text' of drivers/gpu/drm/msm/dsi/dsi.o
`.exit.text' referenced in section `__jump_table' of drivers/misc/phantom.o: defined in discarded section `.exit.text' of drivers/misc/phantom.o
`.exit.text' referenced in section `__jump_table' of drivers/misc/phantom.o: defined in discarded section `.exit.text' of drivers/misc/phantom.o
`.exit.text' referenced in section `__jump_table' of drivers/misc/habanalabs/common/habanalabs_drv.o: defined in discarded section `.exit.text' of drivers/misc/habanalabs/common/habanalabs_drv.o
`.exit.text' referenced in section `__jump_table' of drivers/misc/habanalabs/common/habanalabs_drv.o: defined in discarded section `.exit.text' of drivers/misc/habanalabs/common/habanalabs_drv.o
`.exit.text' referenced in section `__jump_table' of drivers/scsi/fcoe/fcoe.o: defined in discarded section `.exit.text' of drivers/scsi/fcoe/fcoe.o
`.exit.text' referenced in section `__jump_table' of drivers/scsi/fcoe/fcoe.o: defined in discarded section `.exit.text' of drivers/scsi/fcoe/fcoe.o
`.exit.text' referenced in section `__jump_table' of drivers/scsi/cxgbi/libcxgbi.o: defined in discarded section `.exit.text' of drivers/scsi/cxgbi/libcxgbi.o
`.exit.text' referenced in section `__jump_table' of drivers/scsi/cxgbi/libcxgbi.o: defined in discarded section `.exit.text' of drivers/scsi/cxgbi/libcxgbi.o
`.exit.text' referenced in section `__jump_table' of drivers/target/target_core_configfs.o: defined in discarded section `.exit.text' of drivers/target/target_core_configfs.o
`.exit.text' referenced in section `__jump_table' of drivers/target/target_core_configfs.o: defined in discarded section `.exit.text' of drivers/target/target_core_configfs.o
`.exit.text' referenced in section `__jump_table' of drivers/mtd/maps/pcmciamtd.o: defined in discarded section `.exit.text' of drivers/mtd/maps/pcmciamtd.o
`.exit.text' referenced in section `__jump_table' of drivers/mtd/maps/pcmciamtd.o: defined in discarded section `.exit.text' of drivers/mtd/maps/pcmciamtd.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/purelifi/plfxlc/usb.o: defined in discarded section `.exit.text' of drivers/net/wireless/purelifi/plfxlc/usb.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/purelifi/plfxlc/usb.o: defined in discarded section `.exit.text' of drivers/net/wireless/purelifi/plfxlc/usb.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/zydas/zd1211rw/zd_usb.o: defined in discarded section `.exit.text' of drivers/net/wireless/zydas/zd1211rw/zd_usb.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/zydas/zd1211rw/zd_usb.o: defined in discarded section `.exit.text' of drivers/net/wireless/zydas/zd1211rw/zd_usb.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/ray_cs.o: defined in discarded section `.exit.text' of drivers/net/wireless/ray_cs.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/ray_cs.o: defined in discarded section `.exit.text' of drivers/net/wireless/ray_cs.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/mac80211_hwsim.o: defined in discarded section `.exit.text' of drivers/net/wireless/mac80211_hwsim.o
`.exit.text' referenced in section `__jump_table' of drivers/net/wireless/mac80211_hwsim.o: defined in discarded section `.exit.text' of drivers/net/wireless/mac80211_hwsim.o
`.exit.text' referenced in section `__jump_table' of drivers/usb/gadget/legacy/inode.o: defined in discarded section `.exit.text' of drivers/usb/gadget/legacy/inode.o
`.exit.text' referenced in section `__jump_table' of drivers/usb/gadget/legacy/inode.o: defined in discarded section `.exit.text' of drivers/usb/gadget/legacy/inode.o
`.exit.text' referenced in section `__jump_table' of drivers/usb/gadget/legacy/g_ffs.o: defined in discarded section `.exit.text' of drivers/usb/gadget/legacy/g_ffs.o
`.exit.text' referenced in section `__jump_table' of drivers/usb/gadget/legacy/g_ffs.o: defined in discarded section `.exit.text' of drivers/usb/gadget/legacy/g_ffs.o
`.exit.text' referenced in section `__jump_table' of drivers/media/common/siano/smscoreapi.o: defined in discarded section `.exit.text' of drivers/media/common/siano/smscoreapi.o
`.exit.text' referenced in section `__jump_table' of drivers/media/common/siano/smscoreapi.o: defined in discarded section `.exit.text' of drivers/media/common/siano/smscoreapi.o
`.exit.text' referenced in section `__jump_table' of drivers/staging/vme_user/vme_fake.o: defined in discarded section `.exit.text' of drivers/staging/vme_user/vme_fake.o
`.exit.text' referenced in section `__jump_table' of drivers/staging/vme_user/vme_fake.o: defined in discarded section `.exit.text' of drivers/staging/vme_user/vme_fake.o
`.exit.text' referenced in section `__jump_table' of net/netfilter/nf_conntrack_h323_main.o: defined in discarded section `.exit.text' of net/netfilter/nf_conntrack_h323_main.o
`.exit.text' referenced in section `__jump_table' of net/netfilter/nf_conntrack_h323_main.o: defined in discarded section `.exit.text' of net/netfilter/nf_conntrack_h323_main.o
`.exit.text' referenced in section `__jump_table' of net/netfilter/ipset/ip_set_core.o: defined in discarded section `.exit.text' of net/netfilter/ipset/ip_set_core.o
`.exit.text' referenced in section `__jump_table' of net/netfilter/ipset/ip_set_core.o: defined in discarded section `.exit.text' of net/netfilter/ipset/ip_set_core.o
`.exit.text' referenced in section `__jump_table' of net/rds/rdma_transport.o: defined in discarded section `.exit.text' of net/rds/rdma_transport.o
`.exit.text' referenced in section `__jump_table' of net/rds/rdma_transport.o: defined in discarded section `.exit.text' of net/rds/rdma_transport.o
`.exit.text' referenced in section `__jump_table' of net/rds/rdma_transport.o: defined in discarded section `.exit.text' of net/rds/rdma_transport.o
`.exit.text' referenced in section `__jump_table' of net/rds/rdma_transport.o: defined in discarded section `.exit.text' of net/rds/rdma_transport.o
`.exit.text' referenced in section `__jump_table' of net/ceph/ceph_common.o: defined in discarded section `.exit.text' of net/ceph/ceph_common.o
`.exit.text' referenced in section `__jump_table' of net/ceph/ceph_common.o: defined in discarded section `.exit.text' of net/ceph/ceph_common.o

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (13.33 kB)
config (323.68 kB)
Download all attachments