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]
Message-ID: <CANDhNCojnZTvTKdpgRg8Xsfz32qDigJjoeHxiFZmLquX2_tRQQ@mail.gmail.com>
Date:   Thu, 9 Nov 2023 19:45:14 -0800
From:   John Stultz <jstultz@...gle.com>
To:     Xuewen Yan <xuewen.yan94@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Joel Fernandes <joelaf@...gle.com>,
        Qais Yousef <qyousef@...gle.com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Valentin Schneider <vschneid@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>,
        Zimuzo Ezeozue <zezeozue@...gle.com>,
        Youssef Esmat <youssefesmat@...gle.com>,
        Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        "Paul E . McKenney" <paulmck@...nel.org>, kernel-team@...roid.com,
        Qais Yousef <qyousef@...alina.io>
Subject: Re: [PATCH v6 18/20] sched: Handle blocked-waiter migration (and
 return migration)

On Wed, Nov 8, 2023 at 10:38 PM Xuewen Yan <xuewen.yan94@...il.com> wrote:
> On Thu, Nov 9, 2023 at 2:08 PM John Stultz <jstultz@...gle.com> wrote:
> > I'm currently trying to see if I can extend the blocked_on_waking flag
> > to keep more state (BLOCKED, WAKING, RUNNABLE) so that we can move the
> > return migration back to the the try_to_wake_up() call path, while
> > avoiding the task from becoming suddenly runnable on wakeup while on
> > the wrong runqueue.  This would avoid the lock juggling as we'd
> > already have the pi_lock. Though I'm a little hesitant as doing the
> > deactivate()/select_task_rq()/activate() steps from ttwu might muddle
> > up the careful logic around the on_rq/ttwu_runnable checks (definitely
> > had issues in that area with earlier versions of the patch).
>
> I also think it is better to put the return migration back to the
> try_to_wake_up() call path.
> When mutex_unlock, could we deactivate the block task before adding it
> to wake_q?

That's an interesting idea. Let me give that a shot and see if it
works out better.

> In this case, it can follow the try_to_wake_up patch. But at this
> time, the trace_sched_blocked_reason
> may be no need?
>
> >
> > > In addition, I also thought that since the block task is no longer
> > > dequeued, this will definitely cause the load on the CPU to increase.
> > > Perhaps we need to evaluate the impact of this on power consumption.
> > >
> >
> > Yeah. I've got that still as a todo in the cover letter:
> > * CFS load balancing. Blocked tasks may carry forward load (PELT)
> >   to the lock owner's CPU, so CPU may look like it is overloaded.
> >
> > If you have any thoughts there for a preferred approach, I'd be happy to hear.
>
> Okay, I'm still studying these patches carefully, and I will to test
> these patches later. When I find other problems, I will be happy to
> share.

Very much appreciated! Thank you again for the feedback and thoughts!
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ