Re: [PATCH V4 0/7] loop: cleanup charging io to mem/blkcg
From: Ming Lei
Date: Sat Aug 14 2021 - 05:13:14 EST
Hi Christoph,
On Thu, Aug 12, 2021 at 11:00:37AM +0200, Christoph Hellwig wrote:
> On Tue, Aug 10, 2021 at 11:26:54AM +0800, Ming Lei wrote:
> > Can you share us what your expectations are in the re-write? Such as:
> >
> > 1) no impact on normal non-cgroup path
> > 2) ...
> > 3) ...
>
> Get the call cgroup mess out of this driver entirely?
Firstly the patch 2/7 in this series cleans up cgroup references by
killing unnecessary #ifdef and moving cgroup references into common
helpers, and the cgroup uses have been cleaned a lot.
Secondly the issue is that we need to wire proper cgroups(blkcg & memcg) for
loop's IO because loop uses wq or kthread for handling IO, and IMO it isn't
possible to moving cgroup references out of loop entirely if we want to
support this cgroup's function for loop driver.
Finally the current cgroup reference is actually very simple: retrieve
blkcg from bio_blkcg(bio) and memcg from the the blkcg. Then applies
the two in the single function of loop_workfn() only.
Thanks,
Ming