Commit ea38219
vfs: support caching symlink lengths in inodes
When utilized it dodges strlen() in vfs_readlink(), giving about 1.5%
speed up when issuing readlink on /initrd.img on ext4.
Filesystems opt in by calling inode_set_cached_link() when creating an
inode.
The size is stored in a new union utilizing the same space as i_devices,
thus avoiding growing the struct or taking up any more space.
Churn-wise the current readlink_copy() helper is patched to accept the
size instead of calculating it.
Signed-off-by: Mateusz Guzik <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>1 parent 135ec43 commit ea38219
File tree
4 files changed
+34
-19
lines changed- fs
- proc
- include/linux
- security/apparmor
4 files changed
+34
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5272 | 5272 | | |
5273 | 5273 | | |
5274 | 5274 | | |
5275 | | - | |
| 5275 | + | |
5276 | 5276 | | |
5277 | | - | |
5278 | | - | |
5279 | | - | |
| 5277 | + | |
5280 | 5278 | | |
5281 | | - | |
5282 | | - | |
5283 | | - | |
5284 | | - | |
5285 | | - | |
5286 | | - | |
5287 | | - | |
| 5279 | + | |
| 5280 | + | |
| 5281 | + | |
| 5282 | + | |
| 5283 | + | |
| 5284 | + | |
5288 | 5285 | | |
5289 | 5286 | | |
5290 | 5287 | | |
| |||
5304 | 5301 | | |
5305 | 5302 | | |
5306 | 5303 | | |
| 5304 | + | |
| 5305 | + | |
| 5306 | + | |
5307 | 5307 | | |
5308 | 5308 | | |
5309 | 5309 | | |
| |||
5322 | 5322 | | |
5323 | 5323 | | |
5324 | 5324 | | |
5325 | | - | |
| 5325 | + | |
5326 | 5326 | | |
5327 | 5327 | | |
5328 | 5328 | | |
| |||
5391 | 5391 | | |
5392 | 5392 | | |
5393 | 5393 | | |
| 5394 | + | |
| 5395 | + | |
| 5396 | + | |
5394 | 5397 | | |
5395 | | - | |
5396 | | - | |
5397 | | - | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
| 5401 | + | |
5398 | 5402 | | |
5399 | 5403 | | |
5400 | 5404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
629 | 630 | | |
630 | 631 | | |
631 | 632 | | |
| |||
723 | 724 | | |
724 | 725 | | |
725 | 726 | | |
726 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
| |||
749 | 753 | | |
750 | 754 | | |
751 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
752 | 763 | | |
753 | 764 | | |
754 | 765 | | |
| |||
3351 | 3362 | | |
3352 | 3363 | | |
3353 | 3364 | | |
3354 | | - | |
| 3365 | + | |
3355 | 3366 | | |
3356 | 3367 | | |
3357 | 3368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2612 | 2612 | | |
2613 | 2613 | | |
2614 | 2614 | | |
2615 | | - | |
| 2615 | + | |
2616 | 2616 | | |
2617 | 2617 | | |
2618 | 2618 | | |
| |||
0 commit comments