Commit deecd28
f2fs: add ckpt_valid_blocks to the section entry
when performing buffered writes in a large section,
overhead is incurred due to the iteration through
ckpt_valid_blocks within the section.
when SEGS_PER_SEC is 128, this overhead accounts for 20% within
the f2fs_write_single_data_page routine.
as the size of the section increases, the overhead also grows.
to handle this problem ckpt_valid_blocks is
added within the section entries.
Test
insmod null_blk.ko nr_devices=1 completion_nsec=1 submit_queues=8
hw_queue_depth=64 max_sectors=512 bs=4096 memory_backed=1
make_f2fs /dev/block/nullb0
make_f2fs -s 128 /dev/block/nullb0
fio --bs=512k --size=1536M --rw=write --name=1
--filename=/mnt/test_dir/seq_write
--ioengine=io_uring --iodepth=64 --end_fsync=1
before
SEGS_PER_SEC 1
2556MiB/s
SEGS_PER_SEC 128
2145MiB/s
after
SEGS_PER_SEC 1
2556MiB/s
SEGS_PER_SEC 128
2556MiB/s
Signed-off-by: yohan.joung <yohan.joung@sk.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>1 parent 249ad43 commit deecd28
2 files changed
Lines changed: 85 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2447 | 2447 | | |
2448 | 2448 | | |
2449 | 2449 | | |
2450 | | - | |
| 2450 | + | |
2451 | 2451 | | |
2452 | 2452 | | |
2453 | 2453 | | |
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
2495 | | - | |
| 2495 | + | |
2496 | 2496 | | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
2497 | 2500 | | |
2498 | 2501 | | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
2499 | 2505 | | |
2500 | 2506 | | |
2501 | 2507 | | |
2502 | 2508 | | |
2503 | | - | |
| 2509 | + | |
2504 | 2510 | | |
2505 | 2511 | | |
2506 | 2512 | | |
| |||
2533 | 2539 | | |
2534 | 2540 | | |
2535 | 2541 | | |
2536 | | - | |
| 2542 | + | |
2537 | 2543 | | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
2538 | 2547 | | |
2539 | 2548 | | |
2540 | | - | |
| 2549 | + | |
2541 | 2550 | | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
2542 | 2557 | | |
2543 | 2558 | | |
2544 | 2559 | | |
| |||
2569 | 2584 | | |
2570 | 2585 | | |
2571 | 2586 | | |
2572 | | - | |
| 2587 | + | |
2573 | 2588 | | |
2574 | | - | |
| 2589 | + | |
2575 | 2590 | | |
2576 | 2591 | | |
2577 | 2592 | | |
| |||
4708 | 4723 | | |
4709 | 4724 | | |
4710 | 4725 | | |
| 4726 | + | |
| 4727 | + | |
| 4728 | + | |
| 4729 | + | |
| 4730 | + | |
| 4731 | + | |
4711 | 4732 | | |
4712 | 4733 | | |
4713 | 4734 | | |
| |||
5029 | 5050 | | |
5030 | 5051 | | |
5031 | 5052 | | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
5032 | 5063 | | |
5033 | 5064 | | |
5034 | 5065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| |||
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
355 | 356 | | |
356 | | - | |
357 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
358 | 364 | | |
359 | | - | |
360 | | - | |
361 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
362 | 369 | | |
363 | | - | |
| 370 | + | |
364 | 371 | | |
365 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
366 | 402 | | |
367 | 403 | | |
368 | 404 | | |
| |||
0 commit comments