From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Tejun Heo <tj@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Michal Hocko <mhocko@suse.cz>,
cgroups@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Sha Zhengju <handai.szj@gmail.com>,
devel@openvz.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH RFC] fsio: filesystem io accounting cgroup
Date: Tue, 09 Jul 2013 21:42:57 +0400 [thread overview]
Message-ID: <51DC4BA1.3000403@openvz.org> (raw)
In-Reply-To: <20130709150605.GC2237@redhat.com>
Vivek Goyal wrote:
> On Tue, Jul 09, 2013 at 06:35:54PM +0400, Konstantin Khlebnikov wrote:
>
> [..]
>> I'm not interested in QoS or proportional control. Let schedulers do it.
>> I want just bandwidth control. I don't want to write a new scheduler
>> or extend some of existing one. I want implement simple and lightweight
>> accounting and add couple of throttlers on top of that.
>> It can be easily done without violation of that hierarchical design.
>>
>> The same problem already has happened with cpu scheduler. It has really
>> complicated rate limiter which is actually useless in the real world because
>> it triggers all possible priority inversions since it puts bunch of tasks into
>> deep sleep while some of them may hold kernel locks. Perfect.
>>
>> QoS and scheduling policy are good thing, but rate-limiting must be separated
>> and done only in places where it doesn't leads to these problems.
>
> So what kind of priority inversion you are facing with blkcg and how would
> you avoid it with your implementation?
>
> I know that serialization can happen at filesystem level while trying
> to commit journal. But I think same thing will happen with your
> implementation too.
Yes, metadata changes are serialized and and they depends on data commits,
thus block layer cannot delay write requests without introducing nasty priority
inversions. Cached read requests cannot be delayed at all. All solutions either
breaks throttling or adds PI. So block layer is just wrong place for this.
>
> One simple way of avoiding that will be to throttle IO even earlier
> but that means we do not take advantage of writeback cache and buffered
> writes will slow down.
If we want to control writeback speed we also must control size of dirty set.
There are several possibilities: we either can start writeback earlier,
or when dirty set exceeds some threshold we will start charging that dirty
memory into throttler and slow down all tasks who generates this dirty memory.
Because dirty memory is charged and accounted we can write it without delays.
>
> So I am curious how would you take care of these serialization issue.
>
> Also the throttlers you are planning to implement, what kind of throttling
> do they provide. Is it throttling rate per cgroup or per file per cgroup
> or rules will be per bdi per cgroup or something else.
Currently I'm thinking about per-cgroup X per-tier. Each bdi will be assigned
to some tier. It's flexible enough and solves chicken-and-egg problem:
when disk appears it will be assigned to default tier and can be reassigned.
>
> Thanks
> Vivek
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email:<a href=mailto:"dont@kvack.org"> email@kvack.org</a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-07-09 17:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 10:01 [PATCH RFC] fsio: filesystem io accounting cgroup Konstantin Khlebnikov
2013-07-08 17:00 ` Tejun Heo
2013-07-08 17:52 ` Vivek Goyal
2013-07-08 17:56 ` Tejun Heo
2013-07-09 8:28 ` Konstantin Khlebnikov
2013-07-09 12:57 ` Tejun Heo
2013-07-09 13:15 ` Konstantin Khlebnikov
2013-07-09 13:16 ` Tejun Heo
2013-07-09 13:16 ` Tejun Heo
2013-07-09 13:43 ` Konstantin Khlebnikov
2013-07-09 13:45 ` Tejun Heo
2013-07-09 14:18 ` Vivek Goyal
2013-07-09 14:29 ` Tejun Heo
2013-07-09 14:54 ` Vivek Goyal
2013-07-09 15:08 ` Tejun Heo
[not found] ` <20130710030955.GA3569@redhat.com>
2013-07-10 3:50 ` Tejun Heo
2013-07-09 14:35 ` Konstantin Khlebnikov
2013-07-09 14:42 ` Tejun Heo
2013-07-09 15:06 ` Vivek Goyal
2013-07-09 17:42 ` Konstantin Khlebnikov [this message]
2013-07-09 18:35 ` Vivek Goyal
2013-07-09 20:54 ` Konstantin Khlebnikov
2013-07-08 18:11 ` Vivek Goyal
2013-07-09 15:39 ` Theodore Ts'o
2013-07-09 17:12 ` Konstantin Khlebnikov
-- strict thread matches above, loose matches on Subject: below --
2013-07-08 9:59 Konstantin Khlebnikov
2013-07-10 4:43 ` Sha Zhengju
2013-07-10 6:03 ` Konstantin Khlebnikov
2013-07-10 8:37 ` Sha Zhengju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51DC4BA1.3000403@openvz.org \
--to=khlebnikov@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=devel@openvz.org \
--cc=handai.szj@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=tj@kernel.org \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).