[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180325235603.GA18737@bombadil.infradead.org>
Date: Sun, 25 Mar 2018 16:56:03 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Kirill Tkhai <ktkhai@...tuozzo.com>
Cc: linux-mm@...ck.org, Matthew Wilcox <mawilcox@...rosoft.com>,
linux-kernel@...r.kernel.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH 3/4] mm: Add free()
On Fri, Mar 23, 2018 at 08:14:21AM -0700, Matthew Wilcox wrote:
> On Fri, Mar 23, 2018 at 04:33:24PM +0300, Kirill Tkhai wrote:
> > > + page = virt_to_head_page(ptr);
> > > + if (likely(PageSlab(page)))
> > > + return kmem_cache_free(page->slab_cache, (void *)ptr);
> >
> > It seems slab_cache is not generic for all types of slabs. SLOB does not care about it:
>
> Oof. I was sure I checked that. You're quite right that it doesn't ...
> this should fix that problem:
This patch was complete rubbish. The point of SLOB is that it mixes
sizes within the same page, and doesn't store the size when allocating
from a slab. So there is no way to tell. I'm going to think about this
some more.
Powered by blists - more mailing lists