Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967393Ab3E3DFZ (ORCPT ); Wed, 29 May 2013 23:05:25 -0400 Received: from mail-ve0-f173.google.com ([209.85.128.173]:34868 "EHLO mail-ve0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965522Ab3E3DFQ (ORCPT ); Wed, 29 May 2013 23:05:16 -0400 MIME-Version: 1.0 In-Reply-To: References: <20130525165710.GC25399@ZenIV.linux.org.uk> <51A1040A.80003@schaufler-ca.com> Date: Thu, 30 May 2013 12:05:15 +0900 X-Google-Sender-Auth: XYCvSPF8Hc9Shn8sHZQ29FuD0Wo Message-ID: Subject: Re: Stupid VFS name lookup interface.. From: Linus Torvalds To: Eric Paris Cc: James Morris , Casey Schaufler , Al Viro , Linux Kernel Mailing List , Eric Paris , James Morris 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: 972 Lines: 22 On Thu, May 30, 2013 at 10:28 AM, Eric Paris wrote: > > How do I tell what is taking time inside selinux_inode_permission? Go to "annotate" (just press 'a' when the function is highlighted), which will show you the disassembly and the cost of each instruction. That's when you really want to use "-e cycles:pp" to get the instruction-level profile right, though. Otherwise the cost will usually be assigned to the instructions following the expensive one. And I can tell you that the cost is almost certainly the cache miss on the inode->i_security accesses. Which was the reason for that second patch that moved "sid" to the inode->i_sid field and avoided the extra dereference. 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/