~ubuntu-branches/ubuntu/saucy/numactl/saucy-proposed

« back to all changes in this revision

Viewing changes to get_mempolicy.2

  • Committer: Bazaar Package Importer
  • Author(s): Ian Wienand
  • Date: 2006-11-03 10:31:24 UTC
  • mfrom: (1.2.1 upstream) (3.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20061103103124-9dy65897wxq3g7ku
add powerpc.patch; fix FTBFS due to typo on PowerPC

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" Copyright 2003,2004 Andi Kleen, SuSE Labs.
2
 
.\"
3
 
.\" Permission is granted to make and distribute verbatim copies of this
4
 
.\" manual provided the copyright notice and this permission notice are
5
 
.\" preserved on all copies.
6
 
.\"
7
 
.\" Permission is granted to copy and distribute modified versions of this
8
 
.\" manual under the conditions for verbatim copying, provided that the
9
 
.\" entire resulting derived work is distributed under the terms of a
10
 
.\" permission notice identical to this one.
11
 
.\" 
12
 
.\" Since the Linux kernel and libraries are constantly changing, this
13
 
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
14
 
.\" responsibility for errors or omissions, or for damages resulting from
15
 
.\" the use of the information contained herein.  
16
 
.\" 
17
 
.\" Formatted or processed versions of this manual, if unaccompanied by
18
 
.\" the source, must acknowledge the copyright and authors of this work.
19
 
.TH GET_MEMPOLICY "2" "Nov 2003" "SuSE Labs" "Linux Programmer's Manual"
20
 
.SH SYNOPSIS
21
 
get_mempolicy - Retrieve NUMA memory policy for a process
22
 
.SH NAME
23
 
.B "#include <numaif.h>" 
24
 
.sp
25
 
.B int get_mempolicy(int *policy, unsigned long *nodemask, unsigned long maxnode, unsigned long addr, unsigned long flags) 
26
 
.\" TBD rewrite this. it is confusing.
27
 
.SH DESCRIPTION
28
 
.B get_mempolicy
29
 
retrieves the NUMA policy of the current process or an memory address.
30
 
A NUMA machine has different
31
 
memory controllers with different distances to specific CPUs.
32
 
The memory policy defines in which node memory is allocated for 
33
 
the process.   
34
 
.I get_mempolicy
35
 
gets the memory policy of the current process. The policy is stored into
36
 
.I policy
37
 
when not zero, with the associated nodemask stored into 
38
 
.I nodemask.
39
 
.I maxnode 
40
 
is the maximum bit number plus one that can be stored into 
41
 
.I nodemask.
42
 
The bit number is always rounded to an multiple of unsigned long.
43
 
 
44
 
.\" FIXME
45
 
.\" The other valid flag is 
46
 
.\" .I MPOL_F_NODE.
47
 
.\" It is only valid when the policy is 
48
 
.\" .I MPOL_INTERLEAVE.
49
 
.\" In this case not the interleave mask, but an unsigned long with the next
50
 
.\" node that would be used for interleaving is returned in 
51
 
.\" .I nodemask.
52
 
 
53
 
.\" Other flag values are reserved.
54
 
 
55
 
For an overview of the possible policies see the
56
 
.I set_mempolicy(2)
57
 
manpage.
58
 
 
59
 
.SH RETURN VALUE
60
 
.I get_mempolicy
61
 
returns -1 when an error occurred, otherwise 0.
62
 
 
63
 
.\" .SH ERRORS
64
 
.\" writeme
65
 
 
66
 
.SH NOTES
67
 
Applications should consider using the higher level functions
68
 
in 
69
 
.I numa(3)
70
 
instead. This library is available in the 
71
 
.I numactl
72
 
package.
73
 
 
74
 
This manpage is not documenting some obscure features
75
 
that can be enabled using 
76
 
.I flags.
77
 
 
78
 
.SH VERSIONS
79
 
The
80
 
.I get_mempolicy
81
 
syscall was added to the Linux kernel with version
82
 
.I 2.6.7rc1.
83
 
It is only available on kernels compiled with
84
 
.I CONFIG_NUMA.
85
 
 
86
 
Until glibc supports these system calls you can link with 
87
 
.I -lnuma
88
 
to get system call definitions. libnuma is available in the numactl
89
 
package. It also has the
90
 
.I numaif.h
91
 
header.
92
 
 
93
 
.SH SEE ALSO
94
 
.I mbind(2),
95
 
.I set_mempolicy(2),
96
 
.I numactl(8),
97
 
.I numa(3)