lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Jan 2016 13:46:14 +0900
From:	Joonsoo Kim <iamjoonsoo.kim@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Christoph Lameter <cl@...ux.com>,
	Pekka Enberg <penberg@...nel.org>,
	David Rientjes <rientjes@...gle.com>,
	Jesper Dangaard Brouer <brouer@...hat.com>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/16] mm/slab: introduce new freed objects management
 way, OBJFREELIST_SLAB

On Tue, Jan 26, 2016 at 08:40:13PM -0800, Andrew Morton wrote:
> On Thu, 14 Jan 2016 14:24:13 +0900 Joonsoo Kim <js1304@...il.com> wrote:
> 
> > This patchset implements new freed object management way, that is,
> > OBJFREELIST_SLAB. Purpose of it is to reduce memory overhead in SLAB.
> > 
> > SLAB needs a array to manage freed objects in a slab. If there is
> > leftover after objects are packed into a slab, we can use it as
> > a management array, and, in this case, there is no memory waste.
> > But, in the other cases, we need to allocate extra memory for
> > a management array or utilize dedicated internal memory in a slab for it.
> > Both cases causes memory waste so it's not good.
> > 
> > With this patchset, freed object itself can be used for a management
> > array. So, memory waste could be reduced. Detailed idea and numbers
> > are described in last patch's commit description. Please refer it.
> > 
> > In fact, I tested another idea implementing OBJFREELIST_SLAB with
> > extendable linked array through another freed object. It can remove
> > memory waste completely but it causes more computational overhead
> > in critical lock path and it seems that overhead outweigh benefit.
> > So, this patchset doesn't include it. I will attach prototype just for
> > a reference.
> 
> It appears that this patchset is perhaps due a couple of touchups from
> Christoph's comments.  I'll grab it as-is as I want to get an mmotm
> into linux-next tomorrow then vanish for a few days.

Hello, Andrew.

Could you add just one small fix below to 16/16 "mm/slab: introduce
new slab management type, OBJFREELIST_SLAB"?

Thanks.


------------>8-------------
>From f2afad62904fe3129c1a296987954076fb8f6b5a Mon Sep 17 00:00:00 2001
From: Joonsoo Kim <iamjoonsoo.kim@....com>
Date: Wed, 27 Jan 2016 10:36:05 +0900
Subject: [PATCH] fix SLAB_DESTROTY_BY_RCU

---
 mm/slab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/slab.c b/mm/slab.c
index 56777a7..ee44d78 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2019,7 +2019,7 @@ static bool set_objfreelist_slab_cache(struct kmem_cache *cachep,
 
 	cachep->num = 0;
 
-	if (cachep->ctor)
+	if (cachep->ctor || flags & SLAB_DESTROY_BY_RCU)
 		return false;
 
 	left = calculate_slab_order(cachep, size,
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ