Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp127959rwb; Wed, 30 Nov 2022 23:23:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf4yZUMUeZzn5k2BAvjG5uLOut+xoOOBqlPp8mgAicqDZ8t2UBRAyerGIIzI0TOoyi0jPStJ X-Received: by 2002:a17:902:8f96:b0:189:3803:23e6 with SMTP id z22-20020a1709028f9600b00189380323e6mr43800477plo.77.1669879404254; Wed, 30 Nov 2022 23:23:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669879404; cv=none; d=google.com; s=arc-20160816; b=IUsOvw0lTVYsr79GbK10RZbhOPjV6iCLhvCZ+0Kzt1ZNsVwi7he/1V50z8LRXDXY7f YuW+kKSBiFXiE8/5CXj+6X0u5zRg1r3ICejpE/XSUGcBuIfgWuCCZ0+IG7QtWvBnjOm2 TdvWWCn6X5uao5knQKZ6FCPqdrDBB24fPTseIKxutAy4i17ds2eOc5zRQ5ZdizqKkMpB UvGhrBaGhRKkE9ln0NZJtfcOX/p/+7Q7DXEYvlsZWS6FLXprOJal2eMykVZbK0E/IVVT s2hVQrL6sSpaRb80yU7V9cpWU6DCSkuDtE7OyT+LpiBw/NFF0EVCHHnzovJWsTazwBtv waWA== 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:dkim-signature; bh=yUiTV4CLMohxeQaqXSR6njOLhtmUcg91g73uzEJvSLc=; b=yZreurO7IWCmtTLelyHHRdYLo2nzR0PbFoyrRz+xlWq8uN+9/E8pszBiSGd3vnTKFf Uhs5gVnFsPfHQHlZCYCWStySqSlBorKHSTb8nIGzYbIx/wByaqci3MHdQjiXdnmHcKn8 Yuac5Dm6f/ARCRUBwxHhAojuBA/hXfftp2dG8fSvWBSpKPMSIaMeB3A3kTQUH0L9l82g q6SdnjFfcVHeHWGBYe5ZyOKHZlawJAeTbsKobSgkR49qZU+l9U0fnbihv3xRYoeTH+nK pmkounNrcsShzegtg7CNDbkZbNtfq723IT1Z2A1l7QRJVgw2xZHEWc+DA+3PKe12ZE4I zPrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DSImRl1m; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a17090282c700b0017f97fe774fsi3252105plz.445.2022.11.30.23.23.08; Wed, 30 Nov 2022 23:23:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-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=@gmail.com header.s=20210112 header.b=DSImRl1m; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbiLAHHD (ORCPT + 99 others); Thu, 1 Dec 2022 02:07:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbiLAHHD (ORCPT ); Thu, 1 Dec 2022 02:07:03 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40CD685660 for ; Wed, 30 Nov 2022 23:07:02 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id d3so782026plr.10 for ; Wed, 30 Nov 2022 23:07:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yUiTV4CLMohxeQaqXSR6njOLhtmUcg91g73uzEJvSLc=; b=DSImRl1mqMp37HIVX/T4QXN0lsm0UPQTC6F2joKrU6aRLc4Ex/ukzZxZWTFxHu6nVm pupEEh8RJbvUXDx6mv5Ef3u0fTMOyjbEHRgDnHip/nIN1PpIlKr6NdAULjEHTXOpsqBD uVteqe3949wQYKWPlPFM04fboDpryrbQd2dh2Rekmp53IzXQJraF+ntR0oc7+afg2Q+4 /wNAyS1nCsJ7V/Vq8cSnvxWFsGnhforeSYRT2623W4xVCpoHErdWwjWzp4zB+wOVtDQ+ c5DU0a+o8ikmAhngEqRu0t9kukKv2l76eR2FdGy1eCPu5cQIAEiUWsRvgKBZKXITuv8P i7yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yUiTV4CLMohxeQaqXSR6njOLhtmUcg91g73uzEJvSLc=; b=AVK1hPVAa8GVjGxLl1si3qUtr/BFkFmRArJFZSw6syynSvElmMNlmsibp0fNLPVkOr GMm95UXdqwwqH5SKAW83VCGmr4Mg088Xvc0eI2D/hxcsdwsQVIfN9an6strp3NFcZOta YcWAkuB8DreOTJCQF2FqL9KBMUU6w7vpNHRbV/YQV06cQfac5n7Tci6TRU/KrtxN09zF hvT7WtcEw+N0TSpIlXp/viyhXgfqAOI7+cgPg3COpkCoZ/m12zFarpnjHUe0fHezWtY0 uQ5g8aGJALwxglyqzAc8zR1d0mrhCK0GrPgP/5Y0WoE7GbgyNS+60C7gmuC3312T5rXA wyrA== X-Gm-Message-State: ANoB5pkUCY7TrT7umvTZqamvG9pGZitdk6UzLMhdysDkJyZt0BT2284d k4W2qpUScrSTbdYyuLowrwQ= X-Received: by 2002:a17:90a:440f:b0:218:9894:62c1 with SMTP id s15-20020a17090a440f00b00218989462c1mr60527733pjg.205.1669878421670; Wed, 30 Nov 2022 23:07:01 -0800 (PST) Received: from localhost ([2406:7400:63:f20b:f6ca:e236:f59f:8c18]) by smtp.gmail.com with ESMTPSA id x16-20020aa79570000000b00574898527c8sm2492559pfq.74.2022.11.30.23.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 23:07:01 -0800 (PST) Date: Thu, 1 Dec 2022 12:36:55 +0530 From: "Ritesh Harjani (IBM)" To: Jan Kara Cc: Ted Tso , linux-ext4@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH 4/9] ext4: Drop pointless IO submission from ext4_bio_write_page() Message-ID: <20221201070655.cugep2fdrtntp67y@riteshh-domain> References: <20221130162435.2324-1-jack@suse.cz> <20221130163608.29034-4-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221130163608.29034-4-jack@suse.cz> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-ext4@vger.kernel.org On 22/11/30 05:35PM, Jan Kara wrote: > We submit outstanding IO in ext4_bio_write_page() if we find a buffer we > are not going to write. This is however pointless because we already > handle submission of previous IO in case we detect newly added buffer > head is discontiguous. So just delete the pointless IO submission call. Agreed. io_submit_add_bh() is anyway called at the end for submitting buffers. And io_submit_add_bh() also has the logic to: 1. submit a discontiguous bio 2. Also submit a bio if the bio gets full (submit_and_retry label). Hence calling ext4_io_submit() early is not required. I guess the same will also hold true for at this place. https://elixir.bootlin.com/linux/v6.1-rc7/source/fs/ext4/page-io.c#L524 But this patch looks good to me. Feel free to add: Reviewed-by: Ritesh Harjani (IBM) > > Signed-off-by: Jan Kara > --- > fs/ext4/page-io.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c > index 2bdfb8a046d9..beaec6d81074 100644 > --- a/fs/ext4/page-io.c > +++ b/fs/ext4/page-io.c > @@ -489,8 +489,6 @@ int ext4_bio_write_page(struct ext4_io_submit *io, > redirty_page_for_writepage(wbc, page); > keep_towrite = true; > } > - if (io->io_bio) > - ext4_io_submit(io); > continue; > } > if (buffer_new(bh)) > -- > 2.35.3 >