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: <20240715114805.GF14400@noisy.programming.kicks-ass.net>
Date: Mon, 15 Jul 2024 13:48:05 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ajay Kaher <ajay.kaher@...adcom.com>
Cc: mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
	mark.rutland@....com, rostedt@...dmis.org,
	alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
	irogers@...gle.com, adrian.hunter@...el.com,
	kan.liang@...ux.intel.com, yangjihong1@...wei.com,
	zegao2021@...il.com, leo.yan@...ux.dev, asmadeus@...ewreck.org,
	siyanteng@...ngson.cn, sunhaiyong@...ngson.cn,
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	alexey.makhalov@...adcom.com, vasavi.sirnapalli@...adcom.com,
	Vamsi Krishna Brahmajosyula <vamsi-krishna.brahmajosyula@...adcom.com>,
	nadav.amit@...il.com
Subject: Re: [PATCH RFC 1/3] perf/core: add logic to collect off-cpu sample

On Sun, Jul 14, 2024 at 09:53:10PM +0530, Ajay Kaher wrote:
> On Fri, Jul 12, 2024 at 3:19 AM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > On Thu, Jul 11, 2024 at 05:46:17PM +0530, Ajay Kaher wrote:
> > > following logics has been added to collect the off-cpu sample:
> > >
> > > - 'task_pt_regs(current)' has been used to capture registers
> > >   status off-cpu sample.
> > >
> > > - off-cpu time represent the time period for which the target
> > >   process not occupying the cpu cycles. And calculate as:
> > >
> > >   off-cpu time = swap-in time - swap-out time
> > >
> >
> > I have absolutely no idea what you're trying to do :/ The above does not
> > constitute a comprehensible Changelog.
> 
> Sorry Peter, it’s sched-in/out (not swap-in/out).
> 
> 'Perf record' captures on-cpu samples at frequency which is specified by
> the user ( i.e. time period to collect sample is NSEC_PER_SEC / freq).
> 
> This patch is to collect the off_cpu sample and time period of off_cpu
> sample is calculated based upon the time when target task was sched_out
> to sched_in, as:
> 
>  off-cpu time period = sched_in time - sched-out time

But but but... you don't need anything new for that. The sched_wakeup
tracepoint should generate an event in both the task/cpu that does the
wakeup *AND* the task being woken.

So sched_switch + sched_wakeup should get you all this already. What am
I missing?

https://lore.kernel.org/all/1342016098-213063-1-git-send-email-avagin@openvz.org/T/#u

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ