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, 17 Oct 2018 18:30:21 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Alexey Budankov <alexey.budankov@...ux.intel.com>
Cc:     mingo@...nel.org, linux-kernel@...r.kernel.org, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        songliubraving@...com, eranian@...gle.com, tglx@...utronix.de,
        mark.rutland@....com, megha.dey@...el.com, frederic@...nel.org
Subject: Re: [RFC][PATCH] perf: Rewrite core context handling

On Wed, Oct 17, 2018 at 11:57:49AM +0300, Alexey Budankov wrote:
> Hi,
> 
> On 10.10.2018 13:45, Peter Zijlstra wrote:
> <SNIP>
> > -static bool perf_rotate_context(struct perf_cpu_context *cpuctx)
> > +/*
> > + * XXX somewhat completely buggered; this is in cpu_pmu_context, but we need
> > + * event_pmu_context for rotations. We also need event_pmu_context specific
> > + * scheduling routines. ARGH
> > + *
> > + *  - fixed the cpu_pmu_context vs event_pmu_context thingy
> > + *    (cpu_pmu_context embeds an event_pmu_context)
> > + *
> > + *  - need nr_events/nr_active in epc to do per epc rotation
> > + *    (done)
> > + *
> > + *  - need cpu and task pmu ctx together...
> > + *    (cpc->task_epc)
> > + */
> > +static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc)
> 
> Since it reduces to single cpu context (and single task context) at all times, 
> ideally, it would probably be coded as simple as this: 
> 
> 	perf_rotate_context()
> 	{
>             cpu = this_cpu_ptr(&cpu_context)
>             for_every_pmu(pmu, cpu)

Can't do that, because we have per PMU rotation periods..

>                     for_every_event_ctx(event_ctx, pmu)
> 	                    rotate(event_ctx, pmu)
> 	}

I'm also not sure I get the rest that follows... you only have to rotate
_one_ event per PMU.

I'll try and understand the rest of you email later; brain has checked
out for the day.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ