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: <CAJD7tkZ2f6g3P7qVP3fL0jFjZNHNgsW6BUb2-megpq_NQ3W7kg@mail.gmail.com>
Date: Tue, 30 Jul 2024 10:17:54 -0700
From: Yosry Ahmed <yosryahmed@...gle.com>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: akpm@...ux-foundation.org, jpoimboe@...nel.org, kent.overstreet@...ux.dev, 
	peterz@...radead.org, nphamcs@...il.com, cerasuolodomenico@...il.com, 
	surenb@...gle.com, lizhijian@...itsu.com, willy@...radead.org, 
	shakeel.butt@...ux.dev, vbabka@...e.cz, ziy@...dia.com, 
	linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v6 1/3] memcg: increase the valid index range for memcg stats

On Tue, Jul 30, 2024 at 8:02 AM Pasha Tatashin
<pasha.tatashin@...een.com> wrote:
>
> From: Shakeel Butt <shakeel.butt@...ux.dev>
>
> At the moment the valid index for the indirection tables for memcg stats
> and events is < S8_MAX. These indirection tables are used in performance
> critical codepaths. With the latest addition to the vm_events, the
> NR_VM_EVENT_ITEMS has gone over S8_MAX. One way to resolve is to
> increase the entry size of the indirection table from int8_t to int16_t
> but this will increase the potential number of cachelines needed to
> access the indirection table.
>
> This patch took a different approach and make the valid index < U8_MAX.
> In this way the size of the indirection tables will remain same and we
> only need to invalid index check from less than 0 to equal to U8_MAX.
> In this approach we have also removed a subtraction from the performance
> critical codepaths.
>
> Signed-off-by: Shakeel Butt <shakeel.butt@...ux.dev>
> Co-developed-by: Pasha Tatashin <pasha.tatashin@...een.com>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@...een.com>

Reviewed-by: Yosry Ahmed <yosryahmed@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ