From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA815C43331 for ; Tue, 31 Mar 2020 09:16:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F13420772 for ; Tue, 31 Mar 2020 09:16:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="WDE48/qk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731863AbgCaJQq (ORCPT ); Tue, 31 Mar 2020 05:16:46 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731927AbgCaJQp (ORCPT ); Tue, 31 Mar 2020 05:16:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=dAEAaiyYMafUZFXucEHFMwj9eNivSkJsj+WW8FmIfy0=; b=WDE48/qkkHgSzTYDWPtabW2BIr QId90vMWhyZ52q84KyJn1KuMAWJMJlgbm9nleLyenJATRTgWQTOPXCI2lrEmA2Wc2PzCqdHsyPsHF ePZB7DcFSeEIbLRsUZXU44hSzXY2ouUh4MfwnTFG+rD36iMKNqL87gb71OGczLhq6a2iXvtvIx73o 6hFwaOmKiJUoC05xpHEjbJOS1LOYg9GJgw3jHCZtoBL2PxnZ5qFF2c6TVZHtHPQ6Y+P3nHrg51PK4 PNCU65ImZZS0Qn4A+1QdIlrBcyfwqAmQssODULy2UAERzJcY7UeOiGlKlFn5lhnBDrtrL+7RiGPqV dekOQ0Tg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jJD0m-0004fI-3F; Tue, 31 Mar 2020 09:16:44 +0000 Date: Tue, 31 Mar 2020 02:16:44 -0700 From: Christoph Hellwig To: Weiping Zhang Cc: Christoph Hellwig , Jens Axboe , Tejun Heo , linux-block@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [RFC PATCH v2 2/3] bio: track timestamp of submitting bio the disk driver Message-ID: <20200331091644.GB12040@infradead.org> References: <20200327062859.GA12588@192.168.3.9> <20200331082505.GA14655@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Tue, Mar 31, 2020 at 04:45:33PM +0800, Weiping Zhang wrote: > Christoph Hellwig 于2020年3月31日周二 下午4:25写道: > > > > On Fri, Mar 27, 2020 at 02:28:59PM +0800, Weiping Zhang wrote: > > > Change-Id: Ibb9caf20616f83e111113ab5c824c05930c0e523 > > > Signed-off-by: Weiping Zhang > > > > This needs a commit description and loose the weird change id. > > > OK, I rewirte commit description, it record the timestamp of issue bio > to the disk driver, > then we can get the delta time in rq_qos_done_bio. It's same as the D2C time > of blktrace. > > I also think oyu need to fins a way to not bloat the bio even more, > > cgroup is a really bad offender for bio size. > struct request { > u64 io_start_time_ns; > also record this timestamp, I'll check if we can use it. But except for a few exceptions bios are never issued directly to the driver, requests are. And the few exception (rsxx, umem) probably should be rewritten to use requests. And with generic_{start,end}_io_acct we already have helpers to track bio based stats, which we should not duplicate just for cgroups.