| Date | Tue, 13 Jun 2023 17:29:08 -0700 | From | Ricardo Neri <> | Subject | Re: [PATCH v4 06/24] sched/fair: Collect load-balancing stats for IPC classes |
| |
On Mon, Jun 12, 2023 at 09:24:04PM -0700, Ricardo Neri wrote: > +static int rq_last_task_ipcc(int dst_cpu, struct rq *rq, unsigned short *ipcc) > +{ > + struct list_head *tasks = &rq->cfs_tasks; > + struct task_struct *p; > + struct rq_flags rf; > + int ret = -EINVAL; > + > + rq_lock_irqsave(rq, &rf); > + if (list_empty(tasks)) > + goto out; > + > + p = list_last_entry(tasks, struct task_struct, se.group_node); > + if (p->flags & PF_EXITING || is_idle_task(p) || > + !cpumask_test_cpu(dst_cpu, p->cpus_ptr)) > + goto out; > + > + ret = 0; > + *ipcc = p->ipcc; > +out: > + rq_unlock(rq, &rf);
This should be rq_unlock_irqrestore(). I will correct it in the next version.
|