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, 16 Oct 2018 18:24:23 +0000
From:   Song Liu <songliubraving@...com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     Ingo Molnar <mingo@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        "acme@...nel.org" <acme@...nel.org>,
        "alexander.shishkin@...ux.intel.com" 
        <alexander.shishkin@...ux.intel.com>,
        "jolsa@...hat.com" <jolsa@...hat.com>,
        "eranian@...gle.com" <eranian@...gle.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "alexey.budankov@...ux.intel.com" <alexey.budankov@...ux.intel.com>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "megha.dey@...el.com" <megha.dey@...el.com>,
        "frederic@...nel.org" <frederic@...nel.org>
Subject: Re: [RFC][PATCH] perf: Rewrite core context handling



> On Oct 16, 2018, at 11:10 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> 
> On Tue, Oct 16, 2018 at 04:34:05PM +0000, Song Liu wrote:
>>>> 3. perf_event_pmu_context owns RB tree of events. Since we don't 
>>>>  need rotation across multiple hardware PMUs, the rotation is 
>>>>  within same perf_event_pmu_context.  
>>> 
>>> By keeping the RB trees in perf_event_context, we get bigger trees,
>>> which is more efficient (log(n+m) < log(n) + log(m))
>>> 
>>> Also, specifically, it means we only need a single merge sort /
>>> iteration to schedule in a full context, instead of (again) doing 'n' of
>>> them.
>>> 
>>> Also, given a context and a pmu, it is cheaper for finding the relevant
>>> events; this is needed for big.little for instance. Something the
>>> proposed patch doesn't fully flesh out.
>> 
>> Would it be faster if we add a perf_event_pmu_context pointer to the 
>> perf_event? 
> 
> +       pmu_ctx = find_get_pmu_context(pmu, ctx, event);
> +       if (IS_ERR(pmu_ctx)) {
> +               err = PTR_ERR(pmu_ctx);
> +               goto err_locked;
> +       }
> +       event->pmu_ctx = pmu_ctx;
> 
> Like that?

Aha, we already have it. I misunderstood this one. Please ignore that.

Thanks,
Song

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ