Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932329AbdIHRyU (ORCPT ); Fri, 8 Sep 2017 13:54:20 -0400 Received: from mail-qt0-f174.google.com ([209.85.216.174]:33404 "EHLO mail-qt0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756725AbdIHRyO (ORCPT ); Fri, 8 Sep 2017 13:54:14 -0400 X-Google-Smtp-Source: AOwi7QB5qdP66UDmzkCk2OAMTxb8iFkatvIeXwnD8K7rhzleAFpgWaW1L8Sq0fDogQfqCvN72bkIfw== Date: Fri, 8 Sep 2017 10:54:10 -0700 From: Tejun Heo To: Shaohua Li Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, lizefan@huawei.com, tglx@linutronix.de, kernel-team@fb.com, axboe@kernel.dk, Shaohua Li Subject: Re: [PATCH 3/3] block/loop: make loop cgroup aware Message-ID: <20170908175409.GB1774378@devbig577.frc2.facebook.com> References: <83915a4be672d99729029800196008c3b39c7a3a.1504748195.git.shli@fb.com> <20170908144808.GA1774378@devbig577.frc2.facebook.com> <20170908170715.54c536vy77w2biki@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170908170715.54c536vy77w2biki@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1415 Lines: 36 Hello, Shaohua. On Fri, Sep 08, 2017 at 10:07:15AM -0700, Shaohua Li wrote: > > The fact that we're forwarding explicitly in loop still bothers me a > > bit. Can you please elaborate why we don't want to do this > > generically through aio? > > I think we must forward in loop, because each cmd could come from different > cgroup, so we must explicitly forward for each cmd. > > The main reason not to do the forward in aio is complexity. We at least have 3 > different implementations for dio: > - __blockdev_direct_IO for ext4 and btrfs > - iomap dio for xfs > - blockdev dio implementation > > Forwarding in dio means hooking the cgroup association for each bio dispatched > in the implementations, which is a little messy. I'd like to avoid this if > there is no strong reason to do it. I see. I think the important questions is whether we're failing to forward io cgroup membership propagation on some aios? If we are, that is an obvious bug which should be addressed one way or the other, and there's a fair chance that we wouldn't need to do anything special for loop. Given how simple the loop changes are, we sure can go with loop specific changes for now; however, I'm a bit unconvinced that aio changes would be that much more complex. Can you please look into it? If it is actually complex, we sure can do it later but I'd much prefer to plug the hole as soon as possible. Thanks. -- tejun