On Tue, Apr 03, 2018 at 10:50:59AM +0200, Pavel Machek wrote:
> > gcc already does some nice optimisations around free(). For example, it
> > can eliminate dead stores:
>
> Are we comfortable with that optimalization for kernel?
>
> us: "Hey, let's remove those encryption keys before freeing mem
Hi!
> > And sure, your free() implementation obviously also has that property,
> > but I'm worried that they might one day decide to warn about the
> > prototype mismatch (actually, I'm surprised it doesn't warn now, given
> > that it obviously pretends to know what free() function I'm calling...)
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_ca
Hi Matthew,
I love your patch! Yet something to improve:
[auto build test ERROR on rcu/rcu/next]
[also build test ERROR on v4.16-rc6 next-20180323]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
https://github.com/0day-ci/linux/commit
On Fri, Mar 23, 2018 at 08:14:21AM -0700, Matthew Wilcox wrote:
> > One more thing, there is
> > some kasan checks on the main way of kfree(), and there is no guarantee they
> > reflected in kmem_cache_free() identical.
>
> Which function are you talking about here?
>
> slub calls slab_free() for
On 23.03.2018 18:14, 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 a
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
On Fri, Mar 23, 2018 at 09:04:10AM +0100, Rasmus Villemoes wrote:
> On 2018-03-22 20:58, Matthew Wilcox wrote:
> > From: Matthew Wilcox
> >
> > free() can free many different kinds of memory.
>
> I'd be a bit worried about using that name. gcc very much knows about
> the C standard's definition
Hi, Matthew,
On 22.03.2018 22:58, Matthew Wilcox wrote:
> From: Matthew Wilcox
>
> free() can free many different kinds of memory.
>
> Signed-off-by: Matthew Wilcox
> ---
> include/linux/kernel.h | 2 ++
> mm/util.c | 39 +++
> 2 files changed
On 2018-03-22 20:58, Matthew Wilcox wrote:
> From: Matthew Wilcox
>
> free() can free many different kinds of memory.
I'd be a bit worried about using that name. gcc very much knows about
the C standard's definition of that function, as can be seen on
godbolt.org by compiling
void free(const vo
10 matches
Mail list logo