From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760329Ab3B1PPF (ORCPT ); Thu, 28 Feb 2013 10:15:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60930 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760314Ab3B1PPA (ORCPT ); Thu, 28 Feb 2013 10:15:00 -0500 Message-ID: <512F7429.4020103@redhat.com> Date: Thu, 28 Feb 2013 10:13:45 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Linus Torvalds CC: Davidlohr Bueso , Linux Kernel Mailing List , Thomas Gleixner , Steven Rostedt , "Vinod, Chegu" , "Low, Jason" , linux-tip-commits@vger.kernel.org, Peter Zijlstra , "H. Peter Anvin" , Andrew Morton , aquini@redhat.com, Michel Lespinasse , Ingo Molnar Subject: Re: [tip:core/locking] x86/smp: Move waiting on contended ticket lock out of line References: <20130206150403.006e5294@cuia.bos.redhat.com> <511BE4A3.8050607@redhat.com> <511C1204.9040608@redhat.com> <511C24A6.8020409@redhat.com> <512E376D.70105@redhat.com> <512E6443.9050603@redhat.com> <512E80E3.7060800@redhat.com> <512EC7F0.60103@redhat.com> <1362024397.1867.28.camel@buesod1.americas.hpqcorp.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/27/2013 11:49 PM, Linus Torvalds wrote: > On Wed, Feb 27, 2013 at 8:06 PM, Davidlohr Bueso wrote: >> >> The attached file shows how the amount of sys time used by the ipc lock >> for a 4 and 8 socket box. > > I have to say, even with the improvements, that looks pretty > disgusting. It really makes me wonder if that thing couldn't be done > better some way. Is it the SysV semaphores that this all ends up > using, or what? > > That said, I think the IPC layer is just about the perfect candidate > for things like this, because I'm afraid that nobody is ever going to > fix it. There's more to it than that. Userspace expects the IPC layer to provide exclusion and/or serialization. That makes it a rather poor candidate for parallelism. Btw, the IPC lock is already fairly fine grained. One ipc lock is allocated for each set of semaphores allocated through sys_semget. Looking up those semaphores in the namespace, when they are used later, is done under RCU.