The patch titled [PATCH] ipc/sem.c: cacheline align the ipc spinlock for semaphores has been added to the -mm tree. Its filename is ipc-semc-cacheline-align-the-ipc-spinlock-for-semaphores.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: [PATCH] ipc/sem.c: cacheline align the ipc spinlock for semaphores From: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> This patch cacheline aligns the spinlock for sysv semaphores: Without the patch, the spinlock and sem_otime [written by every semop that modified the array] and sem_base [read in the hot path of try_atomic_semop()] can be in the same cacheline. Signed-off-by: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Cc: Chris Mason <chris.mason@xxxxxxxxxx> Cc: Zach Brown <zach.brown@xxxxxxxxxx> Cc: Jens Axboe <jens.axboe@xxxxxxxxxx> Cc: Nick Piggin <npiggin@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/sem.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN include/linux/sem.h~ipc-semc-cacheline-align-the-ipc-spinlock-for-semaphores include/linux/sem.h --- a/include/linux/sem.h~ipc-semc-cacheline-align-the-ipc-spinlock-for-semaphores +++ a/include/linux/sem.h @@ -79,6 +79,7 @@ struct seminfo { #ifdef __KERNEL__ #include <asm/atomic.h> #include <linux/rcupdate.h> +#include <linux/cache.h> struct task_struct; @@ -91,7 +92,8 @@ struct sem { /* One sem_array data structure for each set of semaphores in the system. */ struct sem_array { - struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */ + struct kern_ipc_perm ____cacheline_aligned_in_smp + sem_perm; /* permissions .. see ipc.h */ time_t sem_otime; /* last semop time */ time_t sem_ctime; /* last change time */ struct sem *sem_base; /* ptr to first semaphore in array */ _ Patches currently in -mm which might be from manfred@xxxxxxxxxxxxxxxx are ipc-semc-optimize-update_queue-for-bulk-wakeup-calls.patch ipc-semc-optimize-update_queue-for-bulk-wakeup-calls-fix.patch ipc-semc-move-wake_up_process-out-of-the-spinlock-section.patch ipc-semc-move-wake_up_process-out-of-the-spinlock-section-fix.patch ipc-semc-cacheline-align-the-ipc-spinlock-for-semaphores.patch slab-leaks3-default-y.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html