Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5511913pxb; Wed, 26 Jan 2022 13:49:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQO/46hKrc7QvqtKYAyKhuqEKYBMc1V4CfBn3b5JyGfSBFxvY4P8TcTNhUcGTkxnTHMqmV X-Received: by 2002:aa7:d856:: with SMTP id f22mr935433eds.324.1643233748108; Wed, 26 Jan 2022 13:49:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643233748; cv=none; d=google.com; s=arc-20160816; b=Tvapt6OQydav1rl/VtocXc0g2cvjp77DyJ0J/aFVraAjqIPhJxwmPAQcNKaePiH1os 1Np7VTgwPoHrTGEXWOerFMuJCGDLr+fBc8MPfTTpcLb1qemj48ScSoAvjghvIiZJEd+/ ufadMVTxgQKXKauV2Ro2LJ+aZsUQ2ZF0g7RmvEmbP+ic0Jl86ZUBYpAYX2DnPDExIT3S uQI+ezBS+pt8gEdFEyrq1wKIIJxL+GrEa1i+5ys+zr0ePAVLD5unDiGVzrU1U66Di0f5 hIuy0uGtMW/qvqpFs219+2WRPw9LnbGP59leOBLv3UbeEBiLFwDwafL/Ij5AEtCcktGf SdRQ== 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=AxJ5t5OjDUZXf2Lh6mDw1u0w444vTXzCEH4PtXRkqFE=; b=H4nKIFSjMErAz9N8HFXwjuO5J4oXFG46i6OpKrehc9a/LewacqQ68iRqzD3+6KBkt9 wsfrmv+MLfEzv0cF4sEIhwwJUBWymkrL0pqyXAcdUG3DRvv99QbKUtKBajePCUAdgzZz cgw3c1rY1Mt7otbMNUWSKKlQXTmMIabrD9y/IkzhB95LI0/Wytcx2S4zszhVEtZBQzsS PQsmw3pQpunRKfCLlNNX0XFxPMxyF2Au1WYtB++LDqwfzbdciR7oZW+p+EK5tWHPeWjQ ANbDyrnBMGWozw83U/2bfoe+/gF+oY+a3uRzMyOAZZHXRIVIaSottGG2eH391zNBXw/s WEIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@morinfr.org header.s=20170427 header.b=fDXhQqvz; 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 nb8si264478ejc.941.2022.01.26.13.48.43; Wed, 26 Jan 2022 13:49:08 -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=fDXhQqvz; 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 S242707AbiAZPTM (ORCPT + 99 others); Wed, 26 Jan 2022 10:19:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242665AbiAZPTH (ORCPT ); Wed, 26 Jan 2022 10:19:07 -0500 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [IPv6:2a01:e0c:1:1599::10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0087C06161C; Wed, 26 Jan 2022 07:19:07 -0800 (PST) Received: from bender.morinfr.org (unknown [82.65.130.196]) by smtp1-g21.free.fr (Postfix) with ESMTPS id 1DCB2B00548; Wed, 26 Jan 2022 16:19:05 +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=AxJ5t5OjDUZXf2Lh6mDw1u0w444vTXzCEH4PtXRkqFE=; b=fDXhQqvzNe+/aO7uA8rxFhULso XSRds8LkBXxGUuvINy0QtiOuKn52kp4SlTedGHz8WZskocsgKb39ZDXoSu8ky811CzB616ft11oEn uSWRY4scVZ2WzY7ToXmMDjBnJJA2gTU+nQ8qOwoZsIQv3mjnKH77Ovy2kCF8KwGu70Rk=; Received: from guillaum by bender.morinfr.org with local (Exim 4.94.2) (envelope-from ) id 1nCk4e-002pg7-E4; Wed, 26 Jan 2022 16:19:04 +0100 Date: Wed, 26 Jan 2022 16:19:04 +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 13:37, 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. > > > > Is it a problem? > Not sure, might cause some confusion regarding io stats. Have you observed anything weird? Because if you don't include this, I don't see where these stats are updated at all. Could you explain please? -- Guillaume Morin