From: Christopher Lameter <cl@linux.com>
To: Roman Gushchin <guro@fb.com>
Cc: Wen Yang <wenyang@linux.alibaba.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Xunlei Pang <xlpang@linux.alibaba.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/slub: improve count_partial() for CONFIG_SLUB_CPU_PARTIAL
Date: Tue, 3 Mar 2020 16:05:03 +0000 (UTC) [thread overview]
Message-ID: <alpine.DEB.2.21.2003031602460.1537@www.lameter.com> (raw)
In-Reply-To: <20200227183519.GA50628@carbon.dhcp.thefacebook.com>
On Thu, 27 Feb 2020, Roman Gushchin wrote:
> 1) Reading /proc/slabinfo can cause latency spikes in concurrent memory allocations.
> This is the problem which Wen raised initially.
Ok. Maybe cache the values or do not read /proc/slabinfo? Use
/sys/kernel/slab/... instead?
> 2) The number of active objects as displayed in /proc/slabinfo is misleadingly
> big if CONFIG_SLUB_CPU_PARTIAL is set.
Ok that cou.d be fixed by counting the partial slabs when computing
/proc/slabinfo output but that would increase the times even more.
> Maybe mixing them in a single workaround wasn't the best idea, but what do you
> suggest instead?
Read select values from /sys/kernel/slab/.... to determine the values you
need and avoid reading those that cause latency spikes. Use the number of
slabs for example to estimate the number of objects instead of the number
of objects which requires scanning through all the individual slab pages.
prev parent reply other threads:[~2020-03-03 16:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-22 9:24 Wen Yang
2020-02-24 1:29 ` Christopher Lameter
2020-02-24 16:57 ` Roman Gushchin
2020-02-25 15:49 ` Vlastimil Babka
2020-02-26 18:31 ` Christopher Lameter
2020-02-27 18:35 ` Roman Gushchin
2020-03-03 16:05 ` Christopher Lameter [this message]
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=alpine.DEB.2.21.2003031602460.1537@www.lameter.com \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=wenyang@linux.alibaba.com \
--cc=xlpang@linux.alibaba.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