From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932372AbbFQVtJ (ORCPT ); Wed, 17 Jun 2015 17:49:09 -0400 Received: from imap.thunk.org ([74.207.234.97]:41112 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751444AbbFQVtF (ORCPT ); Wed, 17 Jun 2015 17:49:05 -0400 Date: Wed, 17 Jun 2015 17:48:52 -0400 From: "Theodore Ts'o" To: Tejun Heo Cc: Vivek Goyal , axboe@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, lizefan@huawei.com, cgroups@vger.kernel.org Subject: Re: [PATCH 3/3] writeback, blkio: add documentation for cgroup writeback support Message-ID: <20150617214852.GE4076@thunk.org> Mail-Followup-To: Theodore Ts'o , Tejun Heo , Vivek Goyal , axboe@kernel.dk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, lizefan@huawei.com, cgroups@vger.kernel.org References: <1434146254-26220-1-git-send-email-tj@kernel.org> <1434146254-26220-4-git-send-email-tj@kernel.org> <20150615172823.GA5783@redhat.com> <20150615182345.GB18517@mtj.duckdns.org> <20150615233519.GB30059@thunk.org> <20150616215436.GE22637@mtj.duckdns.org> <20150617031540.GB4076@thunk.org> <20150617185237.GL22637@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150617185237.GL22637@mtj.duckdns.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 Wed, Jun 17, 2015 at 02:52:37PM -0400, Tejun Heo wrote: > > Hmmm... so, overriding things *before* an bio is issued shouldn't be > too difficult and as long as this sort of operations aren't prevalent > we might be able to get away with just charging them against root. > Especially if it's to avoid getting blocked on the journal which we > already consider a shared overhead which is charged to root. If this > becomes large enough to require exacting charges, it'll be more > complex but still way better than trying to raise priority on a bio > which is already issued, which is likely to be excruciatingly painful > if possible at all. Yeah, just charging the overhead to root seems good enough. I could imagine charging it to whatever cgroup the jbd/jbd2 thread belongs to, which in turn would be the cgroup of the process that mounted the file system. The only problem with that is that if a low-priority process is allowed to mount a file system, and it gets traversed by a high priority process, the high priority process will get impacted. So maybe it's better to just say that it always get charged to the root cgroup. - Ted From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Ts'o Subject: Re: [PATCH 3/3] writeback, blkio: add documentation for cgroup writeback support Date: Wed, 17 Jun 2015 17:48:52 -0400 Message-ID: <20150617214852.GE4076@thunk.org> References: <1434146254-26220-1-git-send-email-tj@kernel.org> <1434146254-26220-4-git-send-email-tj@kernel.org> <20150615172823.GA5783@redhat.com> <20150615182345.GB18517@mtj.duckdns.org> <20150615233519.GB30059@thunk.org> <20150616215436.GE22637@mtj.duckdns.org> <20150617031540.GB4076@thunk.org> <20150617185237.GL22637@mtj.duckdns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Vivek Goyal , 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 To: Tejun Heo Return-path: Content-Disposition: inline In-Reply-To: <20150617185237.GL22637-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Jun 17, 2015 at 02:52:37PM -0400, Tejun Heo wrote: > > Hmmm... so, overriding things *before* an bio is issued shouldn't be > too difficult and as long as this sort of operations aren't prevalent > we might be able to get away with just charging them against root. > Especially if it's to avoid getting blocked on the journal which we > already consider a shared overhead which is charged to root. If this > becomes large enough to require exacting charges, it'll be more > complex but still way better than trying to raise priority on a bio > which is already issued, which is likely to be excruciatingly painful > if possible at all. Yeah, just charging the overhead to root seems good enough. I could imagine charging it to whatever cgroup the jbd/jbd2 thread belongs to, which in turn would be the cgroup of the process that mounted the file system. The only problem with that is that if a low-priority process is allowed to mount a file system, and it gets traversed by a high priority process, the high priority process will get impacted. So maybe it's better to just say that it always get charged to the root cgroup. - Ted