~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/f2fs/iostat.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /fs/f2fs/iostat.h (Version linux-6.12-rc7) and /fs/f2fs/iostat.h (Version linux-5.18.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * Copyright 2021 Google LLC                        3  * Copyright 2021 Google LLC
  4  * Author: Daeho Jeong <daehojeong@google.com>      4  * Author: Daeho Jeong <daehojeong@google.com>
  5  */                                                 5  */
  6 #ifndef __F2FS_IOSTAT_H__                           6 #ifndef __F2FS_IOSTAT_H__
  7 #define __F2FS_IOSTAT_H__                           7 #define __F2FS_IOSTAT_H__
  8                                                     8 
  9 struct bio_post_read_ctx;                           9 struct bio_post_read_ctx;
 10                                                    10 
 11 enum iostat_lat_type {                         << 
 12         READ_IO = 0,                           << 
 13         WRITE_SYNC_IO,                         << 
 14         WRITE_ASYNC_IO,                        << 
 15         MAX_IO_TYPE,                           << 
 16 };                                             << 
 17                                                << 
 18 #ifdef CONFIG_F2FS_IOSTAT                          11 #ifdef CONFIG_F2FS_IOSTAT
 19                                                    12 
 20 #define NUM_PREALLOC_IOSTAT_CTXS        128    << 
 21 #define DEFAULT_IOSTAT_PERIOD_MS        3000       13 #define DEFAULT_IOSTAT_PERIOD_MS        3000
 22 #define MIN_IOSTAT_PERIOD_MS            100        14 #define MIN_IOSTAT_PERIOD_MS            100
 23 /* maximum period of iostat tracing is 1 day *     15 /* maximum period of iostat tracing is 1 day */
 24 #define MAX_IOSTAT_PERIOD_MS            864000     16 #define MAX_IOSTAT_PERIOD_MS            8640000
 25                                                    17 
                                                   >>  18 enum {
                                                   >>  19         READ_IO,
                                                   >>  20         WRITE_SYNC_IO,
                                                   >>  21         WRITE_ASYNC_IO,
                                                   >>  22         MAX_IO_TYPE,
                                                   >>  23 };
                                                   >>  24 
 26 struct iostat_lat_info {                           25 struct iostat_lat_info {
 27         unsigned long sum_lat[MAX_IO_TYPE][NR_     26         unsigned long sum_lat[MAX_IO_TYPE][NR_PAGE_TYPE];       /* sum of io latencies */
 28         unsigned long peak_lat[MAX_IO_TYPE][NR     27         unsigned long peak_lat[MAX_IO_TYPE][NR_PAGE_TYPE];      /* peak io latency */
 29         unsigned int bio_cnt[MAX_IO_TYPE][NR_P     28         unsigned int bio_cnt[MAX_IO_TYPE][NR_PAGE_TYPE];        /* bio count */
 30 };                                                 29 };
 31                                                    30 
 32 extern int __maybe_unused iostat_info_seq_show     31 extern int __maybe_unused iostat_info_seq_show(struct seq_file *seq,
 33                         void *offset);             32                         void *offset);
 34 extern void f2fs_reset_iostat(struct f2fs_sb_i     33 extern void f2fs_reset_iostat(struct f2fs_sb_info *sbi);
 35 extern void f2fs_update_iostat(struct f2fs_sb_ !!  34 extern void f2fs_update_iostat(struct f2fs_sb_info *sbi,
 36                         enum iostat_type type,     35                         enum iostat_type type, unsigned long long io_bytes);
 37                                                    36 
 38 struct bio_iostat_ctx {                            37 struct bio_iostat_ctx {
 39         struct f2fs_sb_info *sbi;                  38         struct f2fs_sb_info *sbi;
 40         unsigned long submit_ts;                   39         unsigned long submit_ts;
 41         enum page_type type;                       40         enum page_type type;
 42         struct bio_post_read_ctx *post_read_ct     41         struct bio_post_read_ctx *post_read_ctx;
 43 };                                                 42 };
 44                                                    43 
 45 static inline void iostat_update_submit_ctx(st     44 static inline void iostat_update_submit_ctx(struct bio *bio,
 46                         enum page_type type)       45                         enum page_type type)
 47 {                                                  46 {
 48         struct bio_iostat_ctx *iostat_ctx = bi     47         struct bio_iostat_ctx *iostat_ctx = bio->bi_private;
 49                                                    48 
 50         iostat_ctx->submit_ts = jiffies;           49         iostat_ctx->submit_ts = jiffies;
 51         iostat_ctx->type = type;                   50         iostat_ctx->type = type;
 52 }                                                  51 }
 53                                                    52 
 54 static inline struct bio_post_read_ctx *get_po     53 static inline struct bio_post_read_ctx *get_post_read_ctx(struct bio *bio)
 55 {                                                  54 {
 56         struct bio_iostat_ctx *iostat_ctx = bi     55         struct bio_iostat_ctx *iostat_ctx = bio->bi_private;
 57                                                    56 
 58         return iostat_ctx->post_read_ctx;          57         return iostat_ctx->post_read_ctx;
 59 }                                                  58 }
 60                                                    59 
 61 extern void iostat_update_and_unbind_ctx(struc !!  60 extern void iostat_update_and_unbind_ctx(struct bio *bio, int rw);
 62 extern void iostat_alloc_and_bind_ctx(struct f     61 extern void iostat_alloc_and_bind_ctx(struct f2fs_sb_info *sbi,
 63                 struct bio *bio, struct bio_po     62                 struct bio *bio, struct bio_post_read_ctx *ctx);
 64 extern int f2fs_init_iostat_processing(void);      63 extern int f2fs_init_iostat_processing(void);
 65 extern void f2fs_destroy_iostat_processing(voi     64 extern void f2fs_destroy_iostat_processing(void);
 66 extern int f2fs_init_iostat(struct f2fs_sb_inf     65 extern int f2fs_init_iostat(struct f2fs_sb_info *sbi);
 67 extern void f2fs_destroy_iostat(struct f2fs_sb     66 extern void f2fs_destroy_iostat(struct f2fs_sb_info *sbi);
 68 #else                                              67 #else
 69 static inline void f2fs_update_iostat(struct f !!  68 static inline void f2fs_update_iostat(struct f2fs_sb_info *sbi,
 70                 enum iostat_type type, unsigne     69                 enum iostat_type type, unsigned long long io_bytes) {}
 71 static inline void iostat_update_and_unbind_ct !!  70 static inline void iostat_update_and_unbind_ctx(struct bio *bio, int rw) {}
 72 static inline void iostat_alloc_and_bind_ctx(s     71 static inline void iostat_alloc_and_bind_ctx(struct f2fs_sb_info *sbi,
 73                 struct bio *bio, struct bio_po     72                 struct bio *bio, struct bio_post_read_ctx *ctx) {}
 74 static inline void iostat_update_submit_ctx(st     73 static inline void iostat_update_submit_ctx(struct bio *bio,
 75                 enum page_type type) {}            74                 enum page_type type) {}
 76 static inline struct bio_post_read_ctx *get_po     75 static inline struct bio_post_read_ctx *get_post_read_ctx(struct bio *bio)
 77 {                                                  76 {
 78         return bio->bi_private;                    77         return bio->bi_private;
 79 }                                                  78 }
 80 static inline int f2fs_init_iostat_processing(     79 static inline int f2fs_init_iostat_processing(void) { return 0; }
 81 static inline void f2fs_destroy_iostat_process     80 static inline void f2fs_destroy_iostat_processing(void) {}
 82 static inline int f2fs_init_iostat(struct f2fs     81 static inline int f2fs_init_iostat(struct f2fs_sb_info *sbi) { return 0; }
 83 static inline void f2fs_destroy_iostat(struct      82 static inline void f2fs_destroy_iostat(struct f2fs_sb_info *sbi) {}
 84 #endif                                             83 #endif
 85 #endif /* __F2FS_IOSTAT_H__ */                     84 #endif /* __F2FS_IOSTAT_H__ */
 86                                                    85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php