Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753178AbbLNInP (ORCPT ); Mon, 14 Dec 2015 03:43:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40973 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752604AbbLNInI (ORCPT ); Mon, 14 Dec 2015 03:43:08 -0500 Date: Mon, 14 Dec 2015 09:43:04 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML , David Ahern , Frederic Weisbecker , Andi Kleen , Stephane Eranian , Adrian Hunter Subject: Re: [PATCH/RFC 12/16] perf tools: Reduce lock contention when processing events Message-ID: <20151214084303.GA17701@krava.brq.redhat.com> References: <1449734015-9148-1-git-send-email-namhyung@kernel.org> <1449734015-9148-13-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449734015-9148-13-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 831 Lines: 20 On Thu, Dec 10, 2015 at 04:53:31PM +0900, Namhyung Kim wrote: > When multi-thread is enabled, the machine->threads_lock is contented > as all worker threads try to grab the writer lock using the > machine__findnew_thread(). Usually, the thread they're looking for is > in the tree so they only need the reader lock though. > > Thus try machine__find_thread() first, and then fallback to the > 'findnew' API. This will improve the performance. found one other place, but I guess you chose those based on profiling the contention? parent lookup in machine__process_fork_event jirka -- 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/