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 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB096C433F5 for ; Tue, 12 Apr 2022 05:28:12 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-270-AHgDus2gPW-KGAvqmVOF7A-1; Tue, 12 Apr 2022 01:28:08 -0400 X-MC-Unique: AHgDus2gPW-KGAvqmVOF7A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB1E4804197; Tue, 12 Apr 2022 05:28:06 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16A2E9D47; Tue, 12 Apr 2022 05:28:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D27FD1949762; Tue, 12 Apr 2022 05:28:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2F4781947BBF for ; Tue, 12 Apr 2022 05:28:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0E95A40CF918; Tue, 12 Apr 2022 05:28:02 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A59240CF8ED for ; Tue, 12 Apr 2022 05:28:02 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E498F100BAB1 for ; Tue, 12 Apr 2022 05:28:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-610-tt8YqGiyMMCKzcW0_jJeeg-1; Tue, 12 Apr 2022 01:27:57 -0400 X-MC-Unique: tt8YqGiyMMCKzcW0_jJeeg-1 Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ne94F-00BmLK-0M; Tue, 12 Apr 2022 05:27:55 +0000 Date: Mon, 11 Apr 2022 22:27:54 -0700 From: Christoph Hellwig To: Mike Snitzer Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Subject: Re: [dm-devel] [PATCH] block: remove redundant blk-cgroup init from __bio_clone X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: axboe@kernel.dk, Christoph Hellwig , linux-block@vger.kernel.org, dm-devel@redhat.com, tj@kernel.org, Dennis Zhou Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Apr 11, 2022 at 01:33:58PM -0400, Mike Snitzer wrote: > When bio_{alloc,init}_clone are passed a bdev, bio_init() will call > bio_associate_blkg() so the __bio_clone() work to initialize blkcg > isn't needed. No, unfortunately it isn't as simple as that. There are bios that do not use the default cgroup and thus blkg, e.g. those that come from cgroup writeback. -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FB92C433F5 for ; Tue, 12 Apr 2022 05:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240858AbiDLFaN (ORCPT ); Tue, 12 Apr 2022 01:30:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240383AbiDLFaL (ORCPT ); Tue, 12 Apr 2022 01:30:11 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EFF234B81 for ; Mon, 11 Apr 2022 22:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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; bh=32XuRnLyycr6E1ydFLiKQS7WOYQdiFoBJCL0skZrtUY=; b=osDQtdSRYYyuty4FeErIdlzrtG H5xNmpSBSBjl956pugv3bQoyW1M3Ap6xLvmrd8Bs1hIGVKeN1QBKt5ZIndAAWqPQxvrP/RbqTgJoR aKle0U8Trw5qWuH8GdLK5IRytnu4qvErMfBrhN/RMjaerleaxgMt28CZdnorc5wdLOgBVDHNVJoKv 0FdFqRhVszyXIZaoR57UfA5RLe0+O2Xop5KwBfijMcj3GrDSWOPMn/PI/i+QOavx5maTOhNiKQq2C N55SpQps6cAYoxY2DOx33qNGcqaKs/q6OKMbLMnoO49U9goiW0LuncLwGnHGNQrjeYje6NI/Plod6 pivGo/Jg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ne94F-00BmLK-0M; Tue, 12 Apr 2022 05:27:55 +0000 Date: Mon, 11 Apr 2022 22:27:54 -0700 From: Christoph Hellwig To: Mike Snitzer Cc: linux-block@vger.kernel.org, Christoph Hellwig , Dennis Zhou , tj@kernel.org, axboe@kernel.dk, dm-devel@redhat.com Subject: Re: [PATCH] block: remove redundant blk-cgroup init from __bio_clone Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Mon, Apr 11, 2022 at 01:33:58PM -0400, Mike Snitzer wrote: > When bio_{alloc,init}_clone are passed a bdev, bio_init() will call > bio_associate_blkg() so the __bio_clone() work to initialize blkcg > isn't needed. No, unfortunately it isn't as simple as that. There are bios that do not use the default cgroup and thus blkg, e.g. those that come from cgroup writeback.