Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1811625pxk; Fri, 2 Oct 2020 21:50:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwksZfpekQYcSucUnCSL0CchwRlByBcoeBe6eH9gnqLLm9Ey2sYO5jLIAvHtbasYxA9cyEs X-Received: by 2002:a17:906:7695:: with SMTP id o21mr5159171ejm.176.1601700653573; Fri, 02 Oct 2020 21:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601700653; cv=none; d=google.com; s=arc-20160816; b=ixcYaOBGtUr1sn5DB+/fAW83MKpqTrHVigpISjRg4yPeSTmWVkZCUC0m0mVXw+skfE kx7ZHFPIGuR0D69R6zBxcHzj6wDFgd462T2gvHv4e844SiFhLBCvoSpVJFp0Jm88kE52 DFOfUsKmGyytMHVWFTxZwt8gE6qUVczfKPmkYn6XNCYBJxcPhTjXSatnGf1NV0wXKAC/ sUeHNEemHBo1Oh+DDhY1Y0zFmzCneJBeV/rOzXWc1TVdzehgJOeGlPuMu1x6yEf6oBOp C7Nn2kVVAP3OpfDhoqjfvjqIRIIr9S90NOCkjxNZl6+m/bqaKnSHTRMAJvrqkiQRxl/6 hPqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=MzgTzu2RYHGOOPdhMUOrQENwAXe1ngUF61FcIke2Sn0=; b=yza7pZzlRiCnVZCjxnkaLXDyYlo1FyQhvOMR+TNC0ghGFZqikxw7yXTtdLZEo3fC8A J1lm7pPI0hakqEcl5vjGU8tfzqxo57IlpoDLBeDBwK3JSiI4xfgTxxP/nIn9Q1ImlJHC Ga8J/k4qoYdhfnDTfJlMyNtDxqpVzLAUCG3h+I9fykpBdIfA+wxPD1RFRcjMyjtu29xf NPOZthw+Cb0isd5bTSGwW5Z4VqKJyeElIpNDNdzgFQjVt8GSObvW4kQiBEsggyiict7F IUrI7i4ChlzN9rs6WMFTsveSDm1NBxYnz37oaASIWkaxB2QMQAwaII3RFyF471kBzz6n pwoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r6si756386eji.73.2020.10.02.21.50.30; Fri, 02 Oct 2020 21:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725616AbgJCEtT (ORCPT + 99 others); Sat, 3 Oct 2020 00:49:19 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:50776 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725446AbgJCEtS (ORCPT ); Sat, 3 Oct 2020 00:49:18 -0400 Received: from callcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 0934n6HF010588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 3 Oct 2020 00:49:06 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id D29E842003C; Sat, 3 Oct 2020 00:49:05 -0400 (EDT) Date: Sat, 3 Oct 2020 00:49:05 -0400 From: "Theodore Y. Ts'o" To: Ritesh Harjani Cc: linux-ext4@vger.kernel.org, jack@suse.cz, dan.j.williams@intel.com, anju@linux.vnet.ibm.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv3 1/1] ext4: Optimize file overwrites Message-ID: <20201003044905.GF23474@mit.edu> References: <88e795d8a4d5cd22165c7ebe857ba91d68d8813e.1600401668.git.riteshh@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88e795d8a4d5cd22165c7ebe857ba91d68d8813e.1600401668.git.riteshh@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Sep 18, 2020 at 10:36:35AM +0530, Ritesh Harjani wrote: > In case if the file already has underlying blocks/extents allocated > then we don't need to start a journal txn and can directly return > the underlying mapping. Currently ext4_iomap_begin() is used by > both DAX & DIO path. We can check if the write request is an > overwrite & then directly return the mapping information. > > This could give a significant perf boost for multi-threaded writes > specially random overwrites. > On PPC64 VM with simulated pmem(DAX) device, ~10x perf improvement > could be seen in random writes (overwrite). Also bcoz this optimizes > away the spinlock contention during jbd2 slab cache allocation > (jbd2_journal_handle). On x86 VM, ~2x perf improvement was observed. > > Reported-by: Dan Williams > Suggested-by: Jan Kara > Signed-off-by: Ritesh Harjani Thanks, applied. - Ted