libsysve  2.11.0
MISC

Miscellaneous APIs. More...

Functions

int ve_get_numa_node (unsigned *node)
 This function returns NUMA node number on which process is running. More...
 
int ve_get_veos_pid (void)
 this functions returns VEOS pid managing this process. More...
 
int ve_get_nonswappable (uint64_t *size)
 This function gets maximum size of non-swappable memory of a caller process at that time. More...
 
int ve_get_vemva_region (uint64_t *addr, size_t *size, int64_t *offset)
 This function returns RDMA_OFFSET, start address and size of VE memory virtual address region. More...
 
int ve_get_ve_product_name (char *name, size_t size)
 This function gets VE product neme from a sysfs file of current VE node. More...
 

Detailed Description

Miscellaneous APIs.

Please include "libsysve.h" in the source file.

Function Documentation

int ve_get_numa_node ( unsigned *  node)

This function returns NUMA node number on which process is running.

Parameters
[out]nodeNUMA node number is stored into the integer pointed by it.
Return values
0on sucess.
-1is returned and errno is set on failure.
  • EFAULT Argument points an invalid address.
int ve_get_veos_pid ( void  )

this functions returns VEOS pid managing this process.

Return values
pidof VEOS on success.
-1is returned and errno is set on failure.
int ve_get_nonswappable ( uint64_t *  size)

This function gets maximum size of non-swappable memory of a caller process at that time.

Parameters
[out]sizePointer to the value in which maximum size in byte of non-swappable memory will be stored.
Return values
0on sucess.
-1is returned and errno is set on failure.
int ve_get_vemva_region ( uint64_t *  addr,
size_t *  size,
int64_t *  offset 
)

This function returns RDMA_OFFSET, start address and size of VE memory virtual address region.

Parameters
[out]addrPointer to a variable which stores start address of VE memory virtual address region.
[out]sizePointer to a variable which stores size of VE memory virtual address region.
[out]offsetPointer to a variable which stores RDMA_OFFSET.
Return values
0on sucess.
-1is returned and errno is set on failure.
int ve_get_ve_product_name ( char *  name,
size_t  size 
)

This function gets VE product neme from a sysfs file of current VE node.

Parameters
[out]nameAddress of buffer to store VE product name. VE product name will be a null-terminated string even if buffer size is small or equal to the size of information.
[in]sizeBuffer (name) size.
Return values
0on sucess.
-1is returned and errno is set on failure.