From patchwork Mon Sep 15 16:35:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 37417 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 75745203E6 for ; Mon, 15 Sep 2014 16:36:11 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id m15sf2409360wgh.3 for ; Mon, 15 Sep 2014 09:36:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:in-reply-to:user-agent:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-disposition; bh=Ab/W7if27koObdgZCyZMU0B+55J/8BEQZiSzJ9XXx7Y=; b=EANWEgj4WCCJUYJbZgI4lluQUEsBvXAHERTjWWELpEC5amokiA/aDzU9TTM1Hdghta PzaPC2u3bLruhS/loqBUjZ5yzWeVTDWrA8TF1AxscVe1HltdfhHnMR2i9/nWrEd33sRn TqMObBizE0YtLMAkMjP1AzLpS4AHQCniC7/DMdEIehNw/hz/5nzcRy+RpBWpYfDThrrn SoOPpu7KWNfOGG8jVb5gR7JBWa2zVzKtm/RyLO9QS9UG1ZJgkMsNdjPBvNYjbNfaTdxw o6ygrnCqZYZs3+2b6cufin7/EWUL6K2Ez7rQog2By3VN6JTq8TsShW95OcmkEoPEPw3J rY4A== X-Gm-Message-State: ALoCoQmlwBqDtTqmBXIGKrjs0Q4yjRVe9wWZd0L0TQaSoWCb1BQixUOaz+hwIIbFc6rmA1D8Zqr7 X-Received: by 10.180.72.141 with SMTP id d13mr1238321wiv.2.1410798963875; Mon, 15 Sep 2014 09:36:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.226 with SMTP id v2ls393571lav.50.gmail; Mon, 15 Sep 2014 09:36:03 -0700 (PDT) X-Received: by 10.152.7.212 with SMTP id l20mr29913692laa.7.1410798963667; Mon, 15 Sep 2014 09:36:03 -0700 (PDT) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [2a00:1450:4010:c04::22e]) by mx.google.com with ESMTPS id jf6si19933206lac.14.2014.09.15.09.36.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Sep 2014 09:36:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) client-ip=2a00:1450:4010:c04::22e; Received: by mail-lb0-f174.google.com with SMTP id 10so4746859lbg.5 for ; Mon, 15 Sep 2014 09:36:00 -0700 (PDT) X-Received: by 10.152.204.231 with SMTP id lb7mr27776602lac.44.1410798960401; Mon, 15 Sep 2014 09:36:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp244842lbb; Mon, 15 Sep 2014 09:35:59 -0700 (PDT) X-Received: by 10.68.195.74 with SMTP id ic10mr41223583pbc.93.1410798958849; Mon, 15 Sep 2014 09:35:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb1si23874633pbb.239.2014.09.15.09.35.58 for ; Mon, 15 Sep 2014 09:35:58 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753826AbaIOQf5 (ORCPT + 1 other); Mon, 15 Sep 2014 12:35:57 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60926 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753172AbaIOQf4 (ORCPT ); Mon, 15 Sep 2014 12:35:56 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by gateway2.nyi.internal (Postfix) with ESMTP id CA24620D2F for ; Mon, 15 Sep 2014 12:35:55 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Mon, 15 Sep 2014 12:35:55 -0400 X-Sasl-enc: UrPasFMcWNKxghZTTITStG1nrS+cyTvuCAjzaVgsFQ8b 1410798955 Received: from localhost (unknown [24.22.230.10]) by mail.messagingengine.com (Postfix) with ESMTPA id 67BD66800A8; Mon, 15 Sep 2014 12:35:55 -0400 (EDT) Date: Mon, 15 Sep 2014 09:35:54 -0700 From: Greg KH To: Linus Torvalds Cc: Josef Bacik , stable , Andi Kleen , linux-fsdevel , Al Viro , Christoph Hellwig , Chris Mason Subject: Re: Name hashing function causing a perf regression Message-ID: <20140915163554.GC15712@kroah.com> References: <54134EFA.2030101@fb.com> <541364DE.5030104@fb.com> <54136EEF.4050209@fb.com> <54170C08.5070603@fb.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Original-Sender: greg@kroah.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22e as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-Disposition: inline On Mon, Sep 15, 2014 at 09:22:57AM -0700, Linus Torvalds wrote: > On Mon, Sep 15, 2014 at 8:55 AM, Josef Bacik wrote: > > > > I can't test on 3.17 proper since the Fusion IO driver doesn't build > > properly there and I'm not being paid to work on it anymore so I'm not > > fixing it ;). Thanks for fixing this, I've pulled back 99d263d4c5b2 which > > will do us just fine. > > Ok. I'm cc'ing stable to know that > > 99d263d4c5b2 ("vfs: fix bad hashing of dentries") > > should be added to the queues for 3.10+. > > Greg&co - it's a simple fix for a performance regression. Not > end-of-the-world, but if it ends up being in the FB kernel trees, > might as well get it back-ported to the other stable trees too. > > The other performance issues I found are actually potentially worse, > but they aren't regressions and they hit only when using namespaces. > Which mostly nobody does on old kernels anyway. More of a "systemd > uses namespaces for /tmp, and then it's quite noticeable as slowing > down pathname lookups there if you benchmark it". > > So the single commit Josef mentions is likely sufficient for stable. Thanks, now queued up. Note, I had to change the 3.10-stable patch a bit due to some rejects. Here's a diff of the diffs to show the difference if anyone wants to check it. thanks, greg k-h --- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- queue-3.16/vfs-fix-bad-hashing-of-dentries.patch 2014-09-15 09:27:57.072950053 -0700 +++ queue-3.10/vfs-fix-bad-hashing-of-dentries.patch 2014-09-15 09:29:06.851839582 -0700 @@ -76,13 +76,13 @@ --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -106,8 +106,7 @@ static inline struct hlist_bl_head *d_ha +@@ -108,8 +108,7 @@ static inline struct hlist_bl_head *d_ha unsigned int hash) { hash += (unsigned long) parent / L1_CACHE_BYTES; -- hash = hash + (hash >> d_hash_shift); -- return dentry_hashtable + (hash & d_hash_mask); -+ return dentry_hashtable + hash_32(hash, d_hash_shift); +- hash = hash + (hash >> D_HASHBITS); +- return dentry_hashtable + (hash & D_HASHMASK); ++ return dentry_hashtable + hash_32(hash, D_HASHBITS); } /* Statistics gathering. */ @@ -96,7 +96,7 @@ #include #include "internal.h" -@@ -1629,8 +1630,7 @@ static inline int nested_symlink(struct +@@ -1647,8 +1648,7 @@ static inline int can_lookup(struct inod static inline unsigned int fold_hash(unsigned long hash) {