public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Jens Axboe <jaxboe@fusionio.com>,
	"jmoyer@redhat.com" <jmoyer@redhat.com>,
	Corrado Zoccolo <czoccolo@gmail.com>,
	Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Subject: Re: [PATCH 2/2]block cfq: compensate preempted queue even if it has no slice assigned
Date: Tue, 18 Jan 2011 08:47:28 +0800	[thread overview]
Message-ID: <1295311648.1949.717.camel@sli10-conroe> (raw)
In-Reply-To: <20110117140648.GB5624@redhat.com>

On Mon, 2011-01-17 at 22:06 +0800, Vivek Goyal wrote:
> On Tue, Jan 11, 2011 at 04:51:57PM +0800, Shaohua Li wrote:
> > If a queue is preempted before it gets slice assigned, the queue doesn't get
> > compensation, which looks unfair. For such queue, we compensate it for a whole
> > slice.
> > 
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > 
> > ---
> >  block/cfq-iosched.c |   19 +++++++++++++++----
> >  1 file changed, 15 insertions(+), 4 deletions(-)
> > 
> > Index: linux/block/cfq-iosched.c
> > ===================================================================
> > --- linux.orig/block/cfq-iosched.c	2011-01-10 15:37:33.000000000 +0800
> > +++ linux/block/cfq-iosched.c	2011-01-10 15:54:28.000000000 +0800
> > @@ -605,8 +605,8 @@ cfq_group_slice(struct cfq_data *cfqd, s
> >  	return cfq_target_latency * cfqg->weight / st->total_weight;
> >  }
> >  
> > -static inline void
> > -cfq_set_prio_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
> > +static inline unsigned
> > +cfq_scaled_group_slice(struct cfq_data *cfqd, struct cfq_queue *cfqq)
> >  {
> 
> Shaohua,
> 
> Above name "cfq_scaled_group_slice()" does not seem appropriate. It sounds
> as if we are calculating scaled group slice length but the fact is we
> are trying to come up with slice length of cfqq. So a better name might
> be cfq_scaled_slice_cfqq() or cfqq_scaled_slice() something like that. 
either is ok to me. can you post a patch to fix it, as the patch is
already merged.

Thanks,
Shaohua


      reply	other threads:[~2011-01-18  0:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11  8:51 [PATCH 2/2]block cfq: compensate preempted queue even if it has no slice assigned Shaohua Li
2011-01-17 14:06 ` Vivek Goyal
2011-01-18  0:47   ` Shaohua Li [this message]

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=1295311648.1949.717.camel@sli10-conroe \
    --to=shaohua.li@intel.com \
    --cc=czoccolo@gmail.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=jaxboe@fusionio.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.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