mld(3)

mld_create, mld_destroy, process_mldlink, process_cpulink, numa_acreate - memory locality domain operations

As shipped in IRIX 6.5.7. Last changed in IRIX 6.5.7.

NAME
     mld_create, mld_destroy, process_mldlink, process_cpulink, numa_acreate -
     memory locality domain operations

SYNOPSIS
     #include <sys/types.h>
     #include <sys/pmo.h>

     pmo_handle_t mld_create(int radius, long size)

     int mld_destroy(pmo_handle_t mld_handle)

     int process_mldlink(pid_t pid, pmo_handle_t mld_handle, rqmode_t rqmode)

     int process_cpulink(pid_t pid, pmo_handle_t mld_handle, cpuid_t lcpuid,
                         rqmode_t rqmode)

     void* numa_acreate(pmo_handle_t mld, size_t arena_size, size_t page_size)


DESCRIPTION
     mld_create creates a memory locality domain.

     mld_destroy destroys a memory locality domain.

     process_mldlink attaches a process to an MLD. When a process is attached
     to an MLD, the process scheduler tries to activate the process on a CPU
     in the node where the MLD has been placed.

     process_cpulink attaches a process to a specific processor within an MLD.
     This operation forces a process to always run on the same processor using
     `mustrun' (see sysmp(2)).

     numa_acreate creates an arena for memory allocation on a specific MLD.

     mld_create will fail and a MLD will not be created if one or more of the
     following are true:

     EFAULT         Arguments could not be copied into kernel space.

     ENOMEM         No memory or kernel table space is available to create and
                    hold the MLD.

     ENOTSUP        Memory locality domains are not supported on this system
                    architecture.

     mld_destroy will fail and no MLD will be destroyed if one or more of the
     following are true:

     EINVAL         The mld_handle is invalid.
     ENOTSUP        Memory locality domains are not supported on this system
                    architecture.

     process_mldlink will fail and the process will not be attached to an MLD
     if one ore more of the following are true:

     EDEADLK        The operation would cause a deadlock to occur.

     EINVAL         The mld_handle is invalid or does not exist.

     ENOTSUP        Memory locality domains are not supported on this system
                    architecture.

     ESRCH          The specified pid does not exist.

     EXDEV          The MLD has not been placed. (Call mldset_place(3c)
                    first.)

     process_cpulink will fail and the process will not be attached to an MLD
     if one or more of the following are true:

     EDEADLK        The operation would cause a deadlock to occur.

     EINVAL         The specified mld_handle is invalid or does not exist.

     EINVAL         The MLD is placed on a CPU which is not present.

     EINVAL         The process could not be made to run on a CPU in the MLD.

     ENOTSUP        Memory locality domains are not supported on this system
                    architecture.

     ESRCH          The specified pid does not exist.

     EXDEV          The MLD has not been placed. (Call mldset_place(3c)
                    first.)

     numa_acreate will fail and no memory arena will be created (and set
     errno) under the same circumstances that acreate(2) will fail. It will
     also fail and no memory arena will be created if one or more of the
     following are true:

     EFAULT         Arguments could not be copied into kernel space.

     EINVAL         The specified MLD is invalid.

     ENOTSUP        Memory locality domains are not supported on this system
                    architecture.

     ESRCH          The specified MLD does not exist.
SEE ALSO
     acreate(2), numa(5), mmci(5), mldset(3c), pm(3c), amalloc(3p), sysmp(2),
     migration(3c), pminfo(3c).

DIAGNOSTICS
     Upon successful completion, mld_create returns a value of type
     pmo_handle_t.  Otherwise, a value of -1 is returned and errno is set to
     indicate the error.

     Upon successful completion, mld_destroy, process_mldlink, and
     process_cpulink return 0.  Otherwise, a value of -1 is returned and errno
     is set to indicate the error.

     Upon successful completion, numa_acreate returns a pointer to the memory
     arena which has been created.  Otherwise NULL will be returned and errno
     is set to indicate the error.