From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933034AbcBIVqn (ORCPT ); Tue, 9 Feb 2016 16:46:43 -0500 Received: from g2t4625.austin.hp.com ([15.73.212.76]:38207 "EHLO g2t4625.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932512AbcBIVqm (ORCPT ); Tue, 9 Feb 2016 16:46:42 -0500 Message-ID: <1455054274.2976.31.camel@j-VirtualBox> Subject: Re: [PATCH 0/2] locking/mutex: Enable optimistic spinning of lock waiter From: Jason Low To: Waiman Long Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Linus Torvalds , Ding Tianhong , Jason Low , Davidlohr Bueso , "Paul E. McKenney" , Thomas Gleixner , Will Deacon , Tim Chen , jason.low2@hpe.com Date: Tue, 09 Feb 2016 13:44:34 -0800 In-Reply-To: <1455047262-27731-1-git-send-email-Waiman.Long@hpe.com> References: <1455047262-27731-1-git-send-email-Waiman.Long@hpe.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-02-09 at 14:47 -0500, Waiman Long wrote: > This patchset is a variant of PeterZ's "locking/mutex: Avoid spinner > vs waiter starvation" patch. The major difference is that the > waiter-spinner won't enter into the OSQ used by the spinners. Instead, > it will spin directly on the lock in parallel with the queue head > of the OSQ. So there will be a bit more cacheline contention on the > lock cacheline, but that shouldn't cause noticeable impact on system > performance. > > This patchset tries to address 2 issues with Peter's patch: > > 1) Ding Tianhong still find that hanging task could happen in some cases. > 2) Jason Low found that there was performance regression for some AIM7 > workloads. This might help address the hang that Ding reported. Performance wise, this patchset reduced AIM7 fserver throughput on the 8 socket machine by -70%+ at 1000+ users. | fserver JPM ----------------------------- baseline | ~450000 Peter's patch | ~410000 This patchset | ~100000 My guess is that waiters spinning/acquiring the lock is less efficient, and this patchset further increases the chance for waiters to spin/acquire the lock over the fastpath optimistic spinners. Jason