Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753947Ab3FOFsr (ORCPT ); Sat, 15 Jun 2013 01:48:47 -0400 Received: from mout.gmx.net ([212.227.15.15]:51982 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528Ab3FOFsq (ORCPT ); Sat, 15 Jun 2013 01:48:46 -0400 X-Authenticated: #14349625 X-Provags-ID: V01U2FsdGVkX1/qxQVclqXqHbYAEEkmrCBZAkR7ATu+EAW9dJgVcp 0gG6pb+LkFZ0iP Message-ID: <1371275319.5789.13.camel@marge.simpson.net> Subject: Re: [PATCH 0/6] ipc/sem.c: performance improvements, FIFO From: Mike Galbraith To: Manfred Spraul Cc: LKML , Andrew Morton , Rik van Riel , Davidlohr Bueso , hhuang@redhat.com, Linus Torvalds Date: Sat, 15 Jun 2013 07:48:39 +0200 In-Reply-To: <51BBFB34.20206@colorfullife.com> References: <1370884611-3861-1-git-send-email-manfred@colorfullife.com> <51BB38FA.6080607@colorfullife.com> <1371236750.5796.54.camel@marge.simpson.net> <51BBFB34.20206@colorfullife.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Y-GMX-Trusted: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1058 Lines: 25 On Sat, 2013-06-15 at 07:27 +0200, Manfred Spraul wrote: > Assume there is one op (semctl(), whatever) that acquires the global > lock - and a continuous stream of simple ops. > - spin_is_locked() returns true due to the semctl(). > - then simple ops will switch to spin_lock(&sma->sem_perm.lock). > - since the spinlock is acquired, the next operation will get true from > spin_is_locked(). > > It will stay that way around - as long as there is at least one op > waiting for sma->sem_perm.lock. > With enough cpus, it will stay like this forever. Yup, pondered that yesterday, scratching my head over how to do better. Hints highly welcome. Maybe if I figure out how to scratch dual lock thingy properly for -rt, non-rt will start acting sane too, as that spot seems to be itchy in both kernels. -Mike -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/