2014-06-06 14:50:39 +00:00
|
|
|
/*
|
|
|
|
* numatune_conf.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Author: Martin Kletzander <mkletzan@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NUMATUNE_CONF_H__
|
|
|
|
# define __NUMATUNE_CONF_H__
|
|
|
|
|
2014-06-09 13:00:22 +00:00
|
|
|
# include <libxml/xpath.h>
|
|
|
|
|
2014-06-06 14:50:39 +00:00
|
|
|
# include "internal.h"
|
|
|
|
# include "virutil.h"
|
|
|
|
# include "virbitmap.h"
|
2014-06-09 13:00:22 +00:00
|
|
|
# include "virbuffer.h"
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _virDomainNumatune virDomainNumatune;
|
|
|
|
typedef virDomainNumatune *virDomainNumatunePtr;
|
2014-06-06 14:50:39 +00:00
|
|
|
|
|
|
|
typedef enum {
|
2014-06-08 17:15:42 +00:00
|
|
|
VIR_DOMAIN_NUMATUNE_PLACEMENT_DEFAULT = 0,
|
|
|
|
VIR_DOMAIN_NUMATUNE_PLACEMENT_STATIC,
|
|
|
|
VIR_DOMAIN_NUMATUNE_PLACEMENT_AUTO,
|
2014-06-06 14:50:39 +00:00
|
|
|
|
2014-06-08 17:15:42 +00:00
|
|
|
VIR_DOMAIN_NUMATUNE_PLACEMENT_LAST
|
|
|
|
} virDomainNumatunePlacement;
|
2014-06-06 14:50:39 +00:00
|
|
|
|
2014-06-08 17:15:42 +00:00
|
|
|
VIR_ENUM_DECL(virDomainNumatunePlacement)
|
2014-06-06 14:50:39 +00:00
|
|
|
VIR_ENUM_DECL(virDomainNumatuneMemMode)
|
|
|
|
|
2014-06-09 13:00:22 +00:00
|
|
|
|
|
|
|
void virDomainNumatuneFree(virDomainNumatunePtr numatune);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* XML Parse/Format functions
|
|
|
|
*/
|
2014-07-21 09:32:33 +00:00
|
|
|
int virDomainNumatuneParseXML(virDomainNumatunePtr *numatunePtr,
|
|
|
|
bool placement_static,
|
|
|
|
size_t ncells,
|
|
|
|
xmlXPathContextPtr ctxt)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
|
2014-06-09 13:00:22 +00:00
|
|
|
|
|
|
|
int virDomainNumatuneFormatXML(virBufferPtr buf, virDomainNumatunePtr numatune)
|
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Getters
|
|
|
|
*/
|
2014-06-26 17:46:45 +00:00
|
|
|
virDomainNumatuneMemMode virDomainNumatuneGetMode(virDomainNumatunePtr numatune,
|
|
|
|
int cellid);
|
2014-06-09 13:00:22 +00:00
|
|
|
|
|
|
|
virBitmapPtr virDomainNumatuneGetNodeset(virDomainNumatunePtr numatune,
|
2014-06-26 17:46:45 +00:00
|
|
|
virBitmapPtr auto_nodeset,
|
|
|
|
int cellid);
|
2014-06-09 13:00:22 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Formatters
|
|
|
|
*/
|
|
|
|
char *virDomainNumatuneFormatNodeset(virDomainNumatunePtr numatune,
|
2014-06-26 17:46:45 +00:00
|
|
|
virBitmapPtr auto_nodeset,
|
|
|
|
int cellid);
|
2014-06-09 13:00:22 +00:00
|
|
|
|
|
|
|
int virDomainNumatuneMaybeFormatNodeset(virDomainNumatunePtr numatune,
|
|
|
|
virBitmapPtr auto_nodeset,
|
2014-06-26 17:46:45 +00:00
|
|
|
char **mask,
|
|
|
|
int cellid);
|
2014-06-09 13:00:22 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Setters
|
|
|
|
*/
|
2014-07-21 09:32:33 +00:00
|
|
|
int virDomainNumatuneSet(virDomainNumatunePtr *numatunePtr,
|
|
|
|
bool placement_static,
|
|
|
|
int placement,
|
|
|
|
int mode,
|
|
|
|
virBitmapPtr nodeset)
|
2014-06-09 13:00:22 +00:00
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Other accessors
|
|
|
|
*/
|
|
|
|
bool virDomainNumatuneEquals(virDomainNumatunePtr n1,
|
|
|
|
virDomainNumatunePtr n2);
|
|
|
|
|
|
|
|
bool virDomainNumatuneHasPlacementAuto(virDomainNumatunePtr numatune);
|
2014-06-06 14:50:39 +00:00
|
|
|
|
2014-06-26 17:46:45 +00:00
|
|
|
bool virDomainNumatuneHasPerNodeBinding(virDomainNumatunePtr numatune);
|
|
|
|
|
2014-11-04 02:44:40 +00:00
|
|
|
int virDomainNumatuneSpecifiedMaxNode(virDomainNumatunePtr numatune);
|
2014-11-06 11:16:54 +00:00
|
|
|
|
|
|
|
bool virDomainNumatuneNodesetIsAvailable(virDomainNumatunePtr numatune,
|
|
|
|
virBitmapPtr auto_nodeset);
|
2014-06-06 14:50:39 +00:00
|
|
|
#endif /* __NUMATUNE_CONF_H__ */
|