All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: Cpupools and pdata_alloc
Date: Tue, 11 May 2010 06:48:49 +0200	[thread overview]
Message-ID: <4BE8E1B1.2030305@ts.fujitsu.com> (raw)
In-Reply-To: <AANLkTin3dC9sCDP1-zwKog6BZtwaHAmkt53NqwAZtiNw@mail.gmail.com>

On 05/10/2010 07:47 PM, George Dunlap wrote:
> It appears that in the new cpupools code:
> * pdata_allocate is called from alloc_vcpu() with that cpu for the first time.
> * this happens usually when dom0's cpus are allocated, as it cycles
> through all of the cpus

No. It happens when idle vcpus are allocated. At this time there is no cpupool
existing, all physical cpus are marked as "free", e.g. they are in no pool at
all.
Dom0 vcpus are allocated in Pool-0. This pool is created after allocation of
the idle vcpus.

>
> This seems a bit strange to me.  Wouldn't it make more sense to pass,
> or to make available, a cpumask of the cpus in a pool to the init
> function?

No. A cpupool is created without any cpu in the beginning. Whenever a cpu is
added to a cpupool, alloc_pdata is called for this cpu.

BTW: Allocating the percpu data of the scheduler during the allocation of the
first vcpu on this cpu was in sched_credit.c before cpupools were introduced.

>
> Also, is there documentation of the cpupool lifecycle anywhere, to
> help scheduler writers understand what's going on?

Not yet.
I'll write something up in the next days.


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

  reply	other threads:[~2010-05-11  4:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10 17:47 Cpupools and pdata_alloc George Dunlap
2010-05-11  4:48 ` Juergen Gross [this message]
2010-05-11 17:25   ` George Dunlap
2010-05-11 18:41     ` Keir Fraser
2010-05-11 18:52       ` George Dunlap
2010-05-11 18:55         ` Keir Fraser
2010-05-12  4:52     ` Juergen Gross

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=4BE8E1B1.2030305@ts.fujitsu.com \
    --to=juergen.gross@ts.fujitsu.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=keir.fraser@eu.citrix.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.