Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1067984rwb; Wed, 26 Jul 2023 07:10:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlE1Wlv29++8VQ2sjYLqvkTnUQ96aKmh6Z15M1wJC1ZrtYl8bJWvzs/nx4VdH90iGgzlueTh X-Received: by 2002:a17:902:ec83:b0:1bb:59a0:3d34 with SMTP id x3-20020a170902ec8300b001bb59a03d34mr1598151plg.30.1690380637500; Wed, 26 Jul 2023 07:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690380637; cv=none; d=google.com; s=arc-20160816; b=DODTLGqnMJtNjgHUA6ZpPjmmVlnowe7kDJ2v6owznM++oix5xaQBqY8kXY3h4KWuKp noOc3bk68btq9t+E82C2t3hu1YnRt24yMgbwWTZp5/Yo78B+QBfaopbZ4vm02R93Scpx KkSW6M2ZzWe+oT0mPiY+0gAOR2MJpxa8n6949jLnRqcQYAvM0W3ehBXMOgrMNdjonQ5C 2DlOVSldv9LGg8WV4mgmdwS9fuudrbfH1wwKiUaEE9IASpC+PoAupZVEKjoY3+p1NdYt fg5JazxoUkQrvjJotD8Cbi0YDpOQC96LvID/oAPGLpVJoAGq4UdCtQTGMenot5gB0l3H pv3A== 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=l8DL6FefQRlTO4k+CnDZGvBGUcQeC8CVjDO7YN+sTNE=; fh=mFNbhVJfu+9Gww4CvzO/d/HKYvyKD6/FX5lyHEj/CE0=; b=kTN7mT5RtV91olb1EDLBhYAz/C1yMXXOlA6Y04XLtEm1XNdt+M5osppRv49cCxo2QT us1o2PcJoZlV6ChDbkQ2Oal9T/ApfHsp0ZWO+4WmzzPtRxkpFjyQfhgeRqLYCBJTay0c +yDVFkb5q7wIRc0D7aN7AVuukeKUGHWPssiM4WqQjwukt7E+WhCdKLhj5oJId+uwtOHv 4Zh5y3JOZ9WTfkn+Fo3lZ9Gi9gAY+knd9w0Hi3zreaCDX9BRDKa8//5sRhvuGzavBkyV 7FRlgoxua8avAxth6frWHfi5LoehiCVEwkjtulQ0c2/JisklPre/gut3q+X8udjx9nkn DyXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=V8+S35Fm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ix22-20020a170902f81600b001b8c8bcc811si795040plb.165.2023.07.26.07.10.22; Wed, 26 Jul 2023 07:10:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@infradead.org header.s=bombadil.20210309 header.b=V8+S35Fm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234009AbjGZNXL (ORCPT + 99 others); Wed, 26 Jul 2023 09:23:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233993AbjGZNXH (ORCPT ); Wed, 26 Jul 2023 09:23:07 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E42DE73; Wed, 26 Jul 2023 06:23:05 -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=l8DL6FefQRlTO4k+CnDZGvBGUcQeC8CVjDO7YN+sTNE=; b=V8+S35FmfA8iyzobqwijZgpTTU jSHsW2HpA2FzPeJw2x8ly4V0kLbrFJ4FyRt+X6XonF2EkETDzpeoMMC4l9eUEzHNoI8XfDqukvqH6 I6Dj1UeaNqSID+62Yr8zTBqACjQHMUUarl/FHVkEM88ejUO3sioZ9RXgfLW1lG/kltxBdGff8hqBP +7vQxbFp0pkzoq5g1JS6K25vtfUKceDUVR1pCuuS9nQXgjQUn7MzW/70E+lmG++Hau6yaiB7lWTKN IiI1LDAQ63xQ8JtGdiCD+mgMZbmKKax7aF5RYp+cQ+oehgADkqCEceAsY0dKIHjQnfj7C4QkZ/i9c tXLK4Meg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qOeTp-00AWXQ-0K; Wed, 26 Jul 2023 13:23:05 +0000 Date: Wed, 26 Jul 2023 06:23:05 -0700 From: Christoph Hellwig To: Kent Overstreet Cc: Christoph Hellwig , linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe , linux-block@vger.kernel.org Subject: Re: [PATCH 05/20] block: Allow bio_iov_iter_get_pages() with bio->bi_bdev unset Message-ID: References: <20230712211115.2174650-1-kent.overstreet@linux.dev> <20230712211115.2174650-6-kent.overstreet@linux.dev> <20230725024312.alq7df33ckede2gb@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725024312.alq7df33ckede2gb@moria.home.lan> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-kernel@vger.kernel.org On Mon, Jul 24, 2023 at 10:43:12PM -0400, Kent Overstreet wrote: > Doing the blk-cgroup association at bio alloc time sounds broken to me, > because of stacking block devices - why was the association not done at > generic_make_request() time? Because blk-cgroup not only works at the lowest level in the stack, but also for stackable block devices. It's not a design decision I particularly agree with, but it's been there forever. So we need to assign it when creating the bio (we used to do it at submission time, but the way it was done was horribly ineffcient, that's why I moved it to allocation time), and then when hitting a stacked device it get reassinged (which still is horribly inefficient).