From: Christopher Lameter <cl@linux.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, Pekka Enberg <penberg@cs.helsinki.fi>,
akpm@linux-foundation.org, Mel Gorman <mel@skynet.ie>,
andi@firstfloor.org, Rik van Riel <riel@redhat.com>,
Dave Chinner <dchinner@redhat.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [RFC 3/8] slub: Add isolate() and migrate() methods
Date: Tue, 2 Jan 2018 08:55:45 -0600 (CST) [thread overview]
Message-ID: <alpine.DEB.2.20.1801020853380.14141@nuc-kabylake> (raw)
In-Reply-To: <20171230064246.GC27959@bombadil.infradead.org>
On Fri, 29 Dec 2017, Matthew Wilcox wrote:
> Is this the right approach? I could imagine there being more ops in
> the future. I suspect we should bite the bullet now and do:
>
> struct kmem_cache_operations {
> void (*ctor)(void *);
> void *(*isolate)(struct kmem_cache *, void **objs, int nr);
> void (*migrate)(struct kmem_cache *, void **objs, int nr, int node,
> void *private);
> };
Well yes but that would mean converting the existing call sites.
> Not sure how best to convert the existing constructor users to this scheme.
> Perhaps cheat ...
One of the prior releases of slab defragmentation did this. We could do it
at some point. For now the approach avoids changing the API.
> > @@ -4969,6 +4987,20 @@ static ssize_t ops_show(struct kmem_cach
> >
> > if (s->ctor)
> > x += sprintf(buf + x, "ctor : %pS\n", s->ctor);
> > +
> > + if (s->isolate) {
> > + x += sprintf(buf + x, "isolate : ");
> > + x += sprint_symbol(buf + x,
> > + (unsigned long)s->isolate);
> > + x += sprintf(buf + x, "\n");
> > + }
>
> Here you could print the symbol of the ops vector instead of the function
> pointer ...
Well yes if we had it and thne we could avoid printing individual fields.
--
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:[~2018-01-02 14:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 22:06 [RFC 0/8] Xarray object migration V1 Christoph Lameter
2017-12-27 22:06 ` [RFC 2/8] slub: Add defrag_ratio field and sysfs support Christoph Lameter
2017-12-30 6:20 ` Matthew Wilcox
2018-01-02 14:53 ` Christopher Lameter
2017-12-27 22:06 ` [RFC 3/8] slub: Add isolate() and migrate() methods Christoph Lameter
2017-12-30 6:42 ` Matthew Wilcox
2018-01-01 21:20 ` Matthew Wilcox
2018-01-02 14:56 ` Christopher Lameter
2018-01-02 14:55 ` Christopher Lameter [this message]
2017-12-27 22:06 ` [RFC 4/8] slub: Sort slab cache list and establish maximum objects for defrag slabs Christoph Lameter
2017-12-27 22:06 ` [RFC 5/8] slub: Slab defrag core Christoph Lameter
2017-12-27 22:06 ` [RFC 6/8] slub: Extend slabinfo to support -D and -F options Christoph Lameter
2017-12-27 22:06 ` [RFC 7/8] xarray: Implement migration function for objects Christoph Lameter
2017-12-27 22:06 ` [RFC 8/8] Add debugging output Christoph Lameter
2017-12-28 5:19 ` [RFC 0/8] Xarray object migration V1 Randy Dunlap
2017-12-28 14:57 ` Christopher Lameter
2017-12-28 17:18 ` James Bottomley
2017-12-28 17:33 ` Benjamin LaHaise
2017-12-28 17:40 ` James Bottomley
2017-12-28 19:17 ` Benjamin LaHaise
2017-12-28 20:00 ` James Bottomley
2017-12-28 20:33 ` Benjamin LaHaise
2017-12-28 22:24 ` Dave Chinner
2017-12-29 0:19 ` Christopher Lameter
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.20.1801020853380.14141@nuc-kabylake \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=dchinner@redhat.com \
--cc=hch@lst.de \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
--cc=penberg@cs.helsinki.fi \
--cc=riel@redhat.com \
--cc=willy@infradead.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