From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Chinner <dchinner@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
"dm-devel@redhat.com" <dm-devel@redhat.com>,
Alasdair G Kergon <agk@redhat.com>, Joe Thornber <ejt@redhat.com>,
Mikulas Patocka <mpatocka@redhat.com>,
Vivek Goyal <vgoyal@redhat.com>,
Sami Tolvanen <samitolvanen@google.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Heinz Mauelshagen <heinzm@redhat.com>,
linux-mm <linux-mm@kvack.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
brouer@redhat.com
Subject: Re: slab-nomerge (was Re: [git pull] device mapper changes for 4.3)
Date: Mon, 7 Sep 2015 23:17:15 +0200 [thread overview]
Message-ID: <20150907231715.0a375b40@redhat.com> (raw)
In-Reply-To: <CA+55aFym-dM37xtvKjddMheSV9vPUq=tnN9FoFvEgD0QWW22sg@mail.gmail.com>
On Mon, 7 Sep 2015 13:22:13 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Mon, Sep 7, 2015 at 2:30 AM, Jesper Dangaard Brouer
> <brouer@redhat.com> wrote:
> >
> > The slub allocator have a faster "fastpath", if your workload is
> > fast-reusing within the same per-cpu page-slab, but once the workload
> > increases you hit the slowpath, and then slab catches up. Slub looks
> > great in micro-benchmarking.
> >
> > And with "slab_nomerge" I get even high performance:
>
> I think those two are related.
>
> Not merging means that effectively the percpu caches end up being
> bigger (simply because there are more of them), and so it captures
> more of the fastpath cases.
Yes, that was also my theory. As manually tuning the percpu sizes gave
me almost the same boost.
> Obviously the percpu queue size is an easy tunable too, but there are
> real downsides to that too.
The easy fix is to introduce a subsystem specific percpu cache that is
large enough for our use-case. That seems to be a trend. I'm hoping to
come up with something smarter that every subsystem can benefit from.
E.g some heuristic that can dynamic adjust SLUB according to the usage
pattern. I can imagine something as simple as a counter for every
slowpath call, that is only valid as long as the jiffies count matches
(reset to zero, and store new jiffies cnt). (But I have not thought
this through...)
> I suspect your IP forwarding case isn't so
> different from some of the microbenchmarks, it just has more
> outstanding work..
Yes, I will admit that my testing is very close to micro benchmarking,
and it is specifically designed to pressure the system to its limits[1].
Especially the minimum frame size is evil and unrealistic, but the real
purpose is preparing the stack for increasing speeds like 100Gbit/s.
> And yes, the slow path (ie not hitting in the percpu cache) of SLUB
> could hopefully be optimizable too, although maybe the bulk patches
> are the way to go (and unrelated to this thread - at least part of
> your bulk patches actually got merged last Friday - they were part of
> Andrew's patch-bomb).
Cool. Yes, it is only part of the bulk patches. The real performance
boosters are not in yet (but I need to make them work correctly with
memory debugging enabled before they can get merged). At least the
main API is in, which allows me to implement use-case easier in other
subsystems :-)
[1] http://netoptimizer.blogspot.dk/2014/09/packet-per-sec-measurements-for.html
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Sr. Network Kernel Developer at Red Hat
Author of http://www.iptv-analyzer.org
LinkedIn: http://www.linkedin.com/in/brouer
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-09-07 21:17 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 23:13 slab-nomerge (was Re: [git pull] device mapper changes for 4.3) Linus Torvalds
2015-09-03 0:48 ` Andrew Morton
2015-09-03 0:53 ` Mike Snitzer
2015-09-03 0:51 ` Mike Snitzer
2015-09-03 0:51 ` Mike Snitzer
2015-09-03 1:21 ` Linus Torvalds
2015-09-03 2:31 ` Mike Snitzer
2015-09-03 3:10 ` Christoph Lameter
2015-09-03 4:55 ` Andrew Morton
2015-09-03 6:09 ` Pekka Enberg
2015-09-03 8:53 ` Dave Chinner
2015-09-03 3:11 ` Linus Torvalds
2015-09-03 6:02 ` Dave Chinner
2015-09-03 6:13 ` Pekka Enberg
2015-09-03 10:29 ` Jesper Dangaard Brouer
2015-09-03 16:19 ` Christoph Lameter
2015-09-04 9:10 ` Jesper Dangaard Brouer
2015-09-04 14:13 ` Christoph Lameter
2015-09-04 6:35 ` Sergey Senozhatsky
2015-09-04 7:01 ` Linus Torvalds
2015-09-04 7:59 ` Sergey Senozhatsky
2015-09-04 9:56 ` Sergey Senozhatsky
2015-09-04 14:05 ` Christoph Lameter
2015-09-04 14:11 ` Linus Torvalds
2015-09-05 2:09 ` Sergey Senozhatsky
2015-09-05 2:09 ` Sergey Senozhatsky
2015-09-05 20:33 ` Linus Torvalds
2015-09-07 8:44 ` Sergey Senozhatsky
2015-09-08 0:22 ` Sergey Senozhatsky
2015-09-03 15:02 ` Linus Torvalds
2015-09-04 3:26 ` Dave Chinner
2015-09-04 3:51 ` Linus Torvalds
2015-09-05 0:36 ` Dave Chinner
2015-09-05 0:36 ` Dave Chinner
2015-09-07 9:30 ` Jesper Dangaard Brouer
2015-09-07 20:22 ` Linus Torvalds
2015-09-07 20:22 ` Linus Torvalds
2015-09-07 21:17 ` Jesper Dangaard Brouer [this message]
2015-09-04 13:55 ` Christoph Lameter
2015-09-04 22:46 ` Dave Chinner
2015-09-05 0:25 ` Christoph Lameter
2015-09-05 1:16 ` Dave Chinner
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=20150907231715.0a375b40@redhat.com \
--to=brouer@redhat.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=dchinner@redhat.com \
--cc=dm-devel@redhat.com \
--cc=ejt@redhat.com \
--cc=heinzm@redhat.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-mm@kvack.org \
--cc=mpatocka@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=samitolvanen@google.com \
--cc=snitzer@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=vgoyal@redhat.com \
--cc=viresh.kumar@linaro.org \
/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.