From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932166AbbFQO2Z (ORCPT ); Wed, 17 Jun 2015 10:28:25 -0400 Received: from www.linutronix.de ([62.245.132.108]:49486 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbbFQO2P (ORCPT ); Wed, 17 Jun 2015 10:28:15 -0400 Message-ID: <558183FB.7060808@linutronix.de> Date: Wed, 17 Jun 2015 16:28:11 +0200 From: Sebastian Andrzej Siewior User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Mike Galbraith CC: Davidlohr Bueso , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Steven Rostedt , "Paul E. McKenney" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up References: <1432056298-18738-1-git-send-email-dave@stgolabs.net> <1432056298-18738-2-git-send-email-dave@stgolabs.net> <20150616192911.GA19500@linutronix.de> <1434484226.1903.19.camel@stgolabs.net> <20150617083350.GA2433@linutronix.de> <1434550624.23509.18.camel@gmail.com> In-Reply-To: <1434550624.23509.18.camel@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/17/2015 04:17 PM, Mike Galbraith wrote: > On Wed, 2015-06-17 at 10:33 +0200, Sebastian Andrzej Siewior wrote: >> wake_futex_pi() wakes the task before releasing the hash bucket lock >> (HB). The first thing the woken up task usually does is to acquire the >> lock which requires the HB lock. On SMP Systems this leads to blocking >> on the HB lock which is released by the owner shortly after. >> This patch rearranges the unlock path by first releasing the HB lock and >> then waking up the task. >> >> [bigeasy: redo ontop of lockless wake-queues] >> Signed-off-by: Thomas Gleixner >> Signed-off-by: Sebastian Andrzej Siewior > > 4.1-rc8-rt4 contains this via 4.0-rt4, and seems fine on my 64 core > DL980. I ran a few iterations of futextests and stockfish, then mixed > two loops of futextest at different rt prios, with stockfish also rt, > and ltplight as tossed in as... crack filler. Box is still doing that, > is way too busy, but not griping about it. There are two patches mostly doing the same thing. The patch posted here is a redo ontop of "lockless wake-queues". It does hb-unlock, wakeup, de-boost. The patch merged into -RT is the original approach not using "lockless wake-queues" and performing wakeup, hb-unlock, de-boost. I plan to get into -RT the final solution once it hits upstream. > > -Mike > Sebastian