From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753549AbbGAVzG (ORCPT ); Wed, 1 Jul 2015 17:55:06 -0400 Received: from mail-ig0-f170.google.com ([209.85.213.170]:33463 "EHLO mail-ig0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137AbbGAVzA (ORCPT ); Wed, 1 Jul 2015 17:55:00 -0400 MIME-Version: 1.0 In-Reply-To: <55938163.7020606@monom.org> References: <20150622121623.291363374@infradead.org> <55884FC2.6030607@bmw-carit.de> <20150622190553.GZ3644@twins.programming.kicks-ass.net> <5589285C.2010100@bmw-carit.de> <20150623143411.GA25159@twins.programming.kicks-ass.net> <558973A7.6010407@bmw-carit.de> <20150623175012.GD3644@twins.programming.kicks-ass.net> <20150623193624.GH18673@twins.programming.kicks-ass.net> <20150624084648.GB27873@gmail.com> <558A75EA.40905@bmw-carit.de> <55938163.7020606@monom.org> Date: Wed, 1 Jul 2015 14:54:59 -0700 X-Google-Sender-Auth: 3uc1SKdJgzjc--AfYs5SiW1W-Hs Message-ID: Subject: Re: [RFC][PATCH 00/13] percpu rwsem -v2 From: Linus Torvalds To: Daniel Wagner Cc: Ingo Molnar , Peter Zijlstra , Oleg Nesterov , Paul McKenney , Tejun Heo , Ingo Molnar , Linux Kernel Mailing List , der.herr@hofr.at, Davidlohr Bueso , Rik van Riel , Al Viro , Jeff Layton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 30, 2015 at 10:57 PM, Daniel Wagner wrote: > > And an attempt at visualization: > > http://monom.org/posix01/sweep-4.1.0-02756-ge3d06bd.png > http://monom.org/posix01/sweep-4.1.0-02769-g6ce2591.png Ugh. The old numbers look (mostly) fairly tight, and then the new ones are all over the map, and usually much worse. We've seen this behavior before when switching from a non-sleeping lock to a sleeping one. The sleeping locks have absolutely horrible behavior when they get contended, and spend tons of CPU time on the sleep/wakeup management, based on almost random timing noise. And it can get orders of magnitude worse if there are any nested locks that basically trigger trains of that kind of behavior. In general, sleeping locks are just horribly horribly bad for things that do small simple operations. Which is what fs/locks.c does. I'm not convinced it's fixable. Maybe the new rwsem just isn't a good idea. Linus