[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090623134240.GU28770@gandalf.sssup.it>
Date: Tue, 23 Jun 2009 15:42:40 +0200
From: Fabio Checconi <fchecconi@...il.com>
To: Balbir Singh <balbir@...ux.vnet.ibm.com>
Cc: Vivek Goyal <vgoyal@...hat.com>, linux-kernel@...r.kernel.org,
containers@...ts.linux-foundation.org, dm-devel@...hat.com,
jens.axboe@...cle.com, nauman@...gle.com, dpshah@...gle.com,
lizf@...fujitsu.com, mikew@...gle.com, paolo.valente@...more.it,
ryov@...inux.co.jp, fernando@....ntt.co.jp, s-uchida@...jp.nec.com,
taka@...inux.co.jp, guijianfeng@...fujitsu.com, jmoyer@...hat.com,
dhaval@...ux.vnet.ibm.com, righi.andrea@...il.com,
m-ikeda@...jp.nec.com, jbaron@...hat.com, agk@...hat.com,
snitzer@...hat.com, akpm@...ux-foundation.org, peterz@...radead.org
Subject: Re: [PATCH 02/20] io-controller: Common flat fair queuing code in elevaotor layer
> From: Balbir Singh <balbir@...ux.vnet.ibm.com>
> Date: Tue, Jun 23, 2009 01:02:52PM +0530
>
> * Fabio Checconi <fchecconi@...il.com> [2009-06-23 06:10:52]:
>
> > > From: Vivek Goyal <vgoyal@...hat.com>
> > > Date: Mon, Jun 22, 2009 10:43:37PM -0400
> > >
> > > On Mon, Jun 22, 2009 at 02:43:13PM +0200, Fabio Checconi wrote:
> > >
> > ...
> > > > > Please help me understand this, we sort the tree by finish time, but
> > > > > search by vtime, start_time. The worst case could easily be O(N),
> > > > > right?
> > > > >
> > > >
> > > > no, (again, the full answer is in the paper); the nice property of
> > > > min_start is that it partitions the tree in two regions, one with
> > > > eligible entities and one without any of them. once we know that
> > > > there is one eligible entity (checking the min_start at the root)
> > > > we can find the node i with min(F_i) subject to S_i < V walking down
> > > > a single path from the root to the leftmost eligible entity. (we
> > > > need to go to the right only if the subtree on the left contains
> > > > no eligible entities at all.) since the RB tree is balanced this
> > > > can be done in O(log N).
> > > >
> > >
> > > Hi Fabio,
> > >
> > > When I go thorough the paper you mentioned above, they seem to have
> > > sorted the tree based on eligible time (looks like equivalent of start
> > > time) and then keep track of minimum deadline on each node (equivalnet of
> > > finish time).
> > >
> > > We seem to be doing reverse in BFQ where we sort tree on finish time
> > > and keep track of minimum start time on each node. Is there any specific
> > > reason behind that?
> > >
> >
> > Well... no specific reasons... I think that our implementation is easier
> > to understand than the one of the paper, because it actually uses finish
> > times as the ordering key, and min_start to quickly locate eligible
> > subtrees, following the definition of the algorithm.
> >
>
> Is it still O(log N)?
>
Yes, it goes along a single path from the root to a leaf of a balanced
tree (i.e., it starts from the root, and at the end of each iteration
it selects the left or the right child of the current node), thus it is
O(log N).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists