Cool ! Thanks Bart and Eric, I'll write all this up on my blog and 
document it (besides the mail archives). I couldn't find a single doc on 
lpl's anywhere.

Rafael


Eric Saxe wrote:
> Rafael Vanoni wrote:
>> I've read a good deal of code involving lpl's but I'd like to clear a
>> couple of ideas around it. If anyone could comment on these, I'd
>> appreciate it.
>>
>> (a) lpl's are used to determine the load average of lgroups, which is
>> used by the dispatcher to load balance threads around
>>   
> Yes, that's true. An lpl actually represents an intersection between an 
> lgrp and a cpu partition. This subset of CPUs is what the dispatcher is 
> most interested in...since a thread's CPU partition (processor set) 
> constrains where it can run...and the dispatcher wants to consider the 
> lgrp's CPUs that are within that constrained set.
> 
>> (b) each lgrp has a lpl, which in turn may have leaf lpl's for each cpu
>> in that lgrp
>>   
> There may be multiple lpls associated with an lgrp...depending on how 
> many cpu partitions / processor sets intersect the lgrp. The number of 
> lpls an lgrp can have associated is limited only by the number of 
> logical CPUs it contains. Leaf lgrps will have associated leaf lpls. 
> Just as the lpl is the result of intersecting an lgrp with a cpu 
> partition, the lpl hierarchy is the result of intersecting a cpu 
> partition with the lgrp hierarchy.
> 
>> (c) lpl topology is created by lgrp code
>>   
> Yes...and triggered by processor set instantiation / destruction (and by 
> creation of the default CPU partition, of course).
> 
>> (d) only leaf lpl's have CPUs
>>   
> In the implementation this is true (an artifact of the CPUs living on 
> the lpl via a linked list, forcing higher order lpls to track CPUs using 
> a composite of leaf lpls)...but conceptually this isn't true. When lpl's 
> are re-implemented using the processor group abstraction, this confusing 
> little discrepancy will go away.
> 
>> (e) lpl's are the intersection of lgroups and CPU partitions
>>   
> I should have read through a-e before answering the above. :)
> 
>> I'm trying to understand where lpl's fir in the lgrp/cpus picture and 
>> what are their goal besides keep load averages (if any).
>>   
> Cool. Thanks!
> -Eric
> 
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to