From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Ts'o Subject: Re: [PATCH 2/2] ext4: implement cgroup writeback support Date: Tue, 21 Jul 2015 23:56:20 -0400 Message-ID: <20150722035620.GD2944@thunk.org> References: <1434495193-31182-1-git-send-email-tj@kernel.org> <1434495193-31182-3-git-send-email-tj@kernel.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=ur4LXJPxzUw9XbSEjNi80fDXOWiidmO2OW+WIcoi2gI=; b=XUZvCX196lc7Tzujqg6+o0h/ONSSg/tdhA5jJ/Ve9tFh+Uyya4aoMP7fLKAaF6bhuURJ2gb19c4Qq5LuyFxL1ABfdkANRz5IOIG7OEsf+WDM0bs5wR/iUdpFJhVF7WhUd2rFdcMhtl7tsfjnrxPVHaW4PzirF3rpyB847BjC2hU=; Content-Disposition: inline In-Reply-To: <1434495193-31182-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Tejun Heo Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, kernel-team-b10kYP2dOMg@public.gmane.org, adilger.kernel-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org, linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Tue, Jun 16, 2015 at 06:53:13PM -0400, Tejun Heo wrote: > For ordered and writeback data modes, all data IOs go through > ext4_io_submit. This patch adds cgroup writeback support by invoking > wbc_init_bio() from io_submit_init_bio() and wbc_account_io() in > io_submit_add_bh(). Journal data which is written by jbd2 worker is > left alone by this patch and will always be written out from the root > cgroup. > > ext4_fill_super() is updated to set MS_CGROUPWB when data mode is > either ordered or writeback. In journaled data mode, most IOs become > synchronous through the journal and enabling cgroup writeback support > doesn't make much sense or difference. Journaled data mode is left > alone. > > Lightly tested with sequential data write workload. Behaves as > expected. > > v2: Updated for MS_CGROUPWB -> SB_I_CGROUPWB. > > Signed-off-by: Tejun Heo > Cc: "Theodore Ts'o" > Cc: Andreas Dilger > Cc: linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Thanks, applied. - Ted From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933248AbbGVD41 (ORCPT ); Tue, 21 Jul 2015 23:56:27 -0400 Received: from imap.thunk.org ([74.207.234.97]:51542 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932943AbbGVD4Y (ORCPT ); Tue, 21 Jul 2015 23:56:24 -0400 Date: Tue, 21 Jul 2015 23:56:20 -0400 From: "Theodore Ts'o" To: Tejun Heo Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, lizefan@huawei.com, cgroups@vger.kernel.org, hannes@cmpxchg.org, kernel-team@fb.com, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org Subject: Re: [PATCH 2/2] ext4: implement cgroup writeback support Message-ID: <20150722035620.GD2944@thunk.org> Mail-Followup-To: Theodore Ts'o , Tejun Heo , axboe@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, lizefan@huawei.com, cgroups@vger.kernel.org, hannes@cmpxchg.org, kernel-team@fb.com, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org References: <1434495193-31182-1-git-send-email-tj@kernel.org> <1434495193-31182-3-git-send-email-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434495193-31182-3-git-send-email-tj@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2015 at 06:53:13PM -0400, Tejun Heo wrote: > For ordered and writeback data modes, all data IOs go through > ext4_io_submit. This patch adds cgroup writeback support by invoking > wbc_init_bio() from io_submit_init_bio() and wbc_account_io() in > io_submit_add_bh(). Journal data which is written by jbd2 worker is > left alone by this patch and will always be written out from the root > cgroup. > > ext4_fill_super() is updated to set MS_CGROUPWB when data mode is > either ordered or writeback. In journaled data mode, most IOs become > synchronous through the journal and enabling cgroup writeback support > doesn't make much sense or difference. Journaled data mode is left > alone. > > Lightly tested with sequential data write workload. Behaves as > expected. > > v2: Updated for MS_CGROUPWB -> SB_I_CGROUPWB. > > Signed-off-by: Tejun Heo > Cc: "Theodore Ts'o" > Cc: Andreas Dilger > Cc: linux-ext4@vger.kernel.org Thanks, applied. - Ted