OSDN Git Service

Update draft based on LDP v3.75 po4a files
[linuxjm/LDP_man-pages.git] / draft / man2 / madvise.2
index 538b45b..b6b273e 100644 (file)
@@ -45,7 +45,7 @@
 .\" Updated 2013-05-01, Akihiro MOTOKI <amotoki@gmail.com>
 .\" Updated 2013-07-31, Akihiro MOTOKI <amotoki@gmail.com>
 .\"
-.TH MADVISE 2 2012\-04\-28 Linux "Linux Programmer's Manual"
+.TH MADVISE 2 2014\-04\-20 Linux "Linux Programmer's Manual"
 .SH 名前
 madvise \- メモリ利用に関するアドバイスを与える
 .SH 書式
@@ -127,74 +127,55 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 の前後でマッピングは継承されるようになる。
 .TP 
 \fBMADV_HWPOISON\fP (Linux 2.6.32 以降)
-Poison a page and handle it like a hardware memory corruption.  This
-operation is available only for privileged (\fBCAP_SYS_ADMIN\fP)  processes.
-This operation may result in the calling process receiving a \fBSIGBUS\fP and
-the page being unmapped.  This feature is intended for testing of memory
-error\-handling code; it is available only if the kernel was configured with
-\fBCONFIG_MEMORY_FAILURE\fP.
+ページに毒入れを行い、ハードウェアメモリの破損のようにそのページを取り扱う。 この操作は特権 (\fBCAP_SYS_ADMIN\fP を持った)
+プロセスだけが利用できる。 この操作の結果、呼び出したプロセスは \fBSIGBUS\fP を受け取り、そのページはアンマップされる。
+この機能はメモリのエラー処理コードをテストするためのものである。 カーネルで \fBCONFIG_MEMORY_FAILURE\fP
+が有効になっている場合にのみ利用可能である。
 .TP 
 \fBMADV_SOFT_OFFLINE\fP (Linux 2.6.33 以降)
-Soft offline the pages in the range specified by \fIaddr\fP and \fIlength\fP.  The
-memory of each page in the specified range is preserved (i.e., when next
-accessed, the same content will be visible, but in a new physical page
-frame), and the original page is offlined (i.e., no longer used, and taken
-out of normal memory management).  The effect of the \fBMADV_SOFT_OFFLINE\fP
-operation is invisible to (i.e., does not change the semantics of)  the
-calling process.  This feature is intended for testing of memory
-error\-handling code; it is available only if the kernel was configured with
-\fBCONFIG_MEMORY_FAILURE\fP.
+\fIaddr\fP と \fIlength\fP で指定された範囲のページをソフトオフラインにする。 指定された範囲の各ページのメモリの内容は保持され
+(すなわち、次にアクセスされた際に、同じ内容が見えるが、新しい物理ページフレームになる)、 元のフレームはオフラインになる (すなわち、
+そのフレームは使用される、通常のメモリ管理からは取り除かれる)。 \fBMADV_SOFT_OFFLINE\fP 操作の影響は呼び出したプロセスには見えない
+(つまり呼び出したプロセスの動作は変化しない)。 この機能はメモリのエラー処理コードをテストすることを目的に作られた。 カーネルで
+\fBCONFIG_MEMORY_FAILURE\fP が有効になっている場合にのみ利用可能である。
 .TP 
 \fBMADV_MERGEABLE\fP (Linux 2.6.32 以降)
-Enable Kernel Samepage Merging (KSM) for the pages in the range specified by
-\fIaddr\fP and \fIlength\fP.  The kernel regularly scans those areas of user
-memory that have been marked as mergeable, looking for pages with identical
-content.  These are replaced by a single write\-protected page (which is
-automatically copied if a process later wants to update the content of the
-page).  KSM merges only private anonymous pages (see \fBmmap\fP(2)).  The KSM
-feature is intended for applications that generate many instances of the
-same data (e.g., virtualization systems such as KVM).  It can consume a lot
-of processing power; use with care.  See the Linux kernel source file
-\fIDocumentation/vm/ksm.txt\fP for more details.  The \fBMADV_MERGEABLE\fP and
-\fBMADV_UNMERGEABLE\fP operations are available only if the kernel was
-configured with \fBCONFIG_KSM\fP.
+Kernel Samepage Merging (KSM; カーネルによる同じページの統合) を \fIaddr\fP と \fIlength\fP
+で指定された領域に対して有効にする。 カーネルは、 統合可能の印がついたユーザーメモリの領域を定期的にスキャンし、内容が全く同じページを探す。
+内容が全く同じページがあれば、それらのページは書き込み保護 (write\-protected) がかかった一つのページで置き換えられる
+(プロセスが後でページの内容を更新しようとした際には自動的にページのコピーが行われる)。 KSM はプライベートな無名ページ (anonymous
+pages) だけを統合する (\fBmmap\fP(2) 参照)。 KSM 機能は、 同じデータのインスタンスを大量に生成するアプリケーション (KVM
+などの仮想化システム) での利用を想定している。 この機能はプロセッシング能力を大量に消費する場合があり、注意して使用すること。 詳細は Linux
+カーネルソースファイル \fIDocumentation/vm/ksm.txt\fP を参照。 \fBMADV_MERGEABLE\fP と
+\fBMADV_UNMERGEABLE\fP は、 カーネルで \fBCONFIG_KSM\fP オプションを有効になっている場合にのみ利用できる。
 .TP 
 \fBMADV_UNMERGEABLE\fP (Linux 2.6.32 以降)
-Undo the effect of an earlier \fBMADV_MERGEABLE\fP operation on the specified
-address range; KSM unmerges whatever pages it had merged in the address
-range specified by \fIaddr\fP and \fIlength\fP.
+指定されたアドレス範囲に関して、それ以前に行われた \fBMADV_MERGEABLE\fP 操作の効果を取り消す。 KSM は、  \fIaddr\fP と
+\fIlength\fP で指定されたアドレス範囲の統合済みのすべてのページの統合解除を行う。
 .TP 
 \fBMADV_HUGEPAGE\fP (Linux 2.6.38 以降)
 .\" http://lwn.net/Articles/358904/
 .\" https://lwn.net/Articles/423584/
-Enables Transparent Huge Pages (THP) for pages in the range specified by
-\fIaddr\fP and \fIlength\fP.  Currently, Transparent Huge Pages work only with
-private anonymous pages (see \fBmmap\fP(2)).  The kernel will regularly scan
-the areas marked as huge page candidates to replace them with huge pages.
-The kernel will also allocate huge pages directly when the region is
-naturally aligned to the huge page size (see \fBposix_memalign\fP(2)).  This
-feature is primarily aimed at applications that use large mappings of data
-and access large regions of that memory at a time (e.g., virtualization
-systems such as QEMU).  It can very easily waste memory (e.g., a 2MB mapping
-that only ever accesses 1 byte will result in 2MB of wired memory instead of
-one 4KB page).  See the Linux kernel source file
-\fIDocumentation/vm/transhuge.txt\fP for more details.  The \fBMADV_HUGEPAGE\fP
-and \fBMADV_NOHUGEPAGE\fP operations are available only if the kernel was
-configured with \fBCONFIG_TRANSPARENT_HUGEPAGE\fP.
+Transparent Huge Pages (THP) を \fIaddr\fP と \fIlength\fP で指定された領域に対して有効にする。
+現在のところ、Transparent Huge Pages はプライベートな無名ページ (anonymous pages) についてのみ機能する。
+カーネルは定期的にヒュージページ (huge page) 候補の印がついたページをスキャンし、ヒュージページと置き換える。
+また、カーネルはその領域がヒュージページのサイズに合っている場合、ヒュージページを直接割り当てる (\fBposix_memalign\fP(2) 参照)。
+この機能は、大きなデータマッピングを使用し、一度にそのメモリの大きな範囲にアクセスするようなアプリケーション (例えば QEMU
+のような仮想化システム) で使うことを主に想定されている。 この機能は非常に簡単にメモリを浪費してしまう (例えば、1 バイトしかアクセスしない 2MB
+のマッピングが、 4KB ページではなく 2MB の実際のメモリを使ってしまう)。 詳細は Linux カーネルソースファイル
+\fIDocumentation/vm/transhuge.txt\fP を参照。 \fBMADV_HUGEPAGE\fP と \fBMADV_NOHUGEPAGE\fP
+は、 カーネルで \fBCONFIG_TRANSPARENT_HUGEPAGE\fP オプションを有効になっている場合にのみ利用できる。
 .TP 
 \fBMADV_NOHUGEPAGE\fP (Linux 2.6.38 以降)
-Ensures that memory in the address range specified by \fIaddr\fP and \fIlength\fP
-will not be collapsed into huge pages.
+\fIaddr\fP と \fIlength\fP で指定されたアドレス範囲のメモリがヒュージページに組み込まれないようにする。
 .TP 
 \fBMADV_DONTDUMP\fP (Linux 3.4 以降)
-Exclude from a core dump those pages in the range specified by \fIaddr\fP and
-\fIlength\fP.  This is useful in applications that have large areas of memory
-that are known not to be useful in a core dump.  The effect of
-\fBMADV_DONTDUMP\fP takes precedence over the bit mask that is set via the
-\fI/proc/PID/coredump_filter\fP file (see \fBcore\fP(5)).
+コアダンプから \fIaddr\fP と \fIlength\fP で指定された範囲のページを除外する。 これは、
+コアダンプに含めても役に立たないことが分かっている大きなメモリ領域があるアプリケーションで有用である。 \fBMADV_DONTDUMP\fP の効果は
+\fI/proc/PID/coredump_filter\fP ファイル経由で設定されたビットマスクよりも優先される (\fBcore\fP(5) 参照)。
 .TP 
 \fBMADV_DODUMP\fP (Linux 3.4 以降)
-Undo the effect of an earlier \fBMADV_DONTDUMP\fP.
+以前の \fBMADV_DONTDUMP\fP の効果を取り消す。
 .SH 返り値
 \fBmadvise\fP()  は成功すると 0 を返す。 エラーが起こると \-1 を返し、 \fIerrno\fP を適切な値に設定する。
 .SH エラー
@@ -257,8 +238,8 @@ Linux 版の \fBmadvise\fP()  では、指定されたアドレス範囲にマ
 これらを無視して残りの部分にアドバイスを適用する (しかしシステムコールに対してはちゃんと \fBENOMEM\fP を返す)。
 .SH 関連項目
 \fBgetrlimit\fP(2), \fBmincore\fP(2), \fBmmap\fP(2), \fBmprotect\fP(2), \fBmsync\fP(2),
-\fBmunmap\fP(2), \fBcore\fP(5)
+\fBmunmap\fP(2), \fBprctl\fP(2), \fBcore\fP(5)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.63 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.75 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。