[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190521014457.GA27676@eros.localdomain>
Date: Tue, 21 May 2019 11:44:57 +1000
From: "Tobin C. Harding" <me@...in.cc>
To: Roman Gushchin <guro@...com>
Cc: "Tobin C. Harding" <tobin@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Alexander Viro <viro@....linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Pekka Enberg <penberg@...helsinki.fi>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Christopher Lameter <cl@...ux.com>,
Miklos Szeredi <mszeredi@...hat.com>,
Andreas Dilger <adilger@...ger.ca>,
Waiman Long <longman@...hat.com>,
Tycho Andersen <tycho@...ho.ws>, Theodore Ts'o <tytso@....edu>,
Andi Kleen <ak@...ux.intel.com>,
David Chinner <david@...morbit.com>,
Nick Piggin <npiggin@...il.com>,
Rik van Riel <riel@...hat.com>,
Hugh Dickins <hughd@...gle.com>,
Jonathan Corbet <corbet@....net>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v5 13/16] slub: Enable balancing slabs across nodes
On Tue, May 21, 2019 at 01:04:10AM +0000, Roman Gushchin wrote:
> On Mon, May 20, 2019 at 03:40:14PM +1000, Tobin C. Harding wrote:
> > We have just implemented Slab Movable Objects (SMO). On NUMA systems
> > slabs can become unbalanced i.e. many slabs on one node while other
> > nodes have few slabs. Using SMO we can balance the slabs across all
> > the nodes.
> >
> > The algorithm used is as follows:
> >
> > 1. Move all objects to node 0 (this has the effect of defragmenting the
> > cache).
>
> This already sounds dangerous (or costly). Can't it be done without
> cross-node data moves?
>
> >
> > 2. Calculate the desired number of slabs for each node (this is done
> > using the approximation nr_slabs / nr_nodes).
>
> So that on this step only (actual data size - desired data size) has
> to be moved?
This is just the most braindead algorithm I could come up with. Surely
there are a bunch of things that could be improved. Since I don't know
the exact use case it seemed best not to optimize for any one use case.
I'll review, comment on, and test any algorithm you come up with!
thanks,
Tobin.
Powered by blists - more mailing lists