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:   Wed, 29 Sep 2021 09:26:10 +0800
From:   Lai Jiangshan <jiangshanlai+lkml@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>, Peter Oskolkov <posk@...k.io>,
        Tejun Heo <tj@...nel.org>, Jens Axboe <axboe@...nel.dk>
Subject: Re: sched: Remove pointless preemption disable in sched_submit_work()

On Tue, Sep 28, 2021 at 10:31 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Neither wq_worker_sleeping() nor io_wq_worker_sleeping() require to be invoked
> with preemption disabled:
>
>   - The worker flag checks operations only need to be serialized against
>     the worker thread itself.
>
>   - The accounting and worker pool operations are serialized with locks.
>
> which means that disabling preemption has neither a reason nor a
> value. Remove it.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  kernel/sched/core.c |    2 --
>  1 file changed, 2 deletions(-)
>
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6327,12 +6327,10 @@ static inline void sched_submit_work(str
>          * requires it.
>          */
>         if (task_flags & (PF_WQ_WORKER | PF_IO_WORKER)) {

Hello

The comment about preemption above this if branch and wq_worker_sleeping()
needs to be removed.

Thanks
Lai

Reviewed-by: Lai Jiangshan <jiangshanlai@...il.com>

> -               preempt_disable();
>                 if (task_flags & PF_WQ_WORKER)
>                         wq_worker_sleeping(tsk);
>                 else
>                         io_wq_worker_sleeping(tsk);
> -               preempt_enable_no_resched();
>         }
>
>         if (tsk_is_pi_blocked(tsk))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ