Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1246422pxv; Fri, 16 Jul 2021 05:12:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYKa0N2+AiQEFsawx9W2jkreutJHChZ2Olg8TbitUbzaN9736SXTYQu9j/i8Yxmm36SQqO X-Received: by 2002:a05:6402:16:: with SMTP id d22mr14136307edu.101.1626437565482; Fri, 16 Jul 2021 05:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626437565; cv=none; d=google.com; s=arc-20160816; b=iPuOVrfhkkMd3rZRj2+p8VKeX6R0nsTEG7Ib+UTjiGYYGVID1O9G5aNCm9alvV1wOe x/sj5UIxBf60Jv9tiVJ8cC9RIZXefYsIRYH2lFod3T4aPO9vp+Z2wZlmuDH5JRskGsOc vZlqR44os95WXenqa7208CdwpeURcF0h7KOuhOk124xcnT4g8o9govRVopUxvho4Cfp0 tF2U9fhoLFXbdfe+hAfNTlCbeYzaVQqdVhwp6bM1DfbQ5tlHVOjTDRcaq8EVRSsclpij r8M7Kjwp6SBykiloyw/c2ShV9nKxpgQCzUHUxP9g2LnAK5PIrYNosQYXsbl/Q8hAl+G9 4xXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=2upoyvS7msE+FSuq8d5AaDbw03lJg3Clf9n0PItRnDs=; b=oeTxqkUfAUq8H9T6rMhfeRJz99T3zXyJ+Fdx+CGYtVIpDI5oB8JRPyCy3u2DUik3wx S69q7umXS0rVvAsXNhc7gHd2VxXYfTZMLTtWPCW889DfUt4QPh6bmc2kzxfVQaqDGITT fKIIVOQ2YdohhJqi5JetmP8dtFpEVHegQvtNtnya+YJZlaFyQBSdTwcGX2WOG+Yl7lir TIKURyYRX9p0ULz/1QGuWbeXlAz0a09Zz5h1CwzLncCrfVEZOMlBePLAka8vbQNt5TE5 oV1g/L0RGeRuW+pWdZA82IPa9xtgzipGM9bb5QblH+GUbBkUjCPmtW5iskmroxcOA5oU 9RpA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si10730051edy.387.2021.07.16.05.12.20; Fri, 16 Jul 2021 05:12:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232691AbhGPMPN (ORCPT + 99 others); Fri, 16 Jul 2021 08:15:13 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:11433 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232024AbhGPMPM (ORCPT ); Fri, 16 Jul 2021 08:15:12 -0400 Received: from dggeme752-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GR9530w7RzcdT2; Fri, 16 Jul 2021 20:08:55 +0800 (CST) Received: from huawei.com (10.175.127.227) by dggeme752-chm.china.huawei.com (10.3.19.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 16 Jul 2021 20:12:12 +0800 From: Zhang Yi To: CC: , , , , Subject: [PATCH v3 0/4] ext4: improve delalloc buffer write performance Date: Fri, 16 Jul 2021 20:20:20 +0800 Message-ID: <20210716122024.1105856-1-yi.zhang@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggeme752-chm.china.huawei.com (10.3.19.98) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, Changes since v2: - Patch 3: fix misleading comment about data truncate in the error path of ext4_write_inline_data_end(). Thanks, Yi. -------- Changes since v1: - Patch 1: add comments to explain why and how to update i_disksize in ext4_da_write_end(). - Patch 3: update i_disksize only if copied is not zero and drop i_size_changed parameter, also drop unused EXT4_STATE_JDATA and i_datasync_tid update code hook. Original description: This patchset address to improve buffer write performance with delalloc. The first patch reduce the unnecessary update i_disksize, the second two patch refactor the inline data write procedure and also do some small fix, the last patch do improve by remove all unnecessary journal handle in the delalloc write procedure. After this patch set, we could get a lot of performance improvement. Below is the Unixbench comparison data test on my machine with 'Intel Xeon Gold 5120' CPU and nvme SSD backend. Test cmd: ./Run -c 56 -i 3 fstime fsbuffer fsdisk Before this patch set: System Benchmarks Partial Index BASELINE RESULT INDEX File Copy 1024 bufsize 2000 maxblocks 3960.0 422965.0 1068.1 File Copy 256 bufsize 500 maxblocks 1655.0 105077.0 634.9 File Copy 4096 bufsize 8000 maxblocks 5800.0 1429092.0 2464.0 ======== System Benchmarks Index Score (Partial Only) 1186.6 After this patch set: System Benchmarks Partial Index BASELINE RESULT INDEX File Copy 1024 bufsize 2000 maxblocks 3960.0 732716.0 1850.3 File Copy 256 bufsize 500 maxblocks 1655.0 184940.0 1117.5 File Copy 4096 bufsize 8000 maxblocks 5800.0 2427152.0 4184.7 ======== System Benchmarks Index Score (Partial Only) 2053.0 Zhang Yi (4): ext4: check and update i_disksize properly ext4: correct the error path of ext4_write_inline_data_end() ext4: factor out write end code of inline file ext4: drop unnecessary journal handle in delalloc write fs/ext4/ext4.h | 3 - fs/ext4/inline.c | 120 ++++++++++++++++++------------------- fs/ext4/inode.c | 150 ++++++++++++----------------------------------- 3 files changed, 99 insertions(+), 174 deletions(-) -- 2.31.1