diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-01 17:11:41 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-11-01 17:11:41 -1000 |
commit | babe393974de0351c0e6cca50f5f84edaf8d7fa1 (patch) | |
tree | 0893d62d555675d8bcfacc5d8e3965ef377791cd /Documentation/translations/zh_TW/filesystems/tmpfs.rst | |
parent | 7dc0e9c7dda66bd91eeada00d90033e3eb647fc3 (diff) | |
parent | cf63348b4c45384d02126f86676d5afc75d661a7 (diff) |
Merge tag 'docs-6.7' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet:
"The number of commits for documentation is not huge this time around,
but there are some significant changes nonetheless:
- Some more Spanish-language and Chinese translations
- The much-discussed documentation of the confidential-computing
threat model
- Powerpc and RISCV documentation move under Documentation/arch -
these complete this particular bit of documentation churn
- A large traditional-Chinese documentation update
- A new document on backporting and conflict resolution
- Some kernel-doc and Sphinx fixes
Plus the usual smattering of smaller updates and typo fixes"
* tag 'docs-6.7' of git://git.lwn.net/linux: (40 commits)
scripts/kernel-doc: Fix the regex for matching -Werror flag
docs: backporting: address feedback
Documentation: driver-api: pps: Update PPS generator documentation
speakup: Document USB support
doc: blk-ioprio: Bring the doc in line with the implementation
docs: usb: fix reference to nonexistent file in UVC Gadget
docs: doc-guide: mention 'make refcheckdocs'
Documentation: fix typo in dynamic-debug howto
scripts/kernel-doc: match -Werror flag strictly
Documentation/sphinx: Remove the repeated word "the" in comments.
docs: sparse: add SPDX-License-Identifier
docs/zh_CN: Add subsystem-apis Chinese translation
docs/zh_TW: update contents for zh_TW
docs: submitting-patches: encourage direct notifications to commenters
docs: add backporting and conflict resolution document
docs: move riscv under arch
docs: update link to powerpc/vmemmap_dedup.rst
mm/memory-hotplug: fix typo in documentation
docs: move powerpc under arch
PCI: Update the devres documentation regarding to pcim_*()
...
Diffstat (limited to 'Documentation/translations/zh_TW/filesystems/tmpfs.rst')
-rw-r--r-- | Documentation/translations/zh_TW/filesystems/tmpfs.rst | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/Documentation/translations/zh_TW/filesystems/tmpfs.rst b/Documentation/translations/zh_TW/filesystems/tmpfs.rst index 2c8439b2b77e..aed61cc3064d 100644 --- a/Documentation/translations/zh_TW/filesystems/tmpfs.rst +++ b/Documentation/translations/zh_TW/filesystems/tmpfs.rst @@ -4,8 +4,7 @@ :Original: Documentation/filesystems/tmpfs.rst -Translated by Wang Qing <wangqing@vivo.com> -and Hu Haowen <src.res.211@gmail.com> +translated by Wang Qing<wangqing@vivo.com> ===== Tmpfs @@ -13,18 +12,18 @@ Tmpfs Tmpfs是一個將所有文件都保存在虛擬內存中的文件系統。 -tmpfs中的所有內容都是臨時的,也就是說沒有任何文件會在硬碟上創建。 +tmpfs中的所有內容都是臨時的,也就是說沒有任何文件會在硬盤上創建。 如果卸載tmpfs實例,所有保存在其中的文件都會丟失。 -tmpfs將所有文件保存在內核緩存中,隨著文件內容增長或縮小可以將不需要的 -頁面swap出去。它具有最大限制,可以通過「mount -o remount ...」調整。 +tmpfs將所有文件保存在內核緩存中,隨着文件內容增長或縮小可以將不需要的 +頁面swap出去。它具有最大限制,可以通過“mount -o remount ...”調整。 和ramfs(創建tmpfs的模板)相比,tmpfs包含交換和限制檢查。和tmpfs相似的另 -一個東西是RAM磁碟(/dev/ram*),可以在物理RAM中模擬固定大小的硬碟,並在 +一個東西是RAM磁盤(/dev/ram*),可以在物理RAM中模擬固定大小的硬盤,並在 此之上創建一個普通的文件系統。Ramdisks無法swap,因此無法調整它們的大小。 由於tmpfs完全保存於頁面緩存和swap中,因此所有tmpfs頁面將在/proc/meminfo -中顯示爲「Shmem」,而在free(1)中顯示爲「Shared」。請注意,這些計數還包括 +中顯示爲“Shmem”,而在free(1)中顯示爲“Shared”。請注意,這些計數還包括 共享內存(shmem,請參閱ipcs(1))。獲得計數的最可靠方法是使用df(1)和du(1)。 tmpfs具有以下用途: @@ -45,7 +44,7 @@ tmpfs具有以下用途: tmpfs的前身(shm fs)才能使用SYSV共享內存) 3) 很多人(包括我)都覺的在/tmp和/var/tmp上掛載非常方便,並具有較大的 - swap分區。目前循環掛載tmpfs可以正常工作,所以大多數發布都應當可以 + swap分區。目前循環掛載tmpfs可以正常工作,所以大多數發佈都應當可以 使用mkinitrd通過/tmp訪問/tmp。 4) 也許還有更多我不知道的地方:-) @@ -58,11 +57,11 @@ size tmpfs實例分配的字節數限制。默認值是不swap時物理RAM 如果tmpfs實例過大,機器將死鎖,因爲OOM處理將無法釋放該內存。 nr_blocks 與size相同,但以PAGE_SIZE爲單位。 nr_inodes tmpfs實例的最大inode個數。默認值是物理內存頁數的一半,或者 - (有高端內存的機器)低端內存RAM的頁數,二者以較低者為準。 + (有高端內存的機器)低端內存RAM的頁數,二者以較低者爲準。 ========= =========================================================== 這些參數接受後綴k,m或g表示千,兆和千兆字節,可以在remount時更改。 -size參數也接受後綴%用來限制tmpfs實例占用物理RAM的百分比: +size參數也接受後綴%用來限制tmpfs實例佔用物理RAM的百分比: 未指定size或nr_blocks時,默認值爲size=50% 如果nr_blocks=0(或size=0),block個數將不受限制;如果nr_inodes=0, @@ -71,26 +70,26 @@ inode個數將不受限制。這樣掛載通常是不明智的,因爲它允許 場景下的訪問。 tmpfs具有爲所有文件設置NUMA內存分配策略掛載選項(如果啓用了CONFIG_NUMA), -可以通過「mount -o remount ...」調整 +可以通過“mount -o remount ...”調整 ======================== ========================= mpol=default 採用進程分配策略 (請參閱 set_mempolicy(2)) mpol=prefer:Node 傾向從給定的節點分配 -mpol=bind:NodeList 只允許從指定的鍊表分配 +mpol=bind:NodeList 只允許從指定的鏈表分配 mpol=interleave 傾向於依次從每個節點分配 mpol=interleave:NodeList 依次從每個節點分配 mpol=local 優先本地節點分配內存 ======================== ========================= -NodeList格式是以逗號分隔的十進位數字表示大小和範圍,最大和最小範圍是用- -分隔符的十進位數來表示。例如,mpol=bind0-3,5,7,9-15 +NodeList格式是以逗號分隔的十進制數字表示大小和範圍,最大和最小範圍是用- +分隔符的十進制數來表示。例如,mpol=bind0-3,5,7,9-15 帶有有效NodeList的內存策略將按指定格式保存,在創建文件時使用。當任務在該 文件系統上創建文件時,會使用到掛載時的內存策略NodeList選項,如果設置的話, 由調用任務的cpuset[請參見Documentation/admin-guide/cgroup-v1/cpusets.rst] 以及下面列出的可選標誌約束。如果NodeLists爲設置爲空集,則文件的內存策略將 -恢復爲「默認」策略。 +恢復爲“默認”策略。 NUMA內存分配策略有可選標誌,可以用於模式結合。在掛載tmpfs時指定這些可選 標誌可以在NodeList之前生效。 @@ -107,12 +106,12 @@ Documentation/admin-guide/mm/numa_memory_policy.rst列出所有可用的內存 請注意,如果內核不支持NUMA,那麼使用mpol選項掛載tmpfs將會失敗;nodelist指定不 在線的節點也會失敗。如果您的系統依賴於此,但內核會運行不帶NUMA功能(也許是安全 revocery內核),或者具有較少的節點在線,建議從自動模式中省略mpol選項掛載選項。 -可以在以後通過「mount -o remount,mpol=Policy:NodeList MountPoint」添加到掛載點。 +可以在以後通過“mount -o remount,mpol=Policy:NodeList MountPoint”添加到掛載點。 要指定初始根目錄,可以使用如下掛載選項: ==== ==================== -模式 權限用八進位數字表示 +模式 權限用八進制數字表示 uid 用戶ID gid 組ID ==== ==================== @@ -129,7 +128,7 @@ inode32 使用32位inode 在32位內核上,默認是inode32,掛載時指定inode64會被拒絕。 在64位內核上,默認配置是CONFIG_TMPFS_INODE64。inode64避免了單個設備上可能有多個 -具有相同inode編號的文件;比如32位應用程式使用glibc如果長期訪問tmpfs,一旦達到33 +具有相同inode編號的文件;比如32位應用程序使用glibc如果長期訪問tmpfs,一旦達到33 位inode編號,就有EOVERFLOW失敗的危險,無法打開大於2GiB的文件,並返回EINVAL。 所以'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs'將在 |