mirror of
https://github.com/commaai/agnos-kernel-sdm845.git
synced 2026-06-08 03:15:12 +08:00
Merge "msm: move printk out of spin lock low_water_lock"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
d905b74146
@@ -717,6 +717,7 @@ static void check_stack_usage(void)
|
||||
static DEFINE_SPINLOCK(low_water_lock);
|
||||
static int lowest_to_date = THREAD_SIZE;
|
||||
unsigned long free;
|
||||
int islower = false;
|
||||
|
||||
free = stack_not_used(current);
|
||||
|
||||
@@ -725,11 +726,15 @@ static void check_stack_usage(void)
|
||||
|
||||
spin_lock(&low_water_lock);
|
||||
if (free < lowest_to_date) {
|
||||
pr_info("%s (%d) used greatest stack depth: %lu bytes left\n",
|
||||
current->comm, task_pid_nr(current), free);
|
||||
lowest_to_date = free;
|
||||
islower = true;
|
||||
}
|
||||
spin_unlock(&low_water_lock);
|
||||
|
||||
if (islower) {
|
||||
pr_info("%s (%d) used greatest stack depth: %lu bytes left\n",
|
||||
current->comm, task_pid_nr(current), free);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline void check_stack_usage(void) {}
|
||||
|
||||
Reference in New Issue
Block a user