[lkml]   [2004]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Lse-tech] [RFC PATCH] scheduler: Dynamic sched_domains
On Fri, 2004-10-08 at 15:51, Erich Focht wrote:
> Hmmm, this is unusable as long as you don't tell me how to create new
> levels and link them together. Adding CPUs is the simplest
> part. I'm with Matt here, the filesystem approach is the most
> elegant. On the other hand something simple for the start wouldn't be
> bad. It would show immediately whether Matt's or your way of dealing
> with domains is better suited for relinking and reorganising the
> domains structure dynamically. Functionality could be something like:
> - list domains
> - create domain
> - add child domains
> - link in parent domain
> We're building this from bottom (cpus) up and need to take care of the
> unlinking of the global domain when inserting something. But otherwise
> this could be sufficient.
> Regards,
> Erich

I personally like to think of it from the top down. The internal API I
came up with looks like:

create_domain(parent_domain, type);
add_cpu_to_domain(cpu, domain);

So you basically build your domain from the top down, from your 1 or
more top-level domains, down to your lowest level domains. You then add
cpus (1 or more per domain) to the leaf domains in the tree you built.
Those cpus cascade up the tree, and the whole tree knows exactly which
cpus are contained in each domain in it.

I think these are the three main functions you need to construct pretty
much any conceivable, useful sched_domains hierarchy.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:06    [W:0.123 / U:0.476 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site