Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp4103423rdh; Fri, 29 Sep 2023 11:07:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkss9ONw5qYv61QaA2lShAjFYN8jiqOkPW991rqOkpSGL9VhetZfzXgeNz0kahGU/OlaxY X-Received: by 2002:a17:903:4284:b0:1c3:4361:ca18 with SMTP id ju4-20020a170903428400b001c34361ca18mr4273811plb.5.1696010864836; Fri, 29 Sep 2023 11:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696010864; cv=none; d=google.com; s=arc-20160816; b=fCzdKwP3xQYwHirdY5/qt+vBk1vH8FKJIpaK01MafNQExp0ujQU2NNlSb2t6q2jzDz jSv6vrH/WxlAVMqcFcMMEzbBfDAPMEN4mSQxDtBDtUlL5BUSWX0ENWqnEtBuTpZR6Jn4 Pb/demkBDQaieYUIcuoEOEqxpO+bQBcKncqeOxPyOAPzQQ+8jbiA8d+6AEaA2ppuyilN b2SHakGhxiyyV7iKOo6BaJWLc82AVeEZR4VqFL/ahL/OLjo61kXVqeV5HLEahHZsm7Eu 9J7+J6QF4sYBdvyhEUhN02DK4pEmXndkH6rnn5xcqy0eJEwZ5W2lj5lQ53WY+yGjIQs9 Cc3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=UlyjKVqSNheBUUaPtMe4WybDN6izUixlaSlH1n/sPCQ=; fh=PJMzc3Hp2p3Dvzr5TvkhdjVsfQ/xiDeCtVytQiIqKjY=; b=WEVcb9CnUBQbLnBy3Ia5Ef10iXh3ze68QQjsaunNFUEgRCAS1S3JUZrFnpIYS8CZWJ f0XfxPUVcoscU+IM6neMCsItiUVBiF+RYMjI6VFnmJYstkBbzWVH6p6xIWmmcS4mMUkB Nc1KtULaXLVmOgzrZPk8RAvZ118SMI90vMxoiQev38oObTniY3Qzfz8u2tsISPQ1mvS+ BKveGaAJpwhcYdwWI8PQiSOtB+GptfGCsAijEp4VMvZf+VPV4Hb+++4QXRFOc8cx+9pV uOoz3J/1vJs60wL1kAf6qUXxBvw3cjOmL8xCabq5zvu8j+fyv7ATTiBubtwL8EqGIqB/ p6ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="VZplf/e6"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id kf12-20020a17090305cc00b001b89bd6fd59si15593789plb.215.2023.09.29.11.07.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 11:07:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="VZplf/e6"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 36B748083A94; Fri, 29 Sep 2023 07:11:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232925AbjI2OLA (ORCPT + 99 others); Fri, 29 Sep 2023 10:11:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232779AbjI2OLA (ORCPT ); Fri, 29 Sep 2023 10:11:00 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF41D1A8; Fri, 29 Sep 2023 07:10:58 -0700 (PDT) Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38TDePMj013370; Fri, 29 Sep 2023 14:10:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=UlyjKVqSNheBUUaPtMe4WybDN6izUixlaSlH1n/sPCQ=; b=VZplf/e64Nsg8SHaL3YsPJkNjF4y1x+E9Qe2Ny5PkEUDUk5rVuBvfYuc4iQPkn8lnLuc ewmBS3sNXf9yIgBI4BqoB8obOblsF3cOkwL53XBok3ecAsl8FgvqOI1J3BGmkdHaeqjq jMBWkNtQM6SPzo4E0AgueWk7KMaDgk+lxlZtvI9i1jZIJLbCyMNYY/jHWWbB8SZLfxMi D4viDd55bPEjxlrFrwkeX7Au5+Xftq3jDM2F9XrF3qH+JESsRqrIhxe6ezGcuhAcWtVH p7NWoEejh4P5BHr3BkXv+avK8NRu7tG61m48c8C59W1kFAnOng8og8ZImsAbGc1vyUT3 Cg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tdxgpb873-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Sep 2023 14:10:53 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38TDf9K9017705; Fri, 29 Sep 2023 14:10:53 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tdxgpb85r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Sep 2023 14:10:53 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38TE34TW008399; Fri, 29 Sep 2023 14:10:51 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3taabtdfx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Sep 2023 14:10:51 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38TEAof621562034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Sep 2023 14:10:50 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0620120043; Fri, 29 Sep 2023 14:10:50 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F6CB20040; Fri, 29 Sep 2023 14:10:48 +0000 (GMT) Received: from li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com.com (unknown [9.43.84.228]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 29 Sep 2023 14:10:48 +0000 (GMT) From: Ojaswin Mujoo To: linux-ext4@vger.kernel.org, "Theodore Ts'o" Cc: Ritesh Harjani , linux-kernel@vger.kernel.org, Jan Kara Subject: [PATCH 0/3] Optimize __ext4_block_zero_page_range() for unwritten buffers Date: Fri, 29 Sep 2023 19:40:42 +0530 Message-Id: X-Mailer: git-send-email 2.39.3 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: n2iZnCLwg90Oo1SuT_ZbK4-AmGAFNeRk X-Proofpoint-ORIG-GUID: 3pvBxqYj0MDNNakloeEavPHid3IGJ9a4 Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-29_11,2023-09-28_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=721 bulkscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309290120 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 29 Sep 2023 07:11:01 -0700 (PDT) As per discussion with Jan here [1], this patchset intends to exit early from __ext4_block_zero_page_range() incase the block we are about to zero (partially) is unwritten and unmapped, since such a block doesn't require zeroing. Further, also make sure that calls to ext4_zero_partial_blocks() truncate the page cache completely beforehand, so that they don't rely on ext4_zero_partial_block() -> __ext4_block_zero_page_range() to zero out non block aligned edges of pagecache. Reviews and comments are appreciated! Regards, ojaswin [1] https://lore.kernel.org/linux-ext4/20230914141920.lw2nlpzhcxwuz2y6@quack3/ Ojaswin Mujoo (3): ext4: treat end of range as exclusive in ext4_zero_range() ext4: truncate complete range in pagecache before calling ext4_zero_partial_blocks() ext4: Skip unwritten buffers in __ext4_block_zero_page_range() fs/ext4/extents.c | 20 +++++++++++++------- fs/ext4/inode.c | 7 +++++-- 2 files changed, 18 insertions(+), 9 deletions(-) -- 2.39.3