Thread (3 messages) flat view 3 messages, 2 authors, 2017-09-20

[PATCH] selinux: Use kmem_cache for hashtab_node

From: paul@paul-moore.com (Paul Moore)
Date: 2017-09-20 16:09:20
Also in: lkml, selinux

On Thu, Sep 7, 2017 at 7:18 PM, Paul Moore [off-list ref] wrote:
On Wed, Sep 6, 2017 at 5:50 AM, Kyeongdon Kim [off-list ref] wrote:
quoted
During random test as own device to check slub account,
we found some slack memory from hashtab_node(kmalloc-64).
By using kzalloc(), middle of test result like below:
allocated size 240768
request size 45144
slack size 195624
allocation count 3762

So, we want to use kmem_cache_zalloc() and that
can reduce memory size 52byte(slack size/alloc count) per each struct.

Signed-off-by: Kyeongdon Kim <redacted>
---
 security/selinux/ss/hashtab.c  | 17 +++++++++++++++--
 security/selinux/ss/hashtab.h  |  4 ++++
 security/selinux/ss/services.c |  4 ++++
 3 files changed, 23 insertions(+), 2 deletions(-)
This seems reasonale, but I'm going to refrain from merging this until
after the merge window closes.
I just merged this into selinux/next, thanks for your patience.

-- 
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help