mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Gui Jianfeng <guijianfeng@cn.fujitsu.com>,
	Jens Axboe <axboe@kernel.dk>,
	Corrado Zoccolo <czoccolo@gmail.com>,
	Shaohua Li <shaohua.li@intel.com>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFC] CFQ: Make prio_trees per cfq group basis to improve IO performance
Date: Fri, 16 Jul 2010 10:21:46 -0400	[thread overview]
Message-ID: <x49y6dbv75x.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20100716140034.GC15382@redhat.com> (Vivek Goyal's message of "Fri, 16 Jul 2010 10:00:34 -0400")

Vivek Goyal <vgoyal@redhat.com> writes:

> On Fri, Jul 16, 2010 at 05:21:00PM +0800, Gui Jianfeng wrote:
>> Currently, prio_trees is global, and we rely on cfqq_close() to search
>> a coorperator. If the returned cfqq and the active cfqq don't belong to
>> the same group, coorperator searching fails. Actually, that's not the case.
>> Even if cfqq_close() returns a cfqq which belong to another cfq group, 
>> it's still likely that a coorperator(same cfqg) resides in prio_trees.
>> This patch introduces per cfq group prio_trees that should solve the above
>> issue.
>> 
>
> Hi Gui,
>
> I am not sure I understand the issue here.  So are you saying that once
> we find a cfqq which is close but belongs to a different group we reject
> it. But there could be another cfqq in the same group which is not as
> close but still close enough.
>
> For example, assume there are two queues q1 and q2 and in group and third
> queue q3 in group B. Assume q1 is active queue and we are searching for
> cooperator. If cooperator code finds q3 as closest then we will not pick
> this queue as it belongs to a different group. But it could happen that
> q2 is also close enough and we never considered that possibility.
>
> If yes, then its a good theoritical concern but I am worried practically
> how often does it happen. Do you have any workload which suffers because
> of this?

That was my reading.  It also means that, in the case that we have
cgroups in use, each rb tree will be smaller.

> I am not too inclined to push more complexity in CFQ until and unless we
> have a good use case.

I don't think this adds complexity, does it?  It simply moves the
priority trees up a level, which is arguably where they belong.

>> +static struct cfq_queue *
>> +cfq_prio_tree_lookup(struct cfq_group *cfqg, struct rb_root *root,
>> +		     sector_t sector, struct rb_node **ret_parent,
>> +		     struct rb_node ***rb_link)
>> +{

You can get rid of the cfqg argument.  I know you're just keeping with
the prior model (where cfqd was passed in and not used), but let's kill
it.

Cheers,
Jeff

  reply	other threads:[~2010-07-16 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16  9:21 Gui Jianfeng
2010-07-16 14:00 ` Vivek Goyal
2010-07-16 14:21   ` Jeff Moyer [this message]
2010-07-16 14:56     ` Vivek Goyal
2010-07-16 15:07       ` Jeff Moyer
2010-07-16 15:17         ` Vivek Goyal
2010-07-19  1:00         ` Gui Jianfeng

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=x49y6dbv75x.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=czoccolo@gmail.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --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

all inboxes | Powered by JetHome®