rs_getinfo Subroutine

Purpose

Gets information about a resource set.

Library

Standard C library (libc.a)

Syntax

#include <sys/rset.h>
int rs_getinfo(rset, info_type, flags)
rsethandle_t rset;
rsinfo_t info_type;
unsigned int flags;

Description

The rs_getinfo subroutine retrieves information about the resource set identified by the rset parameter. Depending on the value of the info_type parameter, the rs_getinfo subroutine returns information about the number of available processors, the number of available memory pools, or the amount of available memory contained in the resource rset. The subroutine can also return global system information such as the maximum system detail level, the symmetric multiprocessor (SMP) and multiple chip module (MCM) system detail levels, and the maximum number of processor or memory pool resources in a resource set.

Parameters

Item Description
rset Specifies a resource set handle of a resource set the information should be retrieved from. This parameter is not meaningful if the info_type parameter is R_MAXSDL, R_MAXPROCS, R_MAXMEMPS, R_SMPSDL, or R_MCMSDL.
info_type Specifies the type of information being requested. One of the following values (defined in rset.h) can be used:
  • R_LGPGDEF: The number of defined large pages in the resource set is returned in units of megabytes.
  • R_LGPGFREE: The number of free large pages in the resource set is returned in units of megabytes.
  • R_NUMPROCS: The number of available processors in the resource set is returned.
  • R_NUMMEMPS: The number of available memory pools in the resource set is returned.
  • R_MEMSIZE: The amount of available memory (in MB) contained in the resource set is returned.
  • R_MAXSDL: The maximum system detail level of the system is returned.
  • R_MAXPROCS: The maximum number of processors that may be contained in a resource set is returned.
  • R_MAXMEMPS: The maximum number of memory pools that may be contained in a resource set is returned.
  • R_SMPSDL: The system detail level that corresponds to the traditional notion of an SMP is returned. A system detail level of 0 is returned if the hardware system does not provide system topology data.
  • R_MCMSDL: The system detail level that corresponds to resources packaged in an MCM is returned. A system detail level of 0 is returned if the hardware system does not have MCMs or does not provide system topology data.
  • R_SRADSDL: The system detail level that corresponds to system’s scheduler resource allocation domain is returned. This SDL is the basis for most affinity resource allocation and scheduling activities. This SDL identifies resources that have a local relationship.
  • R_REF1SDL: The system detail level of the first hardware provided affinity reference point. This SDL identifies resources that have a near relationship. Only some hardware systems provide a R_REF1SDL reference point. On systems that do not provide a reference point, the R_REF1SDL will identify the R_SRADSDL system detail level.
  • R_MAXSRADS: The maximum number of RADs at the R_SRADSDL system detail level is returned.
  • R_GENERATION: The generation number of the system’s current resource set topology is returned. The number increases whenever a change to the system’s resource set topology occurs. For example, the dynamic reconfiguration that adds a CPU to the system causes the generation number to increase.
flags Reserved for future use. Specify as 0.

Return Values

If successful, the requested information is returned. If unsuccessful, a value of -1 is returned and the errno global variable is set to indicate the error.

Error Codes

The rs_getinfo subroutine is unsuccessful if one or more of the following are true:

Item Description
EINVAL One of the following is true:
  • The info_type parameter specifies an invalid resource type value.
  • The flags parameter was not specified as 0.
EFAULT Invalid address.