Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755051AbbH0PRb (ORCPT ); Thu, 27 Aug 2015 11:17:31 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:34897 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754939AbbH0PR2 (ORCPT ); Thu, 27 Aug 2015 11:17:28 -0400 Date: Thu, 27 Aug 2015 17:17:24 +0200 From: Frederic Weisbecker To: Thomas Gleixner Cc: Steven Rostedt , Hideaki Kimura , Jason Low , Oleg Nesterov , Andrew Morton , Peter Zijlstra , Ingo Molnar , "Paul E. McKenney" , linux-kernel@vger.kernel.org, Linus Torvalds , Rik van Riel , Scott J Norton Subject: Re: [PATCH 0/3] timer: Improve itimers scalability Message-ID: <20150827151723.GA22397@lerouge> References: <20150825202710.d960a928.akpm@linux-foundation.org> <1440606804.23728.85.camel@j-VirtualBox> <20150826170851.GA5264@redhat.com> <1440626847.23728.122.camel@j-VirtualBox> <55DE4366.9080104@hpe.com> <20150826231326.GE11992@lerouge> <55DE4FA8.7050701@hpe.com> <20150827131844.GB21105@lerouge> <20150827104707.6943c312@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2105 Lines: 42 On Thu, Aug 27, 2015 at 05:09:21PM +0200, Thomas Gleixner wrote: > On Thu, 27 Aug 2015, Steven Rostedt wrote: > > On Thu, 27 Aug 2015 15:18:49 +0200 > > Frederic Weisbecker wrote: > > > > > On Wed, Aug 26, 2015 at 04:45:44PM -0700, Hideaki Kimura wrote: > > > > I totally agree that this is not a perfect solution. If there are 10x more > > > > cores and sockets, just the atomic fetch_add might be too expensive. > > > > > > > > However, it's comparatively/realistically the best thing we can do without > > > > any drawbacks. We can't magically force all library developers to write the > > > > most scalable code always. > > > > > > > > My point is: this is a safety net, and a very effective one. > > > > > > I mean the problem here is that a library uses an unscalable profiling feature, > > > unconditionally as soon as you load it without even initializing anything. And > > > this library is used in production. > > > > > > At first sight, fixing that in the kernel is only a hack that just reduces a bit > > > the symptoms. > > > > > > What is the technical issue that prevents from fixing that in the library itself? > > > Posix timers can be attached anytime. > > > > I'm curious to what the downside of this patch set is? If we can fix a > > problem that should be fixed in userspace, but does not harm the kernel > > by doing so, is that bad? (an argument for kdbus? ;-) > > The patches are not fixing a problem which should be fixed in user > space. They merily avoid lock contention which happens to be prominent > with that particular library. But avoiding lock contention even for 2 > threads is a worthwhile exercise if it does not hurt otherwise. And I > can't see anything what hurts with these patches. Sure it shouldn't really hurt anyway, since the presense of elapsing timers itself is checked locklessly. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/