1lgrp_latency(3LGRP)    Locality Group Library Functions    lgrp_latency(3LGRP)
2
3
4

NAME

6       lgrp_latency, lgrp_latency_cookie - get latency between two lgroups
7

SYNOPSIS

9       cc [ flag... ] file... -llgrp [ library... ]
10       #include <sys/lgrp_user.h>
11
12       int lgrp_latency_cookie(lgrp_cookie_t cookie, lgrp_id_t from,
13            lgrp_id_t to, lgrp_lat_between_t between);
14
15
16       int lgrp_latency(lgrp_id_t from, lgrp_id_t to);
17
18

DESCRIPTION

20       The  lgrp_latency_cookie() function takes a cookie representing a snap‐
21       shot of the lgroup hierarchy obtained from lgrp_init(3LGRP) and returns
22       the  latency  value between a hardware resource in the from lgroup to a
23       hardware resource in the to lgroup. If from is the same lgroup  as  to,
24       the latency value within that lgroup is returned.
25
26
27       The  between  argument  should be set to the following value to specify
28       between which hardware resources the latency should be measured:
29
30         LGRP_LAT_CPU_TO_MEM     /* latency from CPU to memory */
31
32
33
34       The latency value is defined by the operating system and  is  platform-
35       specific. It can be used only for relative comparison of lgroups on the
36       running system. It does not necessarily represent  the  actual  latency
37       between  hardware  devices, and it might not be applicable across plat‐
38       forms.
39
40
41       The lgrp_latency() function is similiar  to  the  lgrp_latency_cookie()
42       function,  but  returns  the  latency  between the given lgroups at the
43       given instant in time. Since lgroups can be freed and reallocated, this
44       function might not be able to provide a consistent answer across calls.
45       For that reason, the lgrp_latency_cookie() function should be  used  in
46       its place.
47

RETURN VALUES

49       Upon successful completion, the latency value is returned. Otherwise −1
50       is returned and errno is set to indicate the error.
51

ERRORS

53       The lgrp_latency_cookie() and lgrp_latency() functions will fail if:
54
55       EINVAL    The specified cookie, lgroup  ID,  or  value  given  for  the
56                 between argument is not valid.
57
58
59       ESRCH     The  specified  lgroup ID was not found, the from lgroup does
60                 not contain any CPUs, or the to lgroup does not have any mem‐
61                 ory.
62
63

ATTRIBUTES

65       See attributes(5) for descriptions of the following attributes:
66
67
68
69
70       ┌─────────────────────────────┬─────────────────────────────┐
71       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
72       ├─────────────────────────────┼─────────────────────────────┤
73       │Interface Stability          │Evolving                     │
74       ├─────────────────────────────┼─────────────────────────────┤
75       │MT-Level                     │MT-Safe                      │
76       └─────────────────────────────┴─────────────────────────────┘
77

SEE ALSO

79       lgrp_init(3LGRP),       lgrp_parents(3LGRP),      lgrp_children(3LGRP),
80       liblgrp(3LIB), attributes(5)
81
82
83
84SunOS 5.11                        26 Jan 2005              lgrp_latency(3LGRP)
Impressum