Skip to content

Commit 97b4af2

Browse files
Villemoestytso
authored andcommitted
ext4: mballoc: avoid 20-argument function call
Making a function call with 20 arguments is rather expensive in both stack and .text. In this case, doing the formatting manually doesn't make it any less readable, so we might as well save 155 bytes of .text and 112 bytes of stack. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
1 parent 0d306dc commit 97b4af2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

fs/ext4/mballoc.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,12 +2275,9 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
22752275

22762276
group--;
22772277
if (group == 0)
2278-
seq_printf(seq, "#%-5s: %-5s %-5s %-5s "
2279-
"[ %-5s %-5s %-5s %-5s %-5s %-5s %-5s "
2280-
"%-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
2281-
"group", "free", "frags", "first",
2282-
"2^0", "2^1", "2^2", "2^3", "2^4", "2^5", "2^6",
2283-
"2^7", "2^8", "2^9", "2^10", "2^11", "2^12", "2^13");
2278+
seq_puts(seq, "#group: free frags first ["
2279+
" 2^0 2^1 2^2 2^3 2^4 2^5 2^6 "
2280+
" 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]");
22842281

22852282
i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
22862283
sizeof(struct ext4_group_info);

0 commit comments

Comments
 (0)