Chao Yu
e10680dfc7
f2fs: combine nat_bits and free_nid_bitmap cache
Both nat_bits cache and free_nid_bitmap cache provide same functionality
as a intermediate cache between free nid cache and disk, but with
different granularity of indicating free nid range, and different
persistence policy. nat_bits cache provides better persistence ability,
and free_nid_bitmap provides better granularity.
In this patch we combine advantage of both caches, so finally policy of
the intermediate cache would be:
- init: load free nid status from nat_bits into free_nid_bitmap
- lookup: scan free_nid_bitmap before load NAT blocks
- update: update free_nid_bitmap in real-time
- persistence: udpate and persist nat_bits in checkpoint
This patch also resolves performance regression reported by lkp-robot.
commit:
4ac912427c ("f2fs: introduce free nid bitmap")
d00030cf9cd0bb96fdccc41e33d3c91dcbb672ba ("f2fs: use __set{__clear}_bit_le")
1382c0f3f9d3f936c8bc42ed1591cf7a593ef9f7 ("f2fs: combine nat_bits and free_nid_bitmap cache")
4ac912427c d00030cf9cd0bb96fdccc41e33 1382c0f3f9d3f936c8bc42ed15
---------------- -------------------------- --------------------------
%stddev %change %stddev %change %stddev
\ | \ | \
77863 ± 0% +2.1% 79485 ± 1% +50.8% 117404 ± 0% aim7.jobs-per-min
231.63 ± 0% -2.0% 227.01 ± 1% -33.6% 153.80 ± 0% aim7.time.elapsed_time
231.63 ± 0% -2.0% 227.01 ± 1% -33.6% 153.80 ± 0% aim7.time.elapsed_time.max
896604 ± 0% -0.8% 889221 ± 3% -20.2% 715260 ± 1% aim7.time.involuntary_context_switches
2394 ± 1% +4.6% 2503 ± 1% +3.7% 2481 ± 2% aim7.time.maximum_resident_set_size
6240 ± 0% -1.5% 6145 ± 1% -14.1% 5360 ± 1% aim7.time.system_time
1111357 ± 3% +1.9% 1132509 ± 2% -6.2% 1041932 ± 2% aim7.time.voluntary_context_switches
...
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Tested-by: Xiaolong Ye <xiaolong.ye@intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-05-08 16:14:02 -07:00
..
2016-08-10 11:49:27 +02:00
2015-06-30 19:44:57 -07:00
2016-06-07 18:14:32 -07:00
2016-09-30 10:18:37 +02:00
2015-07-04 19:36:06 -07:00
2016-09-30 10:18:38 +02:00
2015-11-16 20:38:43 -05:00
2016-10-07 15:23:42 +02:00
2016-08-20 18:09:20 +02:00
2015-09-10 13:29:01 -07:00
2015-11-20 16:17:32 -08:00
2017-03-08 22:16:40 -08:00
2016-05-04 14:48:41 -07:00
2016-08-16 09:30:49 +02:00
2015-12-01 15:45:05 -05:00
2016-09-15 08:27:47 +02:00
2016-03-03 15:07:09 -08:00
2015-06-25 17:00:42 -07:00
2015-12-12 10:15:34 -08:00
2015-11-16 09:43:54 -08:00
2016-09-24 10:07:35 +02:00
2017-05-08 16:14:02 -07:00
2015-11-20 16:17:32 -08:00
2015-08-07 13:59:24 +02:00
2015-11-11 02:11:02 -05:00
2016-09-24 10:07:41 +02:00
2015-11-13 18:02:30 -08:00
2015-09-10 13:29:01 -07:00
2015-11-13 20:34:32 -05:00
2016-09-30 10:18:39 +02:00
2016-06-01 12:15:54 -07:00
2016-02-25 12:01:22 -08:00
2016-05-18 17:06:54 -07:00
2016-08-20 18:09:20 +02:00
2016-03-16 08:42:58 -07:00
2015-11-09 15:11:24 -08:00
2016-09-24 10:07:36 +02:00
2015-11-11 20:11:28 -08:00
2015-11-06 17:50:42 -08:00
2015-07-04 19:36:06 -07:00
2016-03-16 08:42:59 -07:00
2016-10-07 15:23:45 +02:00
2015-08-13 10:22:06 -04:00
2016-09-24 10:07:36 +02:00
2016-08-10 11:49:25 +02:00
2016-09-30 10:18:37 +02:00
2015-11-06 17:50:42 -08:00
2016-09-30 10:18:34 +02:00
2016-09-15 08:27:52 +02:00
2016-09-24 10:07:36 +02:00
2016-10-07 15:23:44 +02:00
2015-06-23 18:02:00 -04:00
2016-04-12 09:08:56 -07:00
2015-10-16 11:42:28 -07:00
2016-09-30 10:18:34 +02:00
2015-11-13 20:34:33 -05:00
2016-09-07 08:32:46 +02:00
2015-11-23 21:11:08 -05:00
2015-11-04 22:13:45 -05:00
2016-09-15 08:27:53 +02:00
2016-02-25 12:01:18 -08:00
2015-09-09 10:43:12 -07:00
2016-09-30 10:18:37 +02:00
2016-10-07 15:23:47 +02:00
2015-11-10 12:07:22 -08:00
2015-11-11 09:45:24 -08:00
2015-12-04 11:02:17 -07:00
2015-11-11 02:19:33 -05:00
2015-08-05 13:49:35 -07:00
2015-10-23 23:26:43 +02:00
2016-04-12 09:08:58 -07:00
2015-11-16 23:54:45 -08:00
2016-08-16 09:30:50 +02:00
2016-03-03 15:07:28 -08:00
2015-08-17 18:39:46 -04:00
2015-07-10 10:39:25 -05:00
2016-04-12 09:08:58 -07:00
2015-08-07 04:39:40 +03:00
2015-11-05 23:05:32 -08:00
2016-04-12 09:09:04 -07:00
2016-08-10 11:49:30 +02:00
2015-08-17 23:38:10 -04:00
2016-10-17 16:38:44 -07:00
2015-08-12 15:28:45 -05:00
2016-08-10 11:49:27 +02:00
2016-10-17 16:38:44 -07:00
2015-06-30 19:44:56 -07:00
2015-11-06 17:50:42 -08:00
2016-09-15 08:27:49 +02:00
2016-08-10 11:49:27 +02:00
2015-09-11 15:21:34 -07:00
2016-05-18 17:06:48 -07:00
2016-06-07 18:14:35 -07:00
2016-05-11 11:21:19 +02:00
2015-07-22 20:33:27 -05:00
2016-11-22 14:06:03 -08:00
2016-04-12 09:08:55 -07:00
2016-09-07 08:32:43 +02:00
2015-08-07 04:39:40 +03:00
2016-04-12 09:08:55 -07:00
2015-11-09 15:11:24 -08:00
2016-12-09 13:52:06 -08:00
2015-11-06 17:50:42 -08:00
2016-02-25 12:01:25 -08:00
2016-03-16 08:43:01 -07:00
2015-11-13 20:34:33 -05:00