From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbcGMU5T (ORCPT ); Wed, 13 Jul 2016 16:57:19 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:34133 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750897AbcGMU5I (ORCPT ); Wed, 13 Jul 2016 16:57:08 -0400 MIME-Version: 1.0 In-Reply-To: <20160713203944.GC29670@mtj.duckdns.org> References: <20160713182102.GJ4065@mtj.duckdns.org> <20160713183347.GK4065@mtj.duckdns.org> <20160713201823.GB29670@mtj.duckdns.org> <20160713202657.GW30154@twins.programming.kicks-ass.net> <20160713203944.GC29670@mtj.duckdns.org> From: John Stultz Date: Wed, 13 Jul 2016 13:57:06 -0700 Message-ID: Subject: Re: Severe performance regression w/ 4.4+ on Android due to cgroup locking changes To: Tejun Heo Cc: Peter Zijlstra , Ingo Molnar , lkml , Dmitry Shmidt , Rom Lemarchand , Colin Cross , Todd Kjos , Oleg Nesterov , "Paul E. McKenney" 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 Wed, Jul 13, 2016 at 1:39 PM, Tejun Heo wrote: > Hello, > > On Wed, Jul 13, 2016 at 10:26:57PM +0200, Peter Zijlstra wrote: >> > So, it's a percpu rwsem issue then. I haven't really followed the >> > perpcpu rwsem changes closely. Oleg, are multi-milisec delay expected >> > on down write expected with the current implementation of >> > percpu_rwsem? >> >> There is a synchronize_sched() in there, so sorta. That thing is heavily >> geared towards readers, as is the only 'sane' choice for global locks. > > It used to use the expedited variant until 001dac627ff3 > ("locking/percpu-rwsem: Make use of the rcu_sync infrastructure"), so > it might have been okay before then. Just as a datapoint, just reverting 001dac627ff3 ("locking/percpu-rwsem: Make use of the rcu_sync infrastructure"), doesn't seem to help as much as your prior patch going to a normal rwsem. I'm consistently seeing values in the 100-550us range (with occasional spikes around 6ms), with a max value at 36ms. thanks -john