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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240805090558.GI37996@noisy.programming.kicks-ass.net>
Date: Mon, 5 Aug 2024 11:05:58 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: "Liang, Kan" <kan.liang@...ux.intel.com>,
	Ingo Molnar <mingo@...nel.org>, Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Ravi Bangoria <ravi.bangoria@....com>,
	Stephane Eranian <eranian@...gle.com>,
	Ian Rogers <irogers@...gle.com>, Mingwei Zhang <mizhang@...gle.com>
Subject: Re: [PATCH v2] perf/core: Optimize event reschedule for a PMU

On Sat, Aug 03, 2024 at 10:08:32AM -0700, Namhyung Kim wrote:

> > @@ -2802,9 +2821,10 @@ static int  __perf_install_in_context(void *info)
> >  #endif
> >
> >         if (reprogram) {
> > -               ctx_sched_out(ctx, EVENT_TIME);
> > +               ctx_update_time(cpuctx, ctx);
> 
> So you don't want to stop the context time while adding or enabling a new
> event, right?  Then I'm not sure if it's needed to update the time here as
> it'll be updated in the ctx_sched_out() again.
> 
> Also calling ctx_sched_out() will clear EVENT_TIME when is_active has
> no EVENT_ALL and it'll stop the context time anyway, right?
> 

Hmm, I knew I was missing something. Let me ponder rhat a bit more, and
maybe read some of the history on this thing back to remember what exact
issue was being fixed here.

> 
> 
> >                 add_event_to_ctx(event, ctx);
> > -               ctx_resched(cpuctx, task_ctx, get_event_type(event));
> > +               ctx_resched(cpuctx, task_ctx, event->pmu_ctx->pmu,
> > +                           get_event_type(event));
> >         } else {
> >                 add_event_to_ctx(event, ctx);
> >         }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ