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: <28359234-e818-4e3c-a99d-5c2306c15f9a@linux.ibm.com>
Date: Fri, 4 Oct 2024 12:28:11 +0530
From: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
To: Namhyung Kim <namhyung@...nel.org>
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,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        linux-perf-users <linux-perf-users@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Subject: Re: [PATCH v3] perf sched timehist: Add pre-migration wait time
 option

On 04/10/24 03:49, Namhyung Kim wrote:
> On Thu, Oct 03, 2024 at 03:04:28PM -0700, Tim Chen wrote:
>> On Wed, 2024-10-02 at 22:09 +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
>>
>> If a task migrate from CPU A to CPU B, but is unlucky that
>> someone took CPU B and it has to wait. Then it is yet again migrated to CPU C.
>> Do you only compute pre-mig time as 
>> t_sched_migrate_task_CPU_A - t_sched_migrate_task_CPU_A?
>>
>> The task also spend some pre-mig time on CPU_B that probably
>> should be included.  And that time is when it migrates to B
>> till it is migrated away from B.  Do you take that into
>> account?
> 
> Hmm.. right.  The current code updates the migrate time only if it's 0.
> But I think it can just always update the time to get the latest one.
> 

Right. I’ll update the code to always pick the latest migrate time, ensuring
that scenarios with multiple migrations in between are handled correctly.

Thanks,
Madadi Vineeth Reddy

> Thanks,
> Namhyung


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ