From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751498AbcGNSnf (ORCPT ); Thu, 14 Jul 2016 14:43:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34545 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbcGNSnc (ORCPT ); Thu, 14 Jul 2016 14:43:32 -0400 Date: Thu, 14 Jul 2016 20:43:51 +0200 From: Oleg Nesterov To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, tj@kernel.org, paulmck@linux.vnet.ibm.com, john.stultz@linaro.org, dimitrysh@google.com, romlem@google.com, ccross@google.com, tkjos@google.com Subject: Re: [PATCH 2/2] locking/percpu-rwsem: Introduce bias knob Message-ID: <20160714184351.GA18388@redhat.com> References: <20160714182545.786693675@infradead.org> <20160714183022.336211504@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160714183022.336211504@infradead.org> 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.30]); Thu, 14 Jul 2016 18:43:31 +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: > > The current percpu-rwsem read side is entirely free of serializing > instructions at the cost of having a synchronize_sched() in the write > path. > > The latency of the synchronize_sched() is too high for some users > (cgroups), so provide a __percpu_init_rwsem(.bias) argument to forgot > this synchronize_sched() at the cost of forcing all readers into the > slow path, which has serializing instructions. Oh well... I personally do not think this is what we want... Can't we just add the stupid rcu_sync_enter() into cgroup_init() at least for now? Yes, this means the unnecessary .sync() at boot time, but it will go away after cleanups I am going to send. Because, again, we will probably want to change this bias dynamically. Oleg.