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, 25 Sep 2019 20:36:12 -0700
From:   Tony Jones <tonyj@...e.de>
To:     Yafang Shao <laoar.shao@...il.com>, peterz@...radead.org,
        acme@...nel.org, namhyung@...nel.org, akpm@...ux-foundation.org,
        jolsa@...hat.com, mingo@...hat.com
Cc:     linux-mm@...ck.org, florian.schmidt@...anix.com,
        daniel.m.jordan@...cle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf script python: integrate page reclaim analyze
 script

On 9/25/19 6:56 PM, Tony Jones wrote:
> On 9/18/19 7:38 AM, Yafang Shao wrote:
>> A new perf script page-reclaim is introduced in this patch. This new script
>> is used to report the page reclaim details. The possible usage of this
>> script is as bellow,
>> - identify latency spike caused by direct reclaim
>> - whehter the latency spike is relevant with pageout
>> - why is page reclaim requested, i.e. whether it is because of memory
>>   fragmentation
>> - page reclaim efficiency
>> etc
>> In the future we may also enhance it to analyze the memcg reclaim.
>>
>> Bellow is how to use this script,
>>     # Record, one of the following
>>     $ perf record -e 'vmscan:mm_vmscan_*' ./workload
>>     $ perf script record page-reclaim
>>
>>     # Report
>>     $ perf script report page-reclaim
>>
>>     # Report per process latency
>>     $ perf script report page-reclaim -- -p
> 
> 
> I tested it with global-dhp__pagereclaim-performance from mmtests and got what appears to be reasonable results and the output looks correct and useful.  However I'm not a vm expert so I can't comment further.  Hopefully someone on linux-mm can give more specific feedback.
> 
> There is one issue with Python3,  see below.  I didn't test with Python2.

Ok, I guess this wasn't actually tested with Python3 as itervalues() is Python2 only.   Any scripts need to work with both Python2.6+ and Python3.

# perf script -i /tmp/perf.out -s page-reclaim.py -- -p
...

Traceback (most recent call last):
  File "page-reclaim.py", line 305, in trace_end
    i.display_proc(),
  File "page-reclaim.py", line 268, in display_proc
    print_proc_latency(sorted(self.stat.stats['latency'].itervalues(),
AttributeError: 'dict' object has no attribute 'itervalues'
Fatal Python error: problem in Python trace event handler

Use a try/except to handle this.

Thanks

Tony



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ