Skip to content

Commit bcea02b

Browse files
Wang Wenshengrostedt
authored andcommitted
ftrace: Optimize the allocation for mcount entries
If we can't allocate this size, try something smaller with half of the size. Its order should be decreased by one instead of divided by two. Link: https://lkml.kernel.org/r/[email protected] Cc: <[email protected]> Cc: <[email protected]> Cc: [email protected] Fixes: a790087 ("ftrace: Allocate the mcount record pages as groups") Signed-off-by: Wang Wensheng <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 08948ca commit bcea02b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/ftrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3190,7 +3190,7 @@ static int ftrace_allocate_records(struct ftrace_page *pg, int count)
31903190
/* if we can't allocate this size, try something smaller */
31913191
if (!order)
31923192
return -ENOMEM;
3193-
order >>= 1;
3193+
order--;
31943194
goto again;
31953195
}
31963196

0 commit comments

Comments
 (0)