Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754017Ab1FOTZl (ORCPT ); Wed, 15 Jun 2011 15:25:41 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:45535 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753258Ab1FOTZj (ORCPT ); Wed, 15 Jun 2011 15:25:39 -0400 Date: Wed, 15 Jun 2011 12:24:35 -0700 From: Andrew Morton To: Linus Torvalds Cc: Peter Zijlstra , Ingo Molnar , Paul McKenney , Tim Chen , Hugh Dickins , KOSAKI Motohiro , Benjamin Herrenschmidt , David Miller , Martin Schwidefsky , Russell King , Paul Mundt , Jeff Dike , Richard Weinberger , Tony Luck , KAMEZAWA Hiroyuki , Mel Gorman , Nick Piggin , Namhyung Kim , ak@linux.intel.com, shaohua.li@intel.com, alex.shi@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Rafael J. Wysocki" Subject: Re: REGRESSION: Performance regressions from switching anon_vma->lock to mutex Message-Id: <20110615122435.386731e0.akpm@linux-foundation.org> In-Reply-To: References: <1308097798.17300.142.camel@schen9-DESK> <1308134200.15315.32.camel@twins> <1308135495.15315.38.camel@twins> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1471 Lines: 29 On Wed, 15 Jun 2011 12:11:19 -0700 Linus Torvalds wrote: > So using anonymous kernel threads is actually a real downside. It > makes it much less obvious what is going on. We saw that exact same > thing with the generic worker thread conversions: things that used to > have clear performance issues ("oh, the iwl-phy0 thread is using 3% of > CPU time because it is polling for IO, and I can see that in 'top'") > turned into much-harder-to-see issues ("oh, kwork0 us using 3% CPU > time according to 'top' - I have no idea why"). Yes, this is an issue with the memcg async reclaim patches. One implementation uses a per-memcg kswapd and you can then actually see what it's doing, and see when it goes nuts (as kswapd threads like to do). The other implementation uses worker threads and you have no clue what's going on. It could be that if more things move away from dedicated threads and into worker threads, we'll need to build a separate accounting system so we can see how much time worker threads are spending on a per-handler basis. Which means a new top-like tool, etc. That's all pretty nasty and is a tradeoff which should be considered when making thread-vs-worker decisions. -- 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/