Re: [numatune PATCH v2] Support NUMA tuning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ä 2011å05æ13æ 17:42, Daniel P. Berrange åé:
On Thu, May 12, 2011 at 11:01:09PM +0800, Osier Yang wrote:
ä 2011å05æ12æ 22:11, Eric Blake åé:
On 05/12/2011 05:01 AM, Osier Yang wrote:
The new XML is like:

<numatune>
    <memory model="interleave" nodeset="+0-4,8-12"/>
<numatune>

Compatibility with numactl syntax is an explicit non-goal.
numactl is just one platform specific impl.  Compatibility
with numactl syntax is of no interest to the ESX or VirtualBox
drivers. The libvirt NUMA syntax should be using other
existing libvirt XML as the design compatibility target.

Hi, Dan

The syntax is actually not of numactl, but of libnuma, it
provides API numa_parse_nodestring() to parse the syntax,

The point we're trying to make is that the XML should _not_ match
libnuma, but should match<vcpu cpuset=...>.  That is, the XML should
use 0-4,^3 to mean 0, 1, 2, 4; and then we need an internal translation
routine that converts ^ to + before calling libnuma functions.

"+" means different with "^".

[quote]
The + indicates that the node  numbers  are relative to the process'
set of allowed nodes in its current cpuset.
[/quote]

Also "!",

[quote]
A !N-N notation indicates the inverse of N-N,  in other words all
nodes except N-N
[/quote]


The fact that we use libnuma under the hood is an implementation detail;
in the future we may find it easier to use some other mechanism to get
the same semantic effect, and that other mechanism may have yet some
third syntax.  Therefore, it is better for libvirt to present consistent
syntax for all of its cpuset parsing, rather than to have two different
cpuset spellings based on what under-the-hood capability it is targetting.


Agree that we may use other mechanism to get the same sementic effect
in future, this is good consideration.

but the syntax is for NUMA *NODE* set, not *CPU* set, if we use same
syntax as cpuset for NUMA nodeset, then we lose some semantics, e.g.
for a "!2-4", we could use "^2,^3,^4" as an alternative solution,
though it looks quite uncomfortable, and the disadvantage is
we abort some smarter syntax, but the advantage is we follow the
syntax of cpuset, and actually they are just different at user
visible level, the final bitmask are same.

There is no reason why '^2' couldn't also be made to support '^2-4'
in our current CPU set parsing code.

But for "+2-4", we have no alternative solution with cpuset's syntax,
as far as I could understand, it has specific meaning for NUMA nodeset.

That kind of syntax does not make sense for libvirt. Configuration
should not be described relative to the current runtime policy. The
XML description should be self-contained&  canonical format. So I
consider it a benefit that we don't support that syntax.

Okay, talked with Bill, he's fine with losing of syntax "+", so
my mainly reason to persistent in the syntax is not meaningful
anymore, :-)

Without considering the losing of syntax "+", yes, we need to
confirm with the already existed cpuset syntax. Will update.

Thanks for the patience.

Regards
Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]