linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: Dave Chinner <dchinner@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Mike Snitzer <snitzer@redhat.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>
Subject: Re: slab-nomerge (was Re: [git pull] device mapper changes for 4.3)
Date: Thu, 3 Sep 2015 11:19:53 -0500 (CDT)	[thread overview]
Message-ID: <alpine.DEB.2.11.1509031113450.24411@east.gentwo.org> (raw)
In-Reply-To: <20150903122949.78ee3c94@redhat.com>

On Thu, 3 Sep 2015, Jesper Dangaard Brouer wrote:

> > IOWs, slab merging prevents us from implementing effective active
> > fragmentation management algorithms and hence prevents us  from
> > reducing slab fragmentation via improved shrinker reclaim
> > algorithms.  Simply put: slab merging reduces the effectiveness of
> > shrinker based slab reclaim.
>
> I'm buying into the problem of variable object lifetime sharing the
> same slub.

Well yeah I see the logic of the argument but what I have seen in practice
is that the access to objects becomes rather random over time. inodes and
denties are used by multiple underlying volumes/mountpoints etc. They are
expired individually etc etc. The references to objects become garbled
over time anyways.

What I would be interested in is some means by which locality of objects
of different caches can be explicitly specified. This would allow the
placing together of multiple objects in the same page frame. F.e. dentries
and inodes and other metadata of a filesystem that is related. This would
enhance the locality of the data and allow better defragmentation. But we
are talking here about a totally different allocator design.

> With the SLAB bulk free API I'm introducing, we can speedup slub
> slowpath, by free several objects with a single cmpxchg_double, BUT
> these objects need to belong to the same page.
>  Thus, as Dave describe with merging, other users of the same size
> objects might end up holding onto objects scattered across several
> pages, which gives the bulk free less opportunities.

This happens regardless as far as I can tell. On boot up you may end up
for a time in special situations where that is true.

> That would be a technical argument for introducing a SLAB_NO_MERGE flag
> per slab.  But I want to do some measurement before making any
> decision. And it might be hard to show for my use-case of SKB free,
> because SKB allocs will likely be dominating 256 bytes slab anyhow.

With the skbs you would want to place the skb data together with the
packet data and other network related objects right? Maybe we can think
out an allocator that can store objects related to a specific action in a
page frame that can then be tossed as a whole.

--
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 16:19 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 23:13 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  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 [this message]
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 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-07  9:30             ` Jesper Dangaard Brouer
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.1509031113450.24411@east.gentwo.org \
    --to=cl@linux.com \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox