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]
Message-ID: <0069d2dd01235b8e301837b041c4db58b296fbab.camel@linux.intel.com>
Date: Fri, 11 Oct 2024 10:44:35 -0700
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Namhyung Kim <namhyung@...nel.org>, Madadi Vineeth Reddy
	 <vineethr@...ux.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Ian Rogers
 <irogers@...gle.com>,  Athira Rajeev <atrajeev@...ux.vnet.ibm.com>, Peter
 Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Mark
 Rutland <mark.rutland@....com>, Alexander Shishkin
 <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, Adrian
 Hunter <adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>,
 acme@...hat.com,  linux-perf-users <linux-perf-users@...r.kernel.org>, LKML
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6] perf sched timehist: Add pre-migration wait time
 option

On Thu, 2024-10-10 at 09:23 -0700, Namhyung Kim wrote:
> Hello Tim,
> 
> On Fri, Oct 04, 2024 at 10:37:56PM +0530, Madadi Vineeth Reddy wrote:
> > pre-migration wait time is the time that a task unnecessarily spends
> > on the runqueue of a CPU but doesn't get switched-in there. In terms
> > of tracepoints, it is the time between sched:sched_wakeup and
> > sched:sched_migrate_task.
> > 
> > Let's say a task woke up on CPU2, then it got migrated to CPU4 and
> > then it's switched-in to CPU4. So, here pre-migration wait time is
> > time that it was waiting on runqueue of CPU2 after it is woken up.
> > 
> > The general pattern for pre-migration to occur is:
> > sched:sched_wakeup
> > sched:sched_migrate_task
> > sched:sched_switch
> > 
> > The sched:sched_waking event is used to capture the wakeup time,
> > as it aligns with the existing code and only introduces a negligible
> > time difference.
> > 
> > pre-migrations are generally not useful and it increases migrations.
> > This metric would be helpful in testing patches mainly related to wakeup
> > and load-balancer code paths as better wakeup logic would choose an
> > optimal CPU where task would be switched-in and thereby reducing pre-
> > migrations.
> > 
> > The sample output(s) when -P or --pre-migrations is used:
> > =================
> >            time    cpu  task name                       wait time  sch delay   run time  pre-mig time
> >                         [tid/pid]                          (msec)     (msec)     (msec)     (msec)
> > --------------- ------  ------------------------------  ---------  ---------  ---------  ---------
> >    38456.720806 [0001]  schbench[28634/28574]               4.917      4.768      1.004      0.000
> >    38456.720810 [0001]  rcu_preempt[18]                     3.919      0.003      0.004      0.000
> >    38456.721800 [0006]  schbench[28779/28574]              23.465     23.465      1.999      0.000
> >    38456.722800 [0002]  schbench[28773/28574]              60.371     60.237      3.955     60.197
> >    38456.722806 [0001]  schbench[28634/28574]               0.004      0.004      1.996      0.000
> >    38456.722811 [0001]  rcu_preempt[18]                     1.996      0.005      0.005      0.000
> >    38456.723800 [0000]  schbench[28833/28574]               4.000      4.000      3.999      0.000
> >    38456.723800 [0004]  schbench[28762/28574]              42.951     42.839      3.999     39.867
> >    38456.723802 [0007]  schbench[28812/28574]              43.947     43.817      3.999     40.866
> >    38456.723804 [0001]  schbench[28587/28574]               7.935      7.822      0.993      0.000
> > 
> > Signed-off-by: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
> > 
> > ---
> > Changes in v6:
> > - Handle the case of multiple migrations before the task is
> >   scheduled in. (Tim Chen)
> 
> Are you ok with this now?

Yes, you can add my reviewed-by.

> 
> Thanks,
> Namhyung
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ