OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 3/3] user.c: #ifdef ->mq_bytes
[PATCH 3/3] user.c: #ifdef ->mq_bytes [message #20583] Fri, 21 September 2007 09:40 Go to previous message
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
for those who deselect POSIX message queues.

Reduces SLAB size of user_struct from 64 to 32 bytes here,
SLUB size -- from 40 bytes to 32 bytes.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

 include/linux/sched.h |    2 ++
 kernel/user.c         |    2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -583,8 +583,10 @@ struct user_struct {
 	atomic_t inotify_watches; /* How many inotify watches does this user have? */
 	atomic_t inotify_devs;	/* How many inotify devs does this user have opened? */
 #endif
+#ifdef CONFIG_POSIX_MQUEUE
 	/* protected by mq_lock	*/
 	unsigned long mq_bytes;	/* How many bytes can be allocated to mqueue? */
+#endif
 	unsigned long locked_shm; /* How many pages of mlocked shm ? */
 
 #ifdef CONFIG_KEYS
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -44,7 +44,6 @@ struct user_struct root_user = {
 	.processes	= ATOMIC_INIT(1),
 	.files		= ATOMIC_INIT(0),
 	.sigpending	= ATOMIC_INIT(0),
-	.mq_bytes	= 0,
 	.locked_shm     = 0,
 #ifdef CONFIG_KEYS
 	.uid_keyring	= &root_user_keyring,
 
Read Message
Read Message
Previous Topic: [PATCH 1/1] user.c: deinline
Next Topic: Problem: LTP linkat01 test fails on nfs directory (NFS v3)
Goto Forum:
  


Current Time: Tue Aug 12 03:10:54 GMT 2025

Total time taken to generate the page: 0.71476 seconds