Loading drivers/android/binder.c +7 −4 Original line number Diff line number Diff line Loading @@ -965,7 +965,8 @@ static void binder_wakeup_poll_threads_ilocked(struct binder_proc *proc, if (thread->task && current->signal && (current->signal->oom_score_adj == 0) && (current->prio < DEFAULT_PRIO)) thread->task->wts.low_latency = true; thread->task->wts.low_latency |= WALT_LOW_LATENCY_BINDER; #endif if (sync) wake_up_interruptible_sync(&thread->wait); Loading Loading @@ -1030,7 +1031,8 @@ static void binder_wakeup_thread_ilocked(struct binder_proc *proc, if (thread->task && current->signal && (current->signal->oom_score_adj == 0) && (current->prio < DEFAULT_PRIO)) thread->task->wts.low_latency = true; thread->task->wts.low_latency |= WALT_LOW_LATENCY_BINDER; #endif if (sync) wake_up_interruptible_sync(&thread->wait); Loading Loading @@ -4690,8 +4692,9 @@ static int binder_thread_read(struct binder_proc *proc, trace_binder_transaction_received(t); #ifdef CONFIG_SCHED_WALT if (current->wts.low_latency) current->wts.low_latency = false; if (current->wts.low_latency & WALT_LOW_LATENCY_BINDER) thread->task->wts.low_latency &= ~WALT_LOW_LATENCY_BINDER; #endif binder_stat_br(proc, thread, cmd); binder_debug(BINDER_DEBUG_TRANSACTION, Loading fs/proc/base.c +5 −2 Original line number Diff line number Diff line Loading @@ -1497,7 +1497,7 @@ static int sched_low_latency_show(struct seq_file *m, void *v) if (!p) return -ESRCH; low_latency = p->wts.low_latency; low_latency = p->wts.low_latency & WALT_LOW_LATENCY_PROCFS; seq_printf(m, "%d\n", low_latency); put_task_struct(p); Loading @@ -1520,7 +1520,10 @@ sched_low_latency_write(struct file *file, const char __user *buf, if (err) goto out; p->wts.low_latency = low_latency; if (low_latency) p->wts.low_latency |= WALT_LOW_LATENCY_PROCFS; else p->wts.low_latency &= ~WALT_LOW_LATENCY_PROCFS; out: put_task_struct(p); return err < 0 ? err : count; Loading include/linux/sched.h +4 −1 Original line number Diff line number Diff line Loading @@ -562,6 +562,9 @@ extern void walt_update_cluster_topology(void); #define RAVG_HIST_SIZE_MAX 5 #define NUM_BUSY_BUCKETS 10 #define WALT_LOW_LATENCY_PROCFS BIT(0) #define WALT_LOW_LATENCY_BINDER BIT(1) struct walt_task_struct { /* * 'mark_start' marks the beginning of an event (task waking up, task Loading Loading @@ -611,7 +614,7 @@ struct walt_task_struct { bool wake_up_idle; bool misfit; bool rtg_high_prio; bool low_latency; u8 low_latency; u64 boost_period; u64 boost_expires; u64 last_sleep_ts; Loading kernel/sched/sched.h +1 −0 Original line number Diff line number Diff line Loading @@ -3004,6 +3004,7 @@ static inline struct walt_related_thread_group return rcu_dereference(p->wts.grp); } /* applying the task threshold for all types of low latency tasks. */ static inline bool walt_low_latency_task(struct task_struct *p) { return p->wts.low_latency && Loading Loading
drivers/android/binder.c +7 −4 Original line number Diff line number Diff line Loading @@ -965,7 +965,8 @@ static void binder_wakeup_poll_threads_ilocked(struct binder_proc *proc, if (thread->task && current->signal && (current->signal->oom_score_adj == 0) && (current->prio < DEFAULT_PRIO)) thread->task->wts.low_latency = true; thread->task->wts.low_latency |= WALT_LOW_LATENCY_BINDER; #endif if (sync) wake_up_interruptible_sync(&thread->wait); Loading Loading @@ -1030,7 +1031,8 @@ static void binder_wakeup_thread_ilocked(struct binder_proc *proc, if (thread->task && current->signal && (current->signal->oom_score_adj == 0) && (current->prio < DEFAULT_PRIO)) thread->task->wts.low_latency = true; thread->task->wts.low_latency |= WALT_LOW_LATENCY_BINDER; #endif if (sync) wake_up_interruptible_sync(&thread->wait); Loading Loading @@ -4690,8 +4692,9 @@ static int binder_thread_read(struct binder_proc *proc, trace_binder_transaction_received(t); #ifdef CONFIG_SCHED_WALT if (current->wts.low_latency) current->wts.low_latency = false; if (current->wts.low_latency & WALT_LOW_LATENCY_BINDER) thread->task->wts.low_latency &= ~WALT_LOW_LATENCY_BINDER; #endif binder_stat_br(proc, thread, cmd); binder_debug(BINDER_DEBUG_TRANSACTION, Loading
fs/proc/base.c +5 −2 Original line number Diff line number Diff line Loading @@ -1497,7 +1497,7 @@ static int sched_low_latency_show(struct seq_file *m, void *v) if (!p) return -ESRCH; low_latency = p->wts.low_latency; low_latency = p->wts.low_latency & WALT_LOW_LATENCY_PROCFS; seq_printf(m, "%d\n", low_latency); put_task_struct(p); Loading @@ -1520,7 +1520,10 @@ sched_low_latency_write(struct file *file, const char __user *buf, if (err) goto out; p->wts.low_latency = low_latency; if (low_latency) p->wts.low_latency |= WALT_LOW_LATENCY_PROCFS; else p->wts.low_latency &= ~WALT_LOW_LATENCY_PROCFS; out: put_task_struct(p); return err < 0 ? err : count; Loading
include/linux/sched.h +4 −1 Original line number Diff line number Diff line Loading @@ -562,6 +562,9 @@ extern void walt_update_cluster_topology(void); #define RAVG_HIST_SIZE_MAX 5 #define NUM_BUSY_BUCKETS 10 #define WALT_LOW_LATENCY_PROCFS BIT(0) #define WALT_LOW_LATENCY_BINDER BIT(1) struct walt_task_struct { /* * 'mark_start' marks the beginning of an event (task waking up, task Loading Loading @@ -611,7 +614,7 @@ struct walt_task_struct { bool wake_up_idle; bool misfit; bool rtg_high_prio; bool low_latency; u8 low_latency; u64 boost_period; u64 boost_expires; u64 last_sleep_ts; Loading
kernel/sched/sched.h +1 −0 Original line number Diff line number Diff line Loading @@ -3004,6 +3004,7 @@ static inline struct walt_related_thread_group return rcu_dereference(p->wts.grp); } /* applying the task threshold for all types of low latency tasks. */ static inline bool walt_low_latency_task(struct task_struct *p) { return p->wts.low_latency && Loading