From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933163AbbFIPDZ (ORCPT ); Tue, 9 Jun 2015 11:03:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34145 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932537AbbFIPDV (ORCPT ); Tue, 9 Jun 2015 11:03:21 -0400 From: Jeff Moyer To: Tejun Heo Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, vgoyal@redhat.com, avanzini.arianna@gmail.com Subject: Re: [PATCH 8/8] cfq-iosched: charge async IOs to the appropriate blkcg's instead of the root References: <1433753973-23684-1-git-send-email-tj@kernel.org> <1433753973-23684-9-git-send-email-tj@kernel.org> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Tue, 09 Jun 2015 11:03:15 -0400 In-Reply-To: <1433753973-23684-9-git-send-email-tj@kernel.org> (Tejun Heo's message of "Mon, 8 Jun 2015 17:59:33 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tejun Heo writes: > Up until now, all async IOs were queued to async queues which are > shared across the whole request_queue, which means that blkcg resource > control is completely void on async IOs including all writeback IOs. > It was done this way because writeback didn't support writeback and > there was no way of telling which writeback IO belonged to which > cgroup; however, writeback recently became cgroup aware and writeback > bio's are sent down properly tagged with the blkcg's to charge them > against. > > This patch makes async cfq_queues per-cfq_cgroup instead of > per-cfq_data so that each async IO is charged to the blkcg that it was > tagged for instead of unconditionally attributing it to root. > > * cfq_data->async_cfqq and ->async_idle_cfqq are moved to cfq_group > and alloc / destroy paths are updated accordingly. > > * cfq_link_cfqq_cfqg() no longer overrides @cfqg to root for async > queues. > > * check_blkcg_changed() now also invalidates async queues as they no > longer stay the same across cgroups. > > After this patch, cfq's proportional IO control through blkio.weight > works correctly when cgroup writeback is in use. > > Signed-off-by: Tejun Heo > Cc: Vivek Goyal > Cc: Arianna Avanzini Reviewed-by: Jeff Moyer