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]
Date:   Mon, 26 Jun 2023 11:36:40 +0530
From:   Ravi Bangoria <ravi.bangoria@....com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     acme@...nel.org, jolsa@...nel.org, irogers@...gle.com,
        peterz@...radead.org, adrian.hunter@...el.com, kan.liang@...el.com,
        eranian@...gle.com, ak@...ux.intel.com,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        sandipan.das@....com, ananth.narayan@....com,
        santosh.shukla@....com, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [RFC] perf record: Use PERF_RECORD_LOST for synthesizing samples
 from read_format->lost

On 24-Jun-23 11:25 AM, Namhyung Kim wrote:
> Hi Ravi,
> 
> On Fri, Jun 23, 2023 at 1:21 AM Ravi Bangoria <ravi.bangoria@....com> wrote:
>>
>> Currently perf synthesizes PERF_RECORD_LOST_SAMPLES samples for values
>> returned by read_format->lost. IIUC, PERF_RECORD_LOST_SAMPLES is used
>> only when hw provides corrupted samples and thus kernel has to drop
>> those. OTOH, PERF_RECORD_LOST is used when kernel has valid samples but
>> it fails to push them to ring-buffer because ring-buffer is already full.
>>
>> So I feel PERF_RECORD_LOST is more appropriate for synthesizing samples
>> from read_format->lost.
> 
> The problem of PERF_RECORD_LOST is that it counts non-sample
> records too.  It just counts every lost records and put the number
> when it can find a space in the ring buffer later.  We don't know
> which one is lost and how many of it.
> 
> Some users want to get the accurate number of samples even if it's
> not recorded in the ring buffer.  Using PERF_RECORD_LOST can be
> confusing since the kernel will return inaccurate data in terms of the
> number of lost samples.  So I chose PERF_RECORD_LOST_SAMPLES
> to return the accurate number for each event.

Ok. Thanks for the clarification.

Ravi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ