From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735AbcGMIVd (ORCPT ); Wed, 13 Jul 2016 04:21:33 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:45032 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbcGMIVV (ORCPT ); Wed, 13 Jul 2016 04:21:21 -0400 Date: Wed, 13 Jul 2016 10:21:12 +0200 From: Peter Zijlstra To: John Stultz Cc: Tejun Heo , Ingo Molnar , lkml , Dmitry Shmidt , Rom Lemarchand , Colin Cross , Todd Kjos , Oleg Nesterov , Paul McKenney Subject: Re: Severe performance regression w/ 4.4+ on Android due to cgroup locking changes Message-ID: <20160713082112.GR30154@twins.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 12, 2016 at 05:00:04PM -0700, John Stultz wrote: > Hey Tejun, > > So Dmitry Shmidt recently noticed that with 4.4 based systems we're > seeing quite a bit of performance overhead from > __cgroup_procs_write(). > > With 4.4 tree as it stands, we're seeing __cgroup_procs_write() quite > often take 10s of miliseconds to execute (with max times up in the > 80ms range). > > While with 4.1 it was quite often in the single usec range, and max > time values still in in sub-milisecond range. > > The majority of these performance regressions seem to come from the > locking changes in: > > 3014dde762f6 ("cgroup: simplify threadgroup locking") > and > 1ed1328792ff ("sched, cgroup: replace signal_struct->group_rwsem with > a global percpu_rwsem") > > Dmitry has found that by reverting these two changes (which don't > revert easiliy), we can get back down to tens 10-100 usec range for > most calls, with max values occasionally spiking to ~18ms. > > Those two commits do talk about performance regressions, that were > supposedly alleviated by percpu_rwsem changes, but I'm not sure we are > seeing this. Do you have 'funny' RCU options that quickly force a grace period when you go idle or something? But yes, it does not surprise me to find this commit is causing problems.