Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757660Ab3IAPch (ORCPT ); Sun, 1 Sep 2013 11:32:37 -0400 Received: from mail-ve0-f179.google.com ([209.85.128.179]:61400 "EHLO mail-ve0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757624Ab3IAPcf (ORCPT ); Sun, 1 Sep 2013 11:32:35 -0400 MIME-Version: 1.0 In-Reply-To: References: <1375758759-29629-1-git-send-email-Waiman.Long@hp.com> <1375758759-29629-2-git-send-email-Waiman.Long@hp.com> <1377751465.4028.20.camel@pasglop> <20130829070012.GC27322@gmail.com> <52200DAE.2020303@hp.com> Date: Sun, 1 Sep 2013 08:32:34 -0700 X-Google-Sender-Auth: GQKSvguWSuMN15kaGmREW62wqrg Message-ID: Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount From: Linus Torvalds To: Sedat Dilek Cc: Waiman Long , Ingo Molnar , Benjamin Herrenschmidt , Alexander Viro , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner , linux-fsdevel , Linux Kernel Mailing List , Peter Zijlstra , Steven Rostedt , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1483 Lines: 34 On Sun, Sep 1, 2013 at 3:01 AM, Sedat Dilek wrote: > > Looks like this is now 10x faster: ~2.66Mloops (debug) VS. > ~26.60Mloops (no-debug). Ok, that's getting to be in the right ballpark. But your profile is still odd. > Samples: 159K of event 'cycles:pp', Event count (approx.): 76968896763 > 12,79% t_lockref_from- [kernel.kallsyms] [k] irq_return > 4,36% t_lockref_from- [kernel.kallsyms] [k] __ticket_spin_lock If you do the profile with "-g", what are the top callers of this? You shouldn't see any spinlock load from the path lookup, but you have all these other things going on.. > 4,36% t_lockref_from- [kernel.kallsyms] [k] __acct_update_integrals > 4,07% t_lockref_from- [kernel.kallsyms] [k] user_exit > 3,12% t_lockref_from- [kernel.kallsyms] [k] local_clock > 2,83% t_lockref_from- [kernel.kallsyms] [k] lockref_get_or_lock > 2,73% t_lockref_from- [kernel.kallsyms] [k] kmem_cache_alloc > 2,62% t_lockref_from- [kernel.kallsyms] [k] __d_lookup_rcu You're spending more time on the task stats than on the actual lookup. Maybe you should turn off CONFIG_TASKSTATS..But why that whole irq_return thing? Odd. Linus -- 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/