All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Ackaouy <ackaouy@gmail.com>
To: Atsushi SAKAI <sakaia@jp.fujitsu.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH][RFC] consider vcpu-pin weight on Credit Scheduler TAKE2
Date: Wed, 27 Jun 2007 13:46:38 +0200	[thread overview]
Message-ID: <4670ea394e9afc4df54c0595a807c031@gmail.com> (raw)
In-Reply-To: <200706270758.l5R7wB8V011451@fjmscan501.ms.jp.fujitsu.com>

I think this patch is too large and intrusive in the common paths.
I understand the problem you are trying to fix. I don't think it is
serious enough to call for such a large change. The accounting
code is already tricky enough, don't you think? If you reduce the
scope of the problem you're addressing, I think we should be
able to get a much smaller, cleaner and robust change in place.

There are many different scenarios when using pinning that
screws with set weights. Have you considered them all?

For example:

VCPU0.0:0-1, VCPU0.1:1-2 weight 256
VCPU1.0-0-2, VCPU1.1:0-2 weight 512

Does your patch deal with cases when there are multiple
domains with multiple VCPUs each and not all sharing the
same cpu affinity mask? I'm not even sure myself what
should happen in some of these situations...

I argue that the general problem isn't important to solve. The
interesting problem is a small subset: When a set of physical
CPUs are set aside for a specific group of domains, setting
weights for those domains should behave as expected. For
example, on an 8way host, you could set aside 2CPUs for
development work and assign different weights to domains
running in that dev group. You would expect the weights to
work normally.

The best way to do this though is not to screw around with
weights and credit when VCPUs are pinned. The cleanest
modification is to run distinct credit schedulers: 1 for dev on
2CPUs, and 1 for the rest.

You could probably achieve this in a much smaller patch which
would include administrative interfaces for creating and destroying
these dynamic CPU partition groups as well assigning domains to
them.

On Jun 27, 2007, at 9:58, Atsushi SAKAI wrote:

> 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@jp.fujitsu.com>
>
> 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>______________________________________________ 
> _
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2007-06-27 11:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-27  7:58 [PATCH][RFC] consider vcpu-pin weight on Credit Scheduler TAKE2 Atsushi SAKAI
2007-06-27 11:46 ` Emmanuel Ackaouy [this message]
2007-06-27 12:07   ` [PATCH][RFC] consider vcpu-pin weight on CreditScheduler TAKE2 Atsushi SAKAI
2007-06-27 12:21     ` Emmanuel Ackaouy
2007-06-27 12:31       ` Keir Fraser
2007-06-27 12:52         ` Emmanuel Ackaouy
2007-06-28  9:23         ` [PATCH][RFC] consider vcpu-pin weight onCreditScheduler TAKE2 Atsushi SAKAI

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=4670ea394e9afc4df54c0595a807c031@gmail.com \
    --to=ackaouy@gmail.com \
    --cc=sakaia@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.