Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4015708imm; Mon, 15 Oct 2018 07:50:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV636U00w0yK8qFX6IARacxSaF+Fk0VrMG+bQMU7WhbKIZD7KQMqFWL0+QKyFTUOM2b5TWM9Q X-Received: by 2002:a62:aa17:: with SMTP id e23-v6mr17981261pff.211.1539615056059; Mon, 15 Oct 2018 07:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539615056; cv=none; d=google.com; s=arc-20160816; b=d1tiM5UcyLbPeYrYoVgE9pTafUHinAJGiDVi7TwKfdqHHQUJb/4/RDwUNkWoCAp290 GdQHSjyR+ny0oNIvSPiqw5l0PlPtFKrsXkKTsdwA9IQXWj4iT6pO1Sx4fu9XVqhK8Js2 OXFRi/Fp2WP1HUs2pBc18SWOG+dOExQ3iM4K9xu2MxJZO2FfOUrQHKubpbvDnmantol8 FACgJ64CVBfTj0MMuxkVnzoUK7/Yd8XvfCM/5KZUgFalwKachCKMCy7qKDUl6qzQTAXy 4yGlpZ+3Kk8H0U0RZd54vEhAYChs+nZuFqxwvS99y2H41+Di3Quw3ZYzNFm5rEhFvxCF BzGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=l5+boXJtzLEVyan9ZQRkbWHq+XC8FkJ5CIiMpv3LsWc=; b=e6l7AKr0DvwVgcu7QWNO9NA8D7vGOEZ1lv2g93XnxjYHMiD5+ZUZeD4vyEr3B30CPz UUtRGJ0VyUOnA62rI9qtLKrTzTvzp8yYsXGCEYoARiPlgfiy39v/zmcx97tLukELxBjl NUGUMNEu1/u2sdQupfL8qoZ3tda9iMuhi2iiuRCqgwz8rA7ZJAVdVLg/iD9AetOM+YyE WgCy8f6MnTo51wGCdshnm9vCrWWGAxVXsVVoSntD/8qVCYq4bJ10wh2CbFpU0xw2O1PY D07nFdA0zDysKMgepRXV+uHSJwnn8G5mp4EO/r5X/oM0jgDYkj2nuQJdbtOeQ9fPAvhh xD4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=JrVJzn4q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m65-v6si13093950pfc.75.2018.10.15.07.50.40; Mon, 15 Oct 2018 07:50:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=JrVJzn4q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbeJOWfp (ORCPT + 99 others); Mon, 15 Oct 2018 18:35:45 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:37461 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726697AbeJOWfp (ORCPT ); Mon, 15 Oct 2018 18:35:45 -0400 Received: by mail-io1-f66.google.com with SMTP id m16-v6so14445299ioj.4 for ; Mon, 15 Oct 2018 07:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l5+boXJtzLEVyan9ZQRkbWHq+XC8FkJ5CIiMpv3LsWc=; b=JrVJzn4q0zbIEn1tYeIc2/yg308z7pL7iDtP5bO96zXzDbmpTAiXVk6DZ2y2ATjObE oIQPaBLKr2cMUk21VrVwRnUta8YbtT4+ajaXNpO/JK/zKIFAI/Z/RWvKY4755S0D8OEf Z3RU6dSOZxrrKEXp7oyJ6rodEqS5/wEfdq8Go= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l5+boXJtzLEVyan9ZQRkbWHq+XC8FkJ5CIiMpv3LsWc=; b=eOLzD9XGOsPSNs4lDij2pE9ObpFz7om7tspWvEZ5X8bgTMsbC5vr5Ceo0eZwCeKeay hoVdf76wZf8DgnEhzVj8fBZBBgekXaIKcXrhGj0v4ty+ZeQbYM7mX6q2Czq9EsJJ/si6 wmDPF6KEsJPrvrmu1bOcaXXLFTNXSUTnUUNUJOxMIybpzaGv0IThvdG1HVPNRJuvJV/7 4FMLxLCSctr00DD3QMsxTWE+ZhVrgsxaeOfaoBmSBI2WTT+8VrvZBvDfPbt/xL9+xoC2 jQ7NYU/m1B4A29nVQWsWH+K2g5r9L2hj9soCZzcf9ldJhtkLbecfc/i32Ra7GV9TOzRA oQtA== X-Gm-Message-State: ABuFfohVEECvRlujP7orZBXjr9gdmplcHvTFNDuo77jzxo5pVAYuPacE HeMn75KgtGRCACD6cUYBbQfHctQZBjzPGjV5bdt20w== X-Received: by 2002:a6b:acc4:: with SMTP id v187-v6mr11606326ioe.246.1539615009361; Mon, 15 Oct 2018 07:50:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:bf41:0:0:0:0:0 with HTTP; Mon, 15 Oct 2018 07:50:08 -0700 (PDT) X-Originating-IP: [212.96.48.140] In-Reply-To: <20181011151700.80485-1-dschatzberg@fb.com> References: <20181011151700.80485-1-dschatzberg@fb.com> From: Miklos Szeredi Date: Mon, 15 Oct 2018 16:50:08 +0200 Message-ID: Subject: Re: [PATCH v2] fuse: enable caching of symlinks To: Dan Schatzberg Cc: Tejun Heo , kernel-team , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 11, 2018 at 5:17 PM, Dan Schatzberg wrote: > FUSE file reads are cached in the page cache, but symlink reads are > not. This patch enables FUSE READLINK operations to be cached which > can improve performance of some FUSE workloads. > > In particular, I'm working on a FUSE filesystem for access to source > code and discovered that about a 10% improvement to build times is > achieved with this patch (there are a lot of symlinks in the source > tree). Pushed a modified version to for-next in the fuse tree. One important change is to zero-terminate the link (do not rely on i_size to provide the proper zero termination for fear of a trivial information leak vector). Other changes are: use of inode_nohighmem(), which seems to be the idiomatic way of preventing highmem, and merging the non-cached and cached code paths as much as possible. Thanks, Miklos