jari-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Jari-developers] smp question.


From: Alfeiks Kaänoken
Subject: Re: [Jari-developers] smp question.
Date: Tue, 5 Dec 2006 18:56:36 +0300

On Tue, 5 Dec 2006 18:52:53 +0300
"Dan Kruchinin" <address@hidden> wrote:

> i want to get some offers from you about smp.
> at current moment, i use global cpu's linked list, like this:
> extern struct cpu {
>   /* gdt */
>   /* tss */
>   /* idt */
>   /* memory area or areas */
>   struct cpu* next;
> } cpus;
> 
> so, if we have, for example, 8 cpus, we can't get "atomic" access to needed
> one, in this case we must walk along cpus list.
> this problem can be solved by using fixed array. in this case we have
> another minus, because array must be determined at compile time.
> so, if we have only 2 cpu, we will have array size = 2. and if user, for
> example, add new 2 cpus, he has to recompile kernel to increment cpu array
> size from 2 to 4.
> 
> - linked list can detect number of cpus dynamically, but on nearly each
> major operation, we should to make searching of needed cpu.
It's named a load balancing and politics for it, i.e. you have a list of the 
cpu load avergage and system that care about load balancing do the following:
 - select a best cpu
 - use it, without any search.
The getting of the loading avergage will be used anyway.
> - in fixed array we can fastly get needed cpu, this ds can't determine cpu's
> number dynamically.
It's a terrible and fucking method for dummies.
> 
> so, how do you think, what approach is better.
> 
> 10x for attention.
> 


-- 
Alfeiks Kaänoken,
Technical Team Leader of the
Jari R&D Team.
http://www.nongnu.org/jari/
Get the innovations!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]