[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100605032226.GA20419@gvim.org>
Date: Fri, 4 Jun 2010 20:22:26 -0700
From: mark gross <640e9920@...il.com>
To: Florian Mickler <florian@...kler.org>
Cc: markgross@...gnar.org, 640e9920@...il.com,
Arve Hjønnevåg <arve@...roid.com>,
Brian Swetland <swetland@...gle.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Alan Stern <stern@...land.harvard.edu>,
Peter Zijlstra <peterz@...radead.org>,
Linux PM <linux-pm@...ts.linux-foundation.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Matthew Garrett <mjg59@...f.ucam.org>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)
On Thu, Jun 03, 2010 at 04:30:49PM +0200, Florian Mickler wrote:
> On Thu, 3 Jun 2010 06:24:49 -0700
> mark gross <640e9920@...il.com> wrote:
>
> > On Thu, Jun 03, 2010 at 12:10:03AM -0700, Arve Hjønnevåg wrote:
>
> > ok I'm not getting it.
> > is this a fancy com-sci algorithm I should know about?
> >
> > --mgross
>
> I think you are at an advantage if you have studied fancy com-sci for
> this? Here is an example:
>
> say you have 5 constraints:
> qos1 with a value of 10
> qos2 with 5
> qos3 with 10
> qos4 with 11
>
> Now, you hash that list by the qos-values:
>
> 11 ---- 10 ----- 5
> | | |
> qos4 qos3 qos2
> |
> qos1
>
>
> To compute the maximum you just walk the "----" list.
>
> To reduce qos4 from 11 to 5 you remove it from its "|" list and
> prepend it to the corresponding "|" list. (4 Pointer adjustments +
> searching the "-----" list for the right place to insert.
>
> result:
>
> 10 ---- 5
> | |
> qos3 qos4
> | |
> qos1 qos2
>
> Cheers,
Oh! ok, thats easy!
Thanks!!!
--mgross
--
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