1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright 2003 Andries E. Brouwer (aeb@cwi.nl)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\"
.\" Japanese Version Copyright (c) 2004 Yuichi SATO
.\" all rights reserved.
.\" Translated 2004-06-06, Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated 2007-06-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.54
.\"
.\"WORD: huge page ҥ塼ڡ
.\"
.TH ALLOC_HUGEPAGES 2 2007-05-31 "Linux" "Linux Programmer's Manual"
.SH ̾
alloc_hugepages, free_hugepages \- 礭ʥΥڡγƤȲԤ
.SH
.nf
.BI "void *alloc_hugepages(int " key ", void *" addr ", size_t " len ,
.BI " int " prot ", int " flag );
.\" asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr,
.\" unsigned long len, int prot, int flag);
.sp
.BI "int free_hugepages(void *" addr );
.\" asmlinkage int sys_free_hugepages(unsigned long addr);
.fi
.SH
ƥॳ
.BR alloc_hugepages ()
.BR free_hugepages ()
Linux 2.5.36 Ƴ졢2.5.54 ǺƤӺ줿
Υƥॳ i386 ia64 Τߤ
(
.B CONFIG_HUGETLB_PAGE
ꤷƥӥɤ줿) ¸ߤ롣
Linux 2.4.20 Ǥ syscall ֹ椬¸ߤ뤬
ƤӽФȥ顼
.B ENOSYS
ǼԤ롣
.LP
i386 Ǥϡϡɥ̾Υڡ (4 KiB)
礭ʥΥڡ (ʲҥ塼ڡ; 2MiB ޤ 4 MiB)
ȤǤ롣
Ʊͤˡia64 ⤤ĤΥΥҥ塼ڡȤǤ롣
Υƥॳϡҥ塼ڡץΥ˥ޥåפꡢ
ƤӲꤹ롣
ҥ塼ڡϥ˥å졢åפʤ
.LP
.I key
ϼ̻ҤǤ롣
0 ξ硢ڡˤʤꡢҥץ˷Ѿʤ
ξ硢ڡƱ
.I key
Ȥ¾Υץꥱȶͭ졢ҥץ˷Ѿ롣
.LP
.BR free_hugepages ()
.I addr
ϡɤΥڡ뤫ꤹ:
.I addr
.BR alloc_hugepages ()
θƤӽФ֤ͤǤ
(ƤΥ桼Ȥˡ
ΥϽƼºݤ˲)
.BR alloc_hugepages ()
.I addr
ϥҥȤǤꡢͥϤ˽⤷ʤ
ʤ⤷ʤ
ɥ쥹֤ʤФʤʤ
.LP
.I len
ᤵ줿ȤĹǤ롣
ϥҥ塼ڡΥܿˤʤФʤʤ
.LP
.I prot
ϥȤΥݸꤹ롣
.BR PROT_READ ,
.BR PROT_WRITE ,
.B PROT_EXEC
Τ줫Ǥ롣
.LP
.I key
Ǥʤ¤ꡢ
.I flag
̵뤵롣
.I key
ǡ
.I flag
.B IPC_CREAT
ǤꡢĻꤵ줿
.I key
(Ȥ) ¸ߤʤ硢
ҥ塼ڡȤ롣
.I flag
ꤵƤ餺Ļꤵ줿
.I key
ΥȤ¸ߤʤ硢
.B ENOENT
֤롣
.SH ֤
硢
.BR alloc_hugepages ()
ϳƤ줿ۥɥ쥹֤
.BR free_hugepages ()
0 ֤
Ԥ硢\-1 ֤
.I errno
Ŭڤꤵ롣
.SH 顼
.TP
.B ENOSYS
ΥƥॳϥͥǥݡȤƤʤ
.SH ե
.TP
.I /proc/sys/vm/nr_hugepages
ꤵ줿 hugetlb ڡο
Υեɤ߽Ǥ롣
.TP
.I /proc/meminfo
ꤵ줿 hugetlb ڡοȡ
3 Ĥѿ HugePages_Total, HugePages_Free, Hugepagesize
ˤĤƤξ롣
.SH
Υƥॳ Intel ץå Linux ˸ͭΤΤǤꡢ
ܿɬפʥץǻȤ٤Ǥʤ
.SH
ΥƥॳϤʤʤä
Linux 2.5.36 2.5.54 ˤΤ¸ߤ롣
˺ hugetlbfs ե륷ƥȤȤǤ롣
(CPU ݡȤƤ) ҥ塼ڡĥϡ
.BR mmap (2)
ȤäƤβۥե륷ƥǥեޥåפ뤳ȤǼǤ롣
.LP
ҥ塼ڡκϡ
.B hugepages=
ưѥȤäƻǤ롣
.\" ("Processor type and features" ʲ) CONFIG_HUGETLB_PAGE
.\" ("Filesystems" ʲ).CONFIG_HUGETLBFS ɬפǤ롣
.\" mount -t hugetlbfs hugetlbfs /huge
.\" SHM_HUGETLB
|