From bf17bb717759d50a2733a7a8157a7c4a25d93abc Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Tue, 15 Dec 2009 16:47:28 -0800 Subject: [PATCH] ipc/sem.c: sem optimise undo list search Around a month ago, there was some discussion about an improvement of the sysv sem algorithm: Most (at least: some important) users only use simple semaphore operations, therefore it's worthwile to optimize this use case. This patch: Move last looked up sem_undo struct to the head of the task's undo list. Attempt to move common entries to the front of the list so search time is reduced. This reduces lookup_undo on oprofile of problematic SAP workload by 30% (see patch 4 for a description of SAP workload). Signed-off-by: Nick Piggin Signed-off-by: Manfred Spraul Cc: Pierre Peiffer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed