Skip to content

Commit 446297b

Browse files
xairywilldeacon
authored andcommitted
arm64: stacktrace: use non-atomic __set_bit
Use the non-atomic version of set_bit() in arch/arm64/kernel/stacktrace.c, as there is no concurrent accesses to frame->prev_type. This speeds up stack trace collection and improves the boot time of Generic KASAN by 2-5%. Suggested-by: Mark Rutland <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Andrey Konovalov <[email protected]> Link: https://lore.kernel.org/r/23dfa36d1cc91e4a1059945b7834eac22fb9854d.1653317461.git.andreyknvl@google.com Signed-off-by: Will Deacon <[email protected]>
1 parent 802b911 commit 446297b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/stacktrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int notrace unwind_next(struct task_struct *tsk,
117117
if (fp <= state->prev_fp)
118118
return -EINVAL;
119119
} else {
120-
set_bit(state->prev_type, state->stacks_done);
120+
__set_bit(state->prev_type, state->stacks_done);
121121
}
122122

123123
/*

0 commit comments

Comments
 (0)