From: Con Kolivas <kernel@kolivas.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: BFS cpu scheduler and skip list implementation
Date: Sat, 24 Sep 2011 18:38:06 +1000 [thread overview]
Message-ID: <201109241838.06941.kernel@kolivas.org> (raw)
In-Reply-To: <20110924073522.GV7761@one.firstfloor.org>
On Sat, 24 Sep 2011 17:35:22 Andi Kleen wrote:
> On Sat, Sep 24, 2011 at 12:14:21PM +1000, Con Kolivas wrote:
> > On Sat, 24 Sep 2011 11:21:06 Andi Kleen wrote:
> > > Con Kolivas <kernel@kolivas.org> writes:
> > > > +struct nodeStructure {
> > > > + int level; /* Levels in this structure */
> > > > + keyType key;
> > > > + valueType value;
> > > > + skiplist_node *next[16];
> > > > + skiplist_node *prev[16];
> > > > +};
> > >
> > > That's 128 byte / 2 cache lines, not too bad, but it limits
> > > the maximum number of tasks that can be efficiently handled
> > > (my guess to around 64k with maxlevel == 16, but someone may
> > > correct me on that)
> >
> > Thanks very much for your informed comments. Do you mean once 64k of
> > tasks are queued concurrently, or after 64k of entries have gone in +/-
> > been removed?
>
> queued concurrently I believe.
That's great then. I'm sure we'd explode in other weird and wonderful ways
before the CPU load ever got to 64k. Plus all that would happen is that it
would start degenerating from O(log n) insertion to O(n) as the number way
surpassed 64k. The number 16 for levels was simply chosen as the one
originally used by William Pugh in his sample code, but seems to be ample for
this application.
Being very unimaginative with my benchmarking, a quick benchmark showed a
significant improvement in the make -j (allnoconfig kbuild) case on my quad core
from the previous BFS code (all with performance governor).
3.0.0:
Elapsed Time 28.7
3.0.0-bfs406:
Elapsed Time 28.5
3.0.0-bfs406-sl:
Elapsed Time 27.0
For convenience of those interested in testing:
Here's the original 3.0 -bfs 406 patch:
http://ck.kolivas.org/patches/bfs/3.0.0/3.0-sched-bfs-406.patch
And here's a combined bfs406 + skiplists patch:
http://ck.kolivas.org/patches/bfs/test/3.0-sched-bfs-406-skiplists.patch
--
-ck
next prev parent reply other threads:[~2011-09-24 8:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 23:45 BFS cpu scheduler and skip list implementation Con Kolivas
2011-09-24 1:21 ` Andi Kleen
2011-09-24 2:14 ` Con Kolivas
2011-09-24 7:35 ` Andi Kleen
2011-09-24 8:38 ` Con Kolivas [this message]
2011-09-29 20:45 ` Willy Tarreau
2011-09-29 22:58 ` Con Kolivas
2011-09-30 4:58 ` Willy Tarreau
2011-09-25 9:04 ` Heinz Diehl
2011-09-25 9:13 ` Con Kolivas
2011-09-25 11:16 ` Heinz Diehl
2011-09-25 11:19 ` Con Kolivas
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=201109241838.06941.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
/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