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 31096C6FD18 for ; Thu, 30 Mar 2023 00:16:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231340AbjC3AQG (ORCPT ); Wed, 29 Mar 2023 20:16:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231341AbjC3AQF (ORCPT ); Wed, 29 Mar 2023 20:16:05 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF5E75587; Wed, 29 Mar 2023 17:15:56 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 7440368D07; Thu, 30 Mar 2023 02:15:52 +0200 (CEST) Date: Thu, 30 Mar 2023 02:15:52 +0200 From: Christoph Hellwig To: Tejun Heo Cc: Christoph Hellwig , Chris Mason , Josef Bacik , Chris Mason , David Sterba , Jens Axboe , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: move bio cgroup punting into btrfs Message-ID: <20230330001552.GA2381@lst.de> References: <20230327004954.728797-1-hch@lst.de> <512eaacf-3ff6-f4f9-c856-a0e03c027501@meta.com> <20230328233448.GA5486@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Wed, Mar 29, 2023 at 09:16:18AM -1000, Tejun Heo wrote: > We didn't really look deep into adding the support but Chris mentioned that > raid5/6 are likely to need something similar. Maybe this is because my grasp > of filesytsems is pretty weak but the pattern doesn't seem unreasonable to > me. There's some work to be done by a shread kthread and that sometimes can > fork out IOs which belong to specific cgroups. Well, in a cgroup aware writeback path we'd always be off much better to just do the work from a cgroup specific thread instead of bouncing it around. > At least in the IO control and direct issue path, punting to just one thread > hasn't been a practical problem given that when the issuing thread needs to > be blocked, either the whole device or the cgroup needs to be throttled > anyway. I don't think it is a problem per see. But it is: a) inefficient and b) complex in terms of code. So why bounce around between 2, or in case of writeback 3 threads for a single I/O, instead of making sure your offload threads are simplify cgroup specific to start with?