Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5510171pxb; Wed, 26 Jan 2022 13:46:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkm/NJko+ZnYNaDHCINBRBwGInu6GrxFy2T+qTSRmMtSE4K54tLowkM5dX2qVFjWzy+kpS X-Received: by 2002:a17:907:1c0b:: with SMTP id nc11mr489123ejc.665.1643233584499; Wed, 26 Jan 2022 13:46:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643233584; cv=none; d=google.com; s=arc-20160816; b=qsVY8FJMX3vpd3a14+JeYQmZEbDWILy4T4z+7vxUNyerjPgEWpOV0+5Umqu76zrn0I KbB0QOJJ7lDGu2b48F8eq2JXaa5OFK/h42ERuKYTQJEuaUwz7FIhXnhjic94Gk0TP2DL 2RvwElndSTzvnBQdXKM4d/2D8e9+OpeXXLCB9uo1uKkfGZBtc2h5rLIdl1hyzGwyRGPd 8QxkLoRrhzW7n+5qbPOFJ5jhQjJgYcMG/TKklxj6zwmZEaUlPKUHRqycFzOjllqr6Wj0 M0MZY5sNQmKsrdCT1MsoC8luuf7n2JVnRQTviSWI0NKDl2IKYMoRtaJELCYuty8Xf7OX tdYA== 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=axzolPy+BPljfmZmSANvL0Zmeb7gY16v/jqcglkbVZk=; b=PS9oa0C/icNLJMHQPeZ4TUxBLrpS0ZVf0WNJf3F0RAFQImGGTATXJEy+O/IIsvc0rz rvwspS80XUhMiNKWxZ2qZAG2VWzvaxoR9zw03B0Hf7dkSK83fU+aY0BPcPAYldRJiEEw JJATL+t970XAqMs7TmdQds7EQJ/5quxKNdxDb+VFmXeeaM3ypM+A6ZHHNPBFxEnegGhm udaBOQHeO06R9NDEjKKxXUABsCqoE4qkxQAVTcYPJpgDvbgmBb6Y+JGIWZacsj1agCFc 9gGrhxfLDmzuATYhXOhvlsJ6SWq5WcNA59yD6Y8FlhUtagybAZRpmSZUKtoo3aYFLcU5 /deg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@morinfr.org header.s=20170427 header.b="OZY/dz46"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 t2si205689edf.543.2022.01.26.13.45.59; Wed, 26 Jan 2022 13:46:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@morinfr.org header.s=20170427 header.b="OZY/dz46"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242618AbiAZPMt (ORCPT + 99 others); Wed, 26 Jan 2022 10:12:49 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:51800 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242608AbiAZPMs (ORCPT ); Wed, 26 Jan 2022 10:12:48 -0500 Received: from bender.morinfr.org (unknown [82.65.130.196]) by smtp1-g21.free.fr (Postfix) with ESMTPS id C12DBB00571; Wed, 26 Jan 2022 16:12:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=morinfr.org ; s=20170427; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=axzolPy+BPljfmZmSANvL0Zmeb7gY16v/jqcglkbVZk=; b=OZY/dz46COePbi3KCr5mx/5C5i dgvApOH88rAvSgolDRpEgVhbLzyCwxJwtWbn3T55ODD/oioxBk2zK9ytjfMzVOYUXSL58ZZXz8TfJ vmjKesP2y6OM8eEwcdJdjHfRSOPmjItCIc3+vUQ/N5aSG1tMs+xVBtLVkJcOTZWgPnqs=; Received: from guillaum by bender.morinfr.org with local (Exim 4.94.2) (envelope-from ) id 1nCjyY-002pZ5-4w; Wed, 26 Jan 2022 16:12:46 +0100 Date: Wed, 26 Jan 2022 16:12:46 +0100 From: Guillaume Morin To: Jack Wang Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable , Guoqing Jiang , Song Liu , Guillaume Morin Subject: Re: [PATCH 5.10 01/25] md: revert io stats accounting Message-ID: References: <20220114081542.698002137@linuxfoundation.org> <20220114081542.746291845@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26 Jan 11:09, Jack Wang wrote: > > > > - if (bio->bi_end_io != md_end_io) { > > - struct md_io *md_io; > > - > > - md_io = mempool_alloc(&mddev->md_io_pool, GFP_NOIO); > > - md_io->mddev = mddev; > > - md_io->orig_bi_end_io = bio->bi_end_io; > > - md_io->orig_bi_private = bio->bi_private; > > - > > - bio->bi_end_io = md_end_io; > > - bio->bi_private = md_io; > > - > > - md_io->start_time = part_start_io_acct(mddev->gendisk, > > - &md_io->part, bio); > > - } > > - > > + /* > > + * save the sectors now since our bio can > > + * go away inside make_request > > + */ > > + sectors = bio_sectors(bio); > This code snip is not inside the original patch, and it's not in > latest upstream too. > > /* bio could be mergeable after passing to underlayer */ > > bio->bi_opf &= ~REQ_NOMERGE; > > > > md_handle_request(mddev, bio); > > > > + part_stat_lock(); > > + part_stat_inc(&mddev->gendisk->part0, ios[sgrp]); > > + part_stat_add(&mddev->gendisk->part0, sectors[sgrp], sectors); > > + part_stat_unlock(); > > + > same here, this code snip is not inside the original patch, and it's > not in latest upstream too. Both snippets came from the code before 41d2d848e5c0 that the patch is being reverted here. As I explained in my original message, upstream is different because of 99dfc43ecbf6 which is not in 5.10. > I think would be good keep it as the upstream version. If you don't include these lines, isn't this worse as it's not calling either part_start_io_acct or bio_start_io_acct (in 99dfc43ecbf6)? -- Guillaume Morin