From: Vivek Goyal <vgoyal@redhat.com>
To: Chad Talbott <ctalbott@google.com>
Cc: jaxboe@fusionio.com, guijianfeng@cn.fujitsu.com,
mrubin@google.com, teravest@google.com, jmoyer@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2] Avoid preferential treatment of groups that aren't backlogged
Date: Mon, 14 Feb 2011 11:41:39 -0500 [thread overview]
Message-ID: <20110214164139.GC13097@redhat.com> (raw)
In-Reply-To: <20110211193930.5454.5874.stgit@neat.mtv.corp.google.com>
On Fri, Feb 11, 2011 at 11:39:30AM -0800, Chad Talbott wrote:
[..]
> static struct cfq_group *cfq_get_next_cfqg(struct cfq_data *cfqd);
> @@ -873,18 +877,13 @@ cfq_group_service_tree_add(struct cfq_data *cfqd, struct cfq_group *cfqg)
> if (!RB_EMPTY_NODE(&cfqg->rb_node))
> return;
>
> - /*
> - * Currently put the group at the end. Later implement something
> - * so that groups get lesser vtime based on their weights, so that
> - * if group does not loose all if it was not continously backlogged.
> - */
> - n = rb_last(&st->rb);
> - if (n) {
> - __cfqg = rb_entry_cfqg(n);
> - cfqg->vdisktime = __cfqg->vdisktime + CFQ_IDLE_DELAY;
> - } else
> + if (cfqd->active_generation > cfqg->generation_num)
> cfqg->vdisktime = st->min_vdisktime;
> -
> + else
> + /* We assume that vdisktime was not modified when the task
> + was off the service tree.
> + */
> + cfqg->vdisktime = max(st->min_vdisktime, cfqg->vdisktime);
I think above usage of max() also will give wrong results upon wrapping.
So how about using max_vdisktime() instead? I know that results are not
catastrophic when it happens, still lets use the right thing.
Thanks
Vivek
next prev parent reply other threads:[~2011-02-14 16:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 19:39 [PATCH 2] Avoid preferential treatment of groups that aren't backlogged Chad Talbott
2011-02-14 16:41 ` Vivek Goyal [this message]
2011-02-14 18:01 ` [PATCH v3] " Chad Talbott
2011-02-14 18:07 ` Vivek Goyal
2011-02-18 21:48 ` Vivek Goyal
2011-02-18 22:16 ` Chad Talbott
2011-02-18 22:19 ` [PATCH v4] " Chad Talbott
2011-02-21 15:32 ` Vivek Goyal
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=20110214164139.GC13097@redhat.com \
--to=vgoyal@redhat.com \
--cc=ctalbott@google.com \
--cc=guijianfeng@cn.fujitsu.com \
--cc=jaxboe@fusionio.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mrubin@google.com \
--cc=teravest@google.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 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.