From: Yosry Ahmed <yosryahmed@google.com>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: akpm@linux-foundation.org, jpoimboe@kernel.org,
kent.overstreet@linux.dev, peterz@infradead.org,
nphamcs@gmail.com, cerasuolodomenico@gmail.com,
surenb@google.com, lizhijian@fujitsu.com, willy@infradead.org,
shakeel.butt@linux.dev, vbabka@suse.cz, ziy@nvidia.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v6 1/3] memcg: increase the valid index range for memcg stats
Date: Tue, 30 Jul 2024 10:17:54 -0700 [thread overview]
Message-ID: <CAJD7tkZ2f6g3P7qVP3fL0jFjZNHNgsW6BUb2-megpq_NQ3W7kg@mail.gmail.com> (raw)
In-Reply-To: <20240730150158.832783-2-pasha.tatashin@soleen.com>
On Tue, Jul 30, 2024 at 8:02 AM Pasha Tatashin
<pasha.tatashin@soleen.com> wrote:
>
> From: Shakeel Butt <shakeel.butt@linux.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@linux.dev>
> Co-developed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Yosry Ahmed <yosryahmed@google.com>
next prev parent reply other threads:[~2024-07-30 17:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-30 15:01 [PATCH v5 0/3] Kernel stack usage histogram Pasha Tatashin
2024-07-30 15:01 ` [PATCH v6 1/3] memcg: increase the valid index range for memcg stats Pasha Tatashin
2024-07-30 17:17 ` Yosry Ahmed [this message]
2024-07-30 15:01 ` [PATCH v6 2/3] vmstat: Kernel stack usage histogram Pasha Tatashin
2024-07-30 15:01 ` [PATCH v6 3/3] task_stack: uninline stack_not_used Pasha Tatashin
2024-07-30 15:05 ` [PATCH v6 0/3] Kernel stack usage histogram Pasha Tatashin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJD7tkZ2f6g3P7qVP3fL0jFjZNHNgsW6BUb2-megpq_NQ3W7kg@mail.gmail.com \
--to=yosryahmed@google.com \
--cc=akpm@linux-foundation.org \
--cc=cerasuolodomenico@gmail.com \
--cc=jpoimboe@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizhijian@fujitsu.com \
--cc=nphamcs@gmail.com \
--cc=pasha.tatashin@soleen.com \
--cc=peterz@infradead.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox