summaryrefslogtreecommitdiff
path: root/net/rxrpc/af_rxrpc.c
diff options
context:
space:
mode:
authorSangwoo <sangwoo2.park@lge.com>2015-10-21 17:44:30 -0400
committerPaul Moore <pmoore@redhat.com>2015-10-21 17:44:30 -0400
commit63205654c0e05e5ffa1c6eef2fbef21dcabd2185 (patch)
tree52f244ee4d88b385b1bf5fd038818a383557c8c1 /net/rxrpc/af_rxrpc.c
parent1d2a168a085f1c65b895f258ee11a52813d25af6 (diff)
selinux: Use a kmem_cache for allocation struct file_security_struct
The size of struct file_security_struct is 16byte at my setup. But, the real allocation size for per each file_security_struct is 64bytes in my setup that kmalloc min size is 64bytes because ARCH_DMA_MINALIGN is 64. This allocation is called every times at file allocation(alloc_file()). So, the total slack memory size(allocated size - request size) is increased exponentially. E.g) Min Kmalloc Size : 64bytes, Unit : bytes Allocated Size | Request Size | Slack Size | Allocation Count --------------------------------------------------------------- 770048 | 192512 | 577536 | 12032 At the result, this change reduce memory usage 42bytes per each file_security_struct Signed-off-by: Sangwoo <sangwoo2.park@lge.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> [PM: removed extra subject prefix] Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'net/rxrpc/af_rxrpc.c')
0 files changed, 0 insertions, 0 deletions