lkml.org 
[lkml]   [2023]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2023-06-14 02:27    [W:0.166 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site