From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751803AbcGNRFe (ORCPT ); Thu, 14 Jul 2016 13:05:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56320 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbcGNRFb (ORCPT ); Thu, 14 Jul 2016 13:05:31 -0400 Date: Thu, 14 Jul 2016 19:05:50 +0200 From: Oleg Nesterov To: Peter Zijlstra Cc: Tejun Heo , John Stultz , Ingo Molnar , lkml , Dmitry Shmidt , Rom Lemarchand , Colin Cross , Todd Kjos , "Paul E. McKenney" Subject: Re: Severe performance regression w/ 4.4+ on Android due to cgroup locking changes Message-ID: <20160714170550.GA13434@redhat.com> 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> <20160713205102.GZ30909@twins.programming.kicks-ass.net> <20160714131809.GO30927@twins.programming.kicks-ass.net> <20160714145844.GA7760@redhat.com> <20160714163731.GF30154@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160714163731.GF30154@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 14 Jul 2016 17:05:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/14, Peter Zijlstra wrote: > > On Thu, Jul 14, 2016 at 04:58:44PM +0200, Oleg Nesterov wrote: > > > > But note that we do not need RCU_NONE. All we need is the trivial change > > below. > > Hurm, maybe. So having that unbalanced keeps us in GP_PASSED state and > since we'll never drop gp_count back to 0 nothing will ever happen. Yes, exactly. Of course, this is a bit ugly, I'll try to send some rcu-sync cleanups/simplifications later. Perhaps we can even add a "cgroup migration is not that cold as it was supposed" boot option for this rcu_sync_enter() for now, not sure. > > Damn, I am trying to find my old rcu-sync patches which I didn't > > send, but can't... OK, this almost off-topic right now, just this "enter" > > is ugly and we can't switch the slow/fast modes dynamically. > > > > The rest of you patch is "optimize the slow path" and we already discussed > > it before, I personally like it. Perhaps you can redo it without RCU_NONE > > part? > > Indeed, I rebased that patch on top of the current tree and had to add > support for down_trylock() but otherwise much the same thing. > > I can send it out again. Great, thanks! This should fix the problem. Oleg.