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: <da7bd23e-e860-9569-bd29-4f63add710c0@intel.com>
Date:   Thu, 1 Jun 2023 10:14:28 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Peter Newman <peternewman@...gle.com>
CC:     Fenghua Yu <fenghua.yu@...el.com>, Babu Moger <babu.moger@....com>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "Borislav Petkov" <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Stephane Eranian <eranian@...gle.com>,
        James Morse <james.morse@....com>,
        <linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v1 3/9] x86/resctrl: Add resctrl_mbm_flush_cpu() to
 collect CPUs' MBM events

Hi Peter,

On 6/1/2023 7:45 AM, Peter Newman wrote:
> Hi Reinette,
> 
> On Thu, May 11, 2023 at 11:37 PM Reinette Chatre
> <reinette.chatre@...el.com> wrote:
>> On 4/21/2023 7:17 AM, Peter Newman wrote:
>>> +     /* Count bandwidth after the first successful counter read. */
>>> +     if (counter->initialized) {
>>> +             /* Assume that mbm_update() will prevent double-overflows. */
>>> +             if (val != counter->prev_bytes)
>>> +                     atomic64_add(val - counter->prev_bytes,
>>> +                                  &m->soft_rmid_bytes);
>>> +     } else {
>>> +             counter->initialized = true;
>>> +     }
>>> +
>>> +     counter->prev_bytes = val;
>>
>> I notice a lot of similarities between the above and the software controller,
>> see mbm_bw_count().
> 
> I see the "a=now(); a-b; b=a;" and the not handling overflow parts
> being similar, but the use of the initialized flag seems quite
> different from delta_comp.
> 
> Also mbm_state is on the arch-independent side and the new code is
> going to the arch-dependent side, so it wouldn't be convenient to try
> to use the mbm_bw structures for this.
> 
> From this, I don't think trying to reuse this is worth it unless you
> have other suggestions.

At this time I am staring at mbm_state->prev_bw_bytes and mbm_soft_counter->prev_bytes
and concerned about how much confusion this would generate. Considering the
pending changes to data structures I hope this would be clear then.

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ