From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753223AbbIPM47 (ORCPT ); Wed, 16 Sep 2015 08:56:59 -0400 Received: from e06smtp08.uk.ibm.com ([195.75.94.104]:47378 "EHLO e06smtp08.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753099AbbIPM4z (ORCPT ); Wed, 16 Sep 2015 08:56:55 -0400 X-Helo: d06dlp02.portsmouth.uk.ibm.com X-MailFrom: borntraeger@de.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Subject: Re: [4.2] commit d59cfc09c32 (sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem) causes regression for libvirt/kvm To: Oleg Nesterov , Paolo Bonzini References: <55F8097A.7000206@de.ibm.com> <20150915130550.GC16853@twins.programming.kicks-ass.net> <55F81EE2.4090708@de.ibm.com> <55F84A6B.1010207@redhat.com> <20150915173836.GO4029@linux.vnet.ibm.com> <55F92904.4090206@redhat.com> <55F92F04.1040706@de.ibm.com> <55F9326A.9070509@redhat.com> <20150916122249.GA28821@redhat.com> Cc: paulmck@linux.vnet.ibm.com, Peter Zijlstra , Tejun Heo , Ingo Molnar , "linux-kernel@vger.kernel.org >> Linux Kernel Mailing List" , KVM list From: Christian Borntraeger Message-ID: <55F966EC.9060701@de.ibm.com> Date: Wed, 16 Sep 2015 14:56:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150916122249.GA28821@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15091612-0033-0000-0000-000004191FB8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 16.09.2015 um 14:22 schrieb Oleg Nesterov: >> The issue is that rcu_sync doesn't eliminate synchronize_sched, > > Yes, but it eliminates _expedited(). This is good, but otoh this means > that (say) individual __cgroup_procs_write() can take much more time. > However, it won't block the readers and/or disturb the whole system. > And percpu_up_write() doesn't do synchronize_sched() at all. > >> it only >> makes it more rare. > > Yes, so we can hope that multiple __cgroup_procs_write()'s can "share" > a single synchronize_sched(). And in fact it does. Paolo suggested to trace how often we call synchronize_sched so I applied some advanced printk debugging technology ;-) Until login I have 41 and after starting the 70 guests this went up to 48. Nice work. > >> So it's possible that it isn't eliminating the root >> cause of the problem. > > We will see... Just in case, currently the usage of percpu_down_write() > is suboptimal. We do not need to do ->sync() under cgroup_mutex. But > this needs some WIP changes in rcu_sync. Plus we can do more improvements, > but this is off-topic right now. > > Oleg. >