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] [day] [month] [year] [list]
Message-ID: <YUKhCHarl+Ng1xxR@carbon.dhcp.thefacebook.com>
Date:   Wed, 15 Sep 2021 18:42:32 -0700
From:   Roman Gushchin <guro@...com>
To:     Hao Luo <haoluo@...gle.com>
CC:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Rik van Riel <riel@...riel.com>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Valentin Schneider <Valentin.Schneider@....com>,
        Will Deacon <will@...nel.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Barret Rhoden <brho@...gle.com>, <bpf@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH rfc 0/6] Scheduler BPF

On Wed, Sep 15, 2021 at 05:19:03PM -0700, Hao Luo wrote:
> Hi Roman,
> 
> On Wed, Sep 15, 2021 at 3:04 PM Roman Gushchin <guro@...com> wrote:
> >

Hi Hao!

> 
> Thanks for initiating the effort of bringing BPF to sched. I've been
> looking at the potential applications of BPF in sched for some time
> and I'm very excited about this work!
> 
> My current focus has been using BPF for profiling performance and
> exporting sched related stats. I think BPF can provide a great help
> there. We have many users in Google that want the kernel to export
> various scheduling metrics to userspace. I think BPF is a good fit for
> such a task. So one of my recent attempts is to use BPF to account for
> the forced idle time caused by core scheduling [1]. This is one of the
> topics I want to discuss in my upcoming LPC BPF talk [2].

I guess for profiling we don't necessarily need a dedicated program type
etc, but it might be convenient, and some helpers can be useful too.

Unfortunately I won't be able to attend your talk, but hopefully I can
see it in a record later. I'm very interested.

> 
> Looking forward, I agree that BPF has a great potential in customizing
> policies in the scheduler. It has the advantage of quick
> experimentation and deployment. One of the use cases I'm thinking of
> is to customize load balancing policies. For example, allow using BPF
> to influence whether a task can migrate (can_migrate_task). This is
> currently only an idea.
> 
> > Our very first experiments with using BPF in CFS look very promising. We're
> > at a very early stage, however already have seen a nice latency and ~1% RPS
> > wins for our (Facebook's) main web workload.
> >
> > As I know, Google is working on a more radical approach [2]: they aim to move
> > the scheduling code into userspace. It seems that their core motivation is
> > somewhat similar: to make the scheduler changes easier to develop, validate
> > and deploy. Even though their approach is different, they also use BPF for
> > speeding up some hot paths. I think the suggested infrastructure can serve
> > their purpose too.
> 
> Yes. Barret can talk more about this, but I think it summarized the
> work of ghOSt [3] and the use of BPF in ghOSt well.

I took a brief look over how you use BPF in ghOSt and I think what I suggest
will work for you as well. I'd appreciate any comments/feedback whether it's
definitely true.

Thank you!

Roman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ