update and add new version of speedup-jbd2_journal_dirty_metadata
[ext4-patch-queue.git] / mballoc-avoid-20-argument-function-call
blob515bf8c3c89fc8ab09c655d861048d3ca34d6146
1 ext4: mballoc: avoid 20-argument function call
3 From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
5 Making a function call with 20 arguments is rather expensive in both
6 stack and .text. In this case, doing the formatting manually doesn't
7 make it any less readable, so we might as well save 155 bytes of .text
8 and 112 bytes of stack.
10 Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
11 ---
12  fs/ext4/mballoc.c | 9 +++------
13  1 file changed, 3 insertions(+), 6 deletions(-)
15 diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
16 index 8d1e60214ef0..a74bbbd6d57d 100644
17 --- a/fs/ext4/mballoc.c
18 +++ b/fs/ext4/mballoc.c
19 @@ -2257,12 +2257,9 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
21         group--;
22         if (group == 0)
23 -               seq_printf(seq, "#%-5s: %-5s %-5s %-5s "
24 -                               "[ %-5s %-5s %-5s %-5s %-5s %-5s %-5s "
25 -                                 "%-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
26 -                          "group", "free", "frags", "first",
27 -                          "2^0", "2^1", "2^2", "2^3", "2^4", "2^5", "2^6",
28 -                          "2^7", "2^8", "2^9", "2^10", "2^11", "2^12", "2^13");
29 +               seq_puts(seq, "#group: free  frags first ["
30 +                             " 2^0   2^1   2^2   2^3   2^4   2^5   2^6  "
31 +                             " 2^7   2^8   2^9   2^10  2^11  2^12  2^13  ]");
33         i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
34                 sizeof(struct ext4_group_info);