All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Heinz Mauelshagen <heinzm@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Dave Chinner <dchinner@redhat.com>, Joe Thornber <ejt@redhat.com>,
	Pekka Enberg <penberg@kernel.org>, linux-mm <linux-mm@kvack.org>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	Mikulas Patocka <mpatocka@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Alasdair G Kergon <agk@redhat.com>
Subject: Re: slab-nomerge (was Re: [git pull] device mapper changes for 4.3)
Date: Wed, 2 Sep 2015 22:10:12 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.11.1509022152470.18064@east.gentwo.org> (raw)
In-Reply-To: <20150903023125.GC27804@redhat.com>

On Wed, 2 Sep 2015, Mike Snitzer wrote:

> You're also coming at this from a position that shared slabs are
> automatically good because they have been around for years.
>
> For those years I've not had a need to debug a leak in code I maintain;
> so I didn't notice slabs were merged.  I also haven't observed slab
> corruption being the cause of crashes in DM, block or SCSI.

Hmmm... Thats unusual. I have seen numerous leaks and corruptions that
were debugged using the additional debug code in the slab allocators.
Merging and debugging can be switched on at runtime if necessary and then
you will have a clear separation to be able to track down the offending
code as well as detailed problem reports that help to figure out what was
wrong. It is then typically even possible to fix these bugs without
getting the subsystem specialists involved.

> > Because clearly, that lack of statistics and the possible
> > cross-subsystem corruption hasn't actually been a pressing concern in
> > reality.
>
> Agreed.

To the effect now that even SLAB has adopted cache merging.

> But I'd still like some pointers/help on what makes slab merging so
> beneficial.  I'm sure Christoph and others have justification.  But if
> not then yes the default to slab merging probably should be revisited.

Well, we have discussed the pros and cons for merging a couple of times
but the general consensus was that it is beneficial. Performance on modern
cpu is very sensitive to cache footprint and reducing the overhead of meta
data for object allocation is a worthwhile goal. Also objects are more
likely to be kept cache hot if they can be used by multiple subsystems.
Slab merging also helps with reducing fragmentation since the free
objects on one page can be used for other purposes.

Check out the linux-mm archives for these dissussions.

This has been such an advantage that the feature was ported to SLAB (to
much more signficant effect than SLUB since SLAB is a pig with metadata
per node, per cpu and per kmem_cache). And yes sorry the consequence is
now that you do no longer have a choice. Both slab allocators default to
merging. SLAB had some difficulty staying competitive in performance
without that. Joonsoo Kim made SLAB more competitive last year and one of
the optimizations was to also support merging.

--
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>

  reply	other threads:[~2015-09-03  3:10 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 [this message]
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
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=alpine.DEB.2.11.1509022152470.18064@east.gentwo.org \
    --to=cl@linux.com \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --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=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.