lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Feb 2023 03:13:59 -0500
From:   "Slade's Kernel Patch Bot" <slade@...dewatkins.com>
To:     zhenggy <zhenggy@...natelecom.cn>, mingo@...hat.com,
        peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        bristot@...hat.com, vschneid@...hat.com
Cc:     linux-kernel@...r.kernel.org, Slade Watkins <srw@...dewatkins.net>
Subject: Re: [PATCH] sched: Fix rq nr_uninterruptible count

On 2/28/23 02:08, zhenggy wrote:
> When an uninterrptable task is queue to a differect cpu as where
> it is dequeued, the rq nr_uninterruptible will be incorrent, so
> fix it.
> 
> Signed-off-by: GuoYong Zheng <zhenggy@...natelecom.cn>
> ---
>  kernel/sched/core.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 25b582b..cd5ef6e 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -4068,6 +4068,7 @@ bool ttwu_state_match(struct task_struct *p, unsigned int state, int *success)
>  {
>  	unsigned long flags;
>  	int cpu, success = 0;
> +	struct rq *src_rq, *dst_rq;
> 
>  	preempt_disable();
>  	if (p == current) {
> @@ -4205,6 +4206,16 @@ bool ttwu_state_match(struct task_struct *p, unsigned int state, int *success)
>  			atomic_dec(&task_rq(p)->nr_iowait);
>  		}
> 
> +		if (p->sched_contributes_to_load) {
> +			src_rq = cpu_rq(task_cpu(p));
> +			dst_rq = cpu_rq(cpu);
> +
> +			double_rq_lock(src_rq, dst_rq);
> +			src_rq->nr_uninterruptible--;
> +			dst_rq->nr_uninterruptible++;
> +			double_rq_unlock(src_rq, dst_rq);
> +		}
> +
>  		wake_flags |= WF_MIGRATED;
>  		psi_ttwu_dequeue(p);
>  		set_task_cpu(p, cpu);

This is Slade's kernel patch bot. When scanning his mailbox, I came across this message, which appears to have an odd format for its text ("text/plain; charset=gbk"). Emailed patches should be in ASCII or UTF-8 encoding. If you're using an email client, make sure it's configured to use either of the two formats.

You can learn more in the kernel's documentation here: https://www.kernel.org/doc/html/latest/process/email-clients.html

If you believe this is an error, please address a message to Slade Watkins <srw@...dewatkins.net>.

Thank you,
-- Slade's kernel patch bot

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ