Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1356182pxp; Thu, 10 Mar 2022 04:02:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzibMItY2AfzSMIVrzpiMyo60VA4esVuBvwLALv2lKJxNDYL5L7v6K4dOMGm+LWhNK95Wf8 X-Received: by 2002:a05:6402:209:b0:416:5211:841f with SMTP id t9-20020a056402020900b004165211841fmr4042158edv.59.1646913769568; Thu, 10 Mar 2022 04:02:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646913769; cv=none; d=google.com; s=arc-20160816; b=Zo1Esbw5jA2V6QBqw24WOMkJ0xr9fgCY46M7dHGO3ZMjVipFSrQMQf10UKlnvck5FT uObk2mGnfI/WrYlMQ7WEsqHAzDu1+dgTf/Z8lRl5fcpjT56Ti8PVzRsQINBLOZV/MXuC MDyRsxxaUS7Y6FTy7VgTNXWGrtNfEC5Ej+n8Tzy7CtpV2HlrTTHfMaz3TC2BbtmKpdI7 wYhcapsW4KIidYxRQcyCQjpBb0PcrZ8mIp6SLATNw5aenqfHBK1gNnsnCAAkWJE8IzEC WnCMd9YSdvpiB+gnUQb0RLbvKz+xg7j7RswTouEsGBY692BADb4DF6qkYICupyJx+8Pj ok+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fwkGoCkG0C71fo1AtJVK+o7q5+K5z7/hkRewmRR47Cw=; b=N6KKSrlMuN9YMhPnFfyxxGvorQXV14HBTOaiuJVM9aFTyr9ljdeiGqbGtSDYJXSGUP WMjUTjy8YHZwlG8H8c0Ze/jGJZVy1CT728F8ZGI7JPxY7Xdsq+KsQ1xXX8rJQ73dYkTq DuH97OcDRflGW4wE3YVuItwRnAlUiniMAyrtyikQLq0bT9/2neaJqb3rlz9+GQ7dkge7 oK0TwlGar2LQ5wK3SSzmGQ88/d7yXeRXd8HqNtV+0tccWOSLbHxkiqLPOiS+MdGIwOJ7 DauBaF+OpMxg9Sky2EzHspFWpB4j0HtnZky9VUqJdDqnhd2yEErIEjs/qKon5ukQp6Xy eD8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dneg.com header.s=google header.b=Wr9uUhDQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dneg.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw23-20020a1709066a1700b006d0cc8f7418si2684941ejc.35.2022.03.10.04.02.23; Thu, 10 Mar 2022 04:02:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@dneg.com header.s=google header.b=Wr9uUhDQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dneg.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241436AbiCJLLt (ORCPT + 99 others); Thu, 10 Mar 2022 06:11:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241147AbiCJLLs (ORCPT ); Thu, 10 Mar 2022 06:11:48 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B14C513C9D4 for ; Thu, 10 Mar 2022 03:10:46 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id p15so11241579ejc.7 for ; Thu, 10 Mar 2022 03:10:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dneg.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fwkGoCkG0C71fo1AtJVK+o7q5+K5z7/hkRewmRR47Cw=; b=Wr9uUhDQ8g9dqgW2R7cnvs7E3r2b56tEpqnTojPp1y9LUuscjmau1axLzyJNgrtKf2 /RYXmgzw04/K93BtJbHCviyVP1Kms36mgdG3Q7dMPQZTMjP7jUDwDrWv0v4a/k7Swcdl g/ysQFNn1e3LIVecVSkWotubKzFFn+68CNDbsItvHBTCXjHYxLp3aSaNlb1H55LKuCuy dNy/JqZweDy4ZCyW3mBuYKb1DtSnDpDg88q3qQb2uzi96v/mJx+8yrGsZNAShi8UKSUZ WH7p4vqQN4jsViEg2sPeFjYJavM8Al8KE1PlAWqcIFU4NPXSelOpqhkq4oAWftJ7mkZH H8ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fwkGoCkG0C71fo1AtJVK+o7q5+K5z7/hkRewmRR47Cw=; b=ah9MszTN0zlJNoaLIwykpJFB8ctiTVv4lHcJ8qiOL2bPh3jsABeFJB5RVVZ2W3/JU1 F6R+MHCdZnmUxWU3lGSZoHs77QxWaNwZ0uTLTeuJeBNg/EC+0DmIwcKo/4pY/6aD/PzR 3fX1XYuxBFaXFmQltbb1x3eV1oSKLKTu6IjOL0DjkuhNIn3CQdgCzbLL2KzBcikyEvqN l5XS5WiBC55U0vppD/UdxOPowWNB8ET6BbFYzZV3Wg61wKjKr9mPdugRdK7eRWjGeh3L gm9yEYKTFJqGAUd3mGT6Hl+FWdzU6vV4eIQ8CXJHkuzjr7nEDhA3X5KdpjrqGSpFPiSV Jy7A== X-Gm-Message-State: AOAM530uJon/jA+8kUh0rD1j3tPVkBoFTDRQIs8WUIPSeLrc4EI0a4vy +pe9joHeS1/rFCdtBaMn8M++4H5IIawuUaaCog42hQ== X-Received: by 2002:a17:907:1c95:b0:6db:6b05:549c with SMTP id nb21-20020a1709071c9500b006db6b05549cmr3582753ejc.651.1646910645213; Thu, 10 Mar 2022 03:10:45 -0800 (PST) MIME-Version: 1.0 References: <164568221518.25116.18139840533197037520@noble.neil.brown.name> <893053D7-E5DD-43DB-941A-05C10FF5F396@dilger.ca> <20220224233848.GC8269@magnolia> <164600974741.15631.8678502963654197325@noble.neil.brown.name> In-Reply-To: <164600974741.15631.8678502963654197325@noble.neil.brown.name> From: Daire Byrne Date: Thu, 10 Mar 2022 11:10:08 +0000 Message-ID: Subject: Re: [PATCH/RFC] VFS: support parallel updates in the one directory. To: NeilBrown Cc: "Darrick J. Wong" , Andreas Dilger , Dave Chinner , Al Viro , Linux NFS Mailing List , linux-fsdevel@vger.kernel.org, LKML , Andreas Dilger Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just to add that I have also been testing this patch with heavy production workloads over high latency NFS clients (200ms) and have not seen any issues so far. As the latency increases, parallel operations for multiple client processes becomes ever more important for maintaining good aggregate throughputs, be it reads, writes or metadata. With 1000 client processes/threads we see the file creates per single directory increase from 3 per second to 1200 per second with this patch. It solves a real world application for us (high latency NFS clients) without having to redesign our workflows around deeper (hashed) directory structures. Much appreciated Neil. Daire On Mon, 28 Feb 2022 at 00:56, NeilBrown wrote: > > On Fri, 25 Feb 2022, Darrick J. Wong wrote: > > On Thu, Feb 24, 2022 at 09:31:28AM -0700, Andreas Dilger wrote: > > > On Feb 23, 2022, at 22:57, NeilBrown wrote: > > > > > > > > for i in {1..70}; do ( for j in {1000..8000}; do touch $j; rm -f $j ; done ) & done > > > > I think you want something faster here, like ln to hardlink an existing > > file into the directory. > > > > And probably written in C too.. > > > > (I am also not a fan of "PAR_UPDATE", since 'par' is already an English > > word that doesn't mean 'parallel'.) > > :-) > We already have DCACHE_PAR_LOOKUP for parallel lookups in a directory > (though it is really a lock bit and I think should be named as soch). > So it made sense to use DCACHE_PAR_UPDATE for parallel updates. > And then S_PAR_UPDATE for the inode flag to enable this seemed logical. > > But I agree that these names are sub-par :-) > > NeilBrown