All of lore.kernel.org
 help / color / mirror / Atom feed
* How to find out how much cpu time each domain used?
@ 2016-07-04 20:09 Amin Fallahi
  2016-07-13  8:07 ` Dario Faggioli
  0 siblings, 1 reply; 2+ messages in thread
From: Amin Fallahi @ 2016-07-04 20:09 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 351 bytes --]

Dear all

I am modifying credit scheduler and I want to give credit to each vcpu
based on cpu time which its domain has consumed.
Suppose:
credit_fair =((credit_total*sdom->weight)+(weight_total-1))/weight_total

I want to multiply something to this formula according to the domain cpu
usage. Thus I need to somehow find out cpu time for each domain.

[-- Attachment #1.2: Type: text/html, Size: 431 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to find out how much cpu time each domain used?
  2016-07-04 20:09 How to find out how much cpu time each domain used? Amin Fallahi
@ 2016-07-13  8:07 ` Dario Faggioli
  0 siblings, 0 replies; 2+ messages in thread
From: Dario Faggioli @ 2016-07-13  8:07 UTC (permalink / raw)
  To: Amin Fallahi, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1569 bytes --]

On Mon, 2016-07-04 at 20:09 +0000, Amin Fallahi wrote:
> Dear all
> 
> I am modifying credit scheduler and I want to give credit to each
> vcpu based on cpu time which its domain has consumed.
> Suppose:
> credit_fair =((credit_total*sdom->weight)+(weight_total-
> 1))/weight_total
> 
Mind describing what your actual end goal is, and spending a little
more word describing how you were thinking to achieve it?

I see the formula, but I don't understand:
 - what is it that you are trying to improve/achieve? Better fairness, 
   I guess?
 - how do you plan to use such formula, i.e., where in the algorithm 
   you'd put it? Credits are already been burned basing on how much a 
   vcpu executes, is this about how much credits a vcpu is given at 
   the beginning/reset? How would it integrate with credits_per_tslice 
   and friends?

> I want to multiply something to this formula according to the domain
> cpu usage. Thus I need to somehow find out cpu time for each domain.
>
Cpu usage in terms of what? Time? Percentage? Over what time interval?

It is certainly possible to figure out how long a vcpu executed on a
pcpu on a given time interval, but depending from the characteristics
of such time interval, the way to actually do that varies.

Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-13  8:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-04 20:09 How to find out how much cpu time each domain used? Amin Fallahi
2016-07-13  8:07 ` Dario Faggioli

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.