All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Hong Zhiguo <honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hong Zhiguo <zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH v2] blk-throttle: simplify logic by token bucket algorithm
Date: Tue, 15 Oct 2013 09:03:46 -0400	[thread overview]
Message-ID: <20131015130346.GB31215@redhat.com> (raw)
In-Reply-To: <20131014133620.GF4722-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>

On Mon, Oct 14, 2013 at 09:36:20AM -0400, Tejun Heo wrote:
> Hello,
> 
> On Mon, Oct 14, 2013 at 05:09:17PM +0800, Hong Zhiguo wrote:
> > From: Hong Zhiguo <zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
> > 
> > Token bucket algorithm(http://en.wikipedia.org/wiki/Token_bucket)
> > is very simple and widely used for rate limiting and shaping.
> > It's well suitable for blk-throttle. And it natually works for
> > hierarchical cgroups. So I took it to replace the original time
> > _slicing_|_trimming_|_extending_ logic.
> > 
> > The advantage is simplicity, reliability and less fluctuation.
> > 
> > About 300 lines of code for time-slicing is replaced with 60 lines of
> > code for token bucket in blk-throttle.c.
> > 
> > I've tested this patch by fio with rw=randread, rw=randrw. It
> > behaves almost the same with original time-slicing implementation,
> > and with more accuracy.
> 
> Yes, this definitely is the direction we wanna take it.  I'll wait for
> Vivek to chime in but have you also tested hierarchical setup?

Hi Tejun,

I will have a look at it either today or tomorrow.

Thanks
Vivek

WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Hong Zhiguo <honkiko@gmail.com>,
	axboe@kernel.dk, cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Hong Zhiguo <zhiguohong@tencent.com>
Subject: Re: [PATCH v2] blk-throttle: simplify logic by token bucket algorithm
Date: Tue, 15 Oct 2013 09:03:46 -0400	[thread overview]
Message-ID: <20131015130346.GB31215@redhat.com> (raw)
In-Reply-To: <20131014133620.GF4722@htj.dyndns.org>

On Mon, Oct 14, 2013 at 09:36:20AM -0400, Tejun Heo wrote:
> Hello,
> 
> On Mon, Oct 14, 2013 at 05:09:17PM +0800, Hong Zhiguo wrote:
> > From: Hong Zhiguo <zhiguohong@tencent.com>
> > 
> > Token bucket algorithm(http://en.wikipedia.org/wiki/Token_bucket)
> > is very simple and widely used for rate limiting and shaping.
> > It's well suitable for blk-throttle. And it natually works for
> > hierarchical cgroups. So I took it to replace the original time
> > _slicing_|_trimming_|_extending_ logic.
> > 
> > The advantage is simplicity, reliability and less fluctuation.
> > 
> > About 300 lines of code for time-slicing is replaced with 60 lines of
> > code for token bucket in blk-throttle.c.
> > 
> > I've tested this patch by fio with rw=randread, rw=randrw. It
> > behaves almost the same with original time-slicing implementation,
> > and with more accuracy.
> 
> Yes, this definitely is the direction we wanna take it.  I'll wait for
> Vivek to chime in but have you also tested hierarchical setup?

Hi Tejun,

I will have a look at it either today or tomorrow.

Thanks
Vivek

  parent reply	other threads:[~2013-10-15 13:03 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12 10:46 [PATCH] blk-throttle: simplify logic by token bucket algorithm Hong Zhiguo
     [not found] ` <1381574794-7639-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2013-10-13 12:59   ` Hong zhi guo
2013-10-14  9:09 ` [PATCH v2] " Hong Zhiguo
     [not found]   ` <1381741757-20888-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2013-10-14 13:36     ` Tejun Heo
2013-10-14 13:36       ` Tejun Heo
2013-10-14 13:47       ` Hong zhi guo
     [not found]       ` <20131014133620.GF4722-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2013-10-14 13:53         ` Hong zhi guo
2013-10-14 13:53           ` Hong zhi guo
     [not found]           ` <CAA7+ByWPM2Pizm+dP1AxPM7Ut-w=AtRfD2GkCK-0OVh+C2Twkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-14 13:59             ` Tejun Heo
2013-10-14 13:59               ` Tejun Heo
     [not found]               ` <20131014135929.GH4722-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2013-10-15 12:35                 ` Hong zhi guo
2013-10-15 12:35                   ` Hong zhi guo
2013-10-15 16:19                   ` Jens Axboe
2013-10-15 13:03         ` Vivek Goyal [this message]
2013-10-15 13:03           ` Vivek Goyal
2013-10-15 17:32     ` Vivek Goyal
2013-10-15 17:32       ` Vivek Goyal
2013-10-16  6:09       ` Hong zhi guo
2013-10-16 14:14         ` Vivek Goyal
2013-10-16 15:47           ` Hong zhi guo
2013-10-16 15:53           ` Tejun Heo
     [not found]             ` <20131016155344.GA10012-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2013-10-16 16:22               ` Vivek Goyal
2013-10-16 16:22                 ` Vivek Goyal
2013-10-16 16:22               ` Hong zhi guo
2013-10-17 12:17 ` [PATCH v3] " Hong Zhiguo
     [not found]   ` <1382012272-26170-1-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2013-10-18 15:55     ` Vivek Goyal
2013-10-18 15:55       ` Vivek Goyal
     [not found]       ` <20131018155532.GD2277-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-20 12:08         ` Hong zhi guo
2013-10-20 12:08           ` Hong zhi guo
2013-10-20 12:11       ` [PATCH v4 0/2] " Hong Zhiguo
2013-10-20 12:11         ` [PATCH v4 1/2] " Hong Zhiguo
2014-04-10 10:07           ` Hong zhi guo
     [not found]             ` <CAA7+ByVJWjfs5HiMsnuum75egghrNQHt2KNNPTWeVa0-FWccaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-10 13:32               ` Vivek Goyal
2014-04-10 13:32                 ` Vivek Goyal
2013-10-20 12:11         ` [PATCH v4 2/2] blk-throttle: trim tokens generated for an idle tree Hong Zhiguo
     [not found]           ` <1382271072-15664-3-git-send-email-zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org>
2013-10-22 21:02             ` Vivek Goyal
2013-10-22 21:02               ` Vivek Goyal
     [not found]               ` <20131022210232.GB2884-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-23  3:30                 ` Hong zhi guo
2013-10-23  3:30                   ` Hong zhi guo
2013-10-28  5:08               ` Hong zhi guo

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=20131015130346.GB31215@redhat.com \
    --to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=honkiko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=zhiguohong-1Nz4purKYjRBDgjK7y7TUQ@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.