All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@gmail.com>
To: Xunlei Pang <xlpang@linux.alibaba.com>
Cc: Christoph Lameter <cl@linux.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Wen Yang <wenyang@linux.alibaba.com>,
	Yang Shi <yang.shi@linux.alibaba.com>,
	Roman Gushchin <guro@fb.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] mm/slub: Introduce two counters for the partial objects
Date: Tue, 7 Jul 2020 18:23:46 +0300	[thread overview]
Message-ID: <CAOJsxLFnY=4v6UQigyiZKTMTQXKakVOKf6KA+bCkMe-XVY6sqA@mail.gmail.com> (raw)
In-Reply-To: <7374a9fd-460b-1a51-1ab4-25170337e5f2@linux.alibaba.com>

Hi!

(Sorry for the delay, I missed your response.)

On Fri, Jul 3, 2020 at 12:38 PM xunlei <xlpang@linux.alibaba.com> wrote:
>
> On 2020/7/2 PM 7:59, Pekka Enberg wrote:
> > On Thu, Jul 2, 2020 at 11:32 AM Xunlei Pang <xlpang@linux.alibaba.com> wrote:
> >> The node list_lock in count_partial() spend long time iterating
> >> in case of large amount of partial page lists, which can cause
> >> thunder herd effect to the list_lock contention, e.g. it cause
> >> business response-time jitters when accessing "/proc/slabinfo"
> >> in our production environments.
> >
> > Would you have any numbers to share to quantify this jitter? I have no
>
> We have HSF RT(High-speed Service Framework Response-Time) monitors, the
> RT figures fluctuated randomly, then we deployed a tool detecting "irq
> off" and "preempt off" to dump the culprit's calltrace, capturing the
> list_lock cost up to 100ms with irq off issued by "ss", this also caused
> network timeouts.

Thanks for the follow up. This sounds like a good enough motivation
for this patch, but please include it in the changelog.

> > objections to this approach, but I think the original design
> > deliberately made reading "/proc/slabinfo" more expensive to avoid
> > atomic operations in the allocation/deallocation paths. It would be
> > good to understand what is the gain of this approach before we switch
> > to it. Maybe even run some slab-related benchmark (not sure if there's
> > something better than hackbench these days) to see if the overhead of
> > this approach shows up.
>
> I thought that before, but most atomic operations are serialized by the
> list_lock. Another possible way is to hold list_lock in __slab_free(),
> then these two counters can be changed from atomic to long.
>
> I also have no idea what's the standard SLUB benchmark for the
> regression test, any specific suggestion?

I don't know what people use these days. When I did benchmarking in
the past, hackbench and netperf were known to be slab-allocation
intensive macro-benchmarks. Christoph also had some SLUB
micro-benchmarks, but I don't think we ever merged them into the tree.

- Pekka

  reply	other threads:[~2020-07-07 15:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02  8:32 [PATCH 1/2] mm/slub: Introduce two counters for the partial objects Xunlei Pang
2020-07-02  8:32 ` [PATCH 2/2] mm/slub: Get rid of count_partial() Xunlei Pang
2020-07-02 11:59 ` [PATCH 1/2] mm/slub: Introduce two counters for the partial objects Pekka Enberg
2020-07-02 11:59   ` Pekka Enberg
2020-07-03  9:37   ` xunlei
2020-07-07 15:23     ` Pekka Enberg [this message]
2020-07-07 15:23       ` Pekka Enberg
2020-07-09 14:32       ` Christopher Lameter
2020-07-09 14:32         ` Christopher Lameter
2020-07-31  2:57       ` xunlei
2020-07-07  6:59 ` Christopher Lameter
2020-07-07  6:59   ` Christopher Lameter
2020-07-31  2:52   ` xunlei
2020-08-06 12:42 ` Vlastimil Babka
2020-08-07  7:25   ` Pekka Enberg
2020-08-07  7:25     ` Pekka Enberg
2020-08-07 13:02     ` Christopher Lameter
2020-08-07 13:02       ` Christopher Lameter
2020-08-07 17:28       ` Pekka Enberg
2020-08-07 17:28         ` Pekka Enberg
2020-08-10 11:56         ` xunlei
2020-08-11 12:52         ` Christopher Lameter
2020-08-11 12:52           ` Christopher Lameter
2020-08-20 13:58           ` Pekka Enberg
2020-08-20 13:58             ` Pekka Enberg
2020-08-24  9:59             ` xunlei

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='CAOJsxLFnY=4v6UQigyiZKTMTQXKakVOKf6KA+bCkMe-XVY6sqA@mail.gmail.com' \
    --to=penberg@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=guro@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wenyang@linux.alibaba.com \
    --cc=xlpang@linux.alibaba.com \
    --cc=yang.shi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.