|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH][RFC] consider vcpu-pin weight on Credit Scheduler TA
Hi, Keir
This patch intends
to consider vcpu-pin weight on credit scheduler TAKE2.
http://lists.xensource.com/archives/html/xen-devel/2007-06/msg00359.html
The difference from previous one is
1) Coding style clean up
2) Skip loop for unused vcpu-pin-count.
3) Remove if pin_count ==1 in multiple loop.
Then pin_count ==1 is another loop.
Signed-off-by: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
And one question,
Does this patch need following tune up for reducing multiple loop?
>From following
- /* sort weight */
- for(j=0;j<pin_count;j++)
- {
- sortflag = 0;
- for(k=1;k<pin_count;k++)
- {
- if ( pcpu_weight[pcpu_id_list[k-1]] > pcpu_weight[pcpu_id_list[k]]
)
- {
- sortflag = 1;
- pcpu_id_handle = pcpu_id_list[k-1];
- pcpu_id_list[k-1] = pcpu_id_list[k];
- pcpu_id_list[k] = pcpu_id_handle;
- }
- }
- if( sortflag == 0)break;
- }
To following
+ /* sort weight */
+ for(k=1;k<pin_count;k++)
+ {
+ if ( pcpu_weight[pcpu_id_list[k-1]] > pcpu_weight[pcpu_id_list[k]]
)
+ {
+ pcpu_id_handle = pcpu_id_list[k-1];
+ pcpu_id_list[k-1] = pcpu_id_list[k];
+ pcpu_id_list[k] = pcpu_id_handle;
+ if (k > 1) k -= 2;
+ }
+ }
Thanks
Atsushi SAKAI
vcpupinweight0627.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH][RFC] consider vcpu-pin weight on Credit Scheduler TAKE2,
Atsushi SAKAI <=
|
|
|
|
|