All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: xen-devel@lists.xensource.com, Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: Ping: c/s 20526 (tools: avoid cpu over-commitment if numa=on)
Date: Wed, 13 Jan 2010 15:24:35 +0100	[thread overview]
Message-ID: <4B4DD7A3.70701@amd.com> (raw)
In-Reply-To: <4B4D8F1C02000078000299EC@vpn.id2.novell.com>

Jan Beulich wrote:
> Andre,
> 
> I'm afraid this change isn't really correct:
> 
>> +                cores_per_node = info['nr_cpus'] / info['nr_nodes']
>> +                nodes_required = (self.info['VCPUs_max'] + cores_per_node - 1) / cores_per_node
> 
> Simply using cores_per_node (as calculated here) as a divisor is bound
> to cause division-by-zero issues, namely when limiting the number of
> CPUs on the Xen command line (maxcpus=). I'm not sure though, what
> a reasonable solution to this might look like, since cores-per-node is
> a meaningless thing in an artificial setup like this, and may also be
> meaningless in asymmetric configurations. So perhaps we really need
> to iterate over nodes while summing up the number of CPUs they
> have until the number of needed vCPU-s was reached.
Thanks for the heads-up. I have created a better patch basically doing 
what you described, actually it is even more elegant than the original 
version. I am about to test it and will send it out as soon as the 
testing is finished.

Regards,
Andre.

-- 
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448 3567 12
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd; Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  parent reply	other threads:[~2010-01-13 14:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  8:15 Ping: c/s 20526 (tools: avoid cpu over-commitment if numa=on) Jan Beulich
2010-01-13  8:29 ` Keir Fraser
2010-01-13 14:24 ` Andre Przywara [this message]
2010-01-13 22:10 ` [PATCH] NUMA: Fix computation of needed nodes Andre Przywara

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=4B4DD7A3.70701@amd.com \
    --to=andre.przywara@amd.com \
    --cc=JBeulich@novell.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.