Translate Documentation/filesystems/tmpfs.rst into Chinese.

Signed-off-by: Wang Qing <[email protected]>
---
 .../translations/zh_CN/filesystems/index.rst       |   3 +-
 .../translations/zh_CN/filesystems/tmpfs.rst       | 146 +++++++++++++++++++++
 2 files changed, 148 insertions(+), 1 deletion(-)

diff --git a/Documentation/translations/zh_CN/filesystems/index.rst 
b/Documentation/translations/zh_CN/filesystems/index.rst
index 186501d..c45b550
--- a/Documentation/translations/zh_CN/filesystems/index.rst
+++ b/Documentation/translations/zh_CN/filesystems/index.rst
@@ -21,8 +21,9 @@ Linux Kernel??????????????????
 ???????????????????????????
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 3
 
    virtiofs
    debugfs
+   tmpfs
 
diff --git a/Documentation/translations/zh_CN/filesystems/tmpfs.rst 
b/Documentation/translations/zh_CN/filesystems/tmpfs.rst
index 0000000..700d870
--- /dev/null
+++ b/Documentation/translations/zh_CN/filesystems/tmpfs.rst
@@ -0,0 +1,146 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+.. include:: ../disclaimer-zh_CN.rst
+
+:Original: :ref:`Documentation/filesystems/tmpfs.rst <tmpfs_index>`
+
+translated by ?????? Wang Qing<[email protected]>
+
+=====
+Tmpfs
+=====
+
+Tmpfs?????????????????????????????????????????????????????????????????????
+
+tmpfs??????????????????????????????????????????????????????????????????????????????????????????
+????????????tmpfs??????????????????????????????????????????????????????
+
+tmpfs????????????????????????????????????????????????????????????????????????????????????????????????
+??????swap????????????????????????????????????????????????mount -o remount 
...????????????
+
+???ramfs?????????tmpfs?????????????????????tmpfs?????????????????????????????????tmpfs????????????
+???????????????RAM?????????/dev/ram*?????????????????????RAM???????????????????????????????????????
+?????????????????????????????????????????????Ramdisks??????swap???????????????????????????????????????
+
+??????tmpfs??????????????????????????????swap??????????????????tmpfs????????????/proc/meminfo
+???????????????Shmem????????????free(1)???????????????Shared???????????????????????????????????????
+????????????(shmem????????????ipcs(1))??????????????????????????????????????????df(1)???du(1)???
+
+tmpfs?????????????????????
+
+1) 
???????????????????????????????????????????????????????????????????????????SYSV???????????????
+
+   
??????????????????CONFIG_TMPFS?????????CONFIG_TMPFS????????????tmpfs?????????????????????
+   ?????????????????????????????????
+
+2) glibc 
2.2????????????????????????tmpfs?????????/dev/shm????????????POSIX????????????
+   (shm_open???shm_unlink)??????????????????/etc/fstab??????????????????
+
+       tmpfs   /dev/shm        tmpfs   defaults        0 0
+
+   ?????????????????????????????????tmpfs????????????
+   
+   
SYSV???????????????????????????????????????????????????(???2.3??????????????????????????????
+   tmpfs?????????(shm fs)????????????SYSV????????????)
+
+3) 
????????????????????????????????????/tmp???/var/tmp??????????????????????????????????????????
+   
swap???????????????????????????tmpfs?????????????????????????????????????????????????????????
+   ??????mkinitrd??????/tmp??????/tmp???
+
+4) ???????????????????????????????????????:-)
+
+
+tmpfs?????????????????????????????????????????????
+
+=========  ============================================================
+size       
tmpfs????????????????????????????????????????????????swap?????????RAM????????????
+           
??????tmpfs???????????????????????????????????????OOM?????????????????????????????????
+nr_blocks  ???size???????????????PAGE_SIZE????????????
+nr_inodes  
tmpfs???????????????inode?????????????????????????????????????????????????????????
+           
(????????????????????????)????????????RAM???????????????????????????????????????
+=========  ============================================================
+
+????????????????????????k???m???g??????????????????????????????????????????remount????????????
+size????????????????????????????????????tmpfs??????????????????RAM???????????????
+?????????size???nr_blocks??????????????????size=50???
+
+??????nr_blocks=0??????size=0??????block??????????????????????????????nr_inodes=0???
+inode???????????????????????????????????????????????????????????????????????????????????????????????????
+??????????????????tmpfs????????????????????????????????????????????????????????????????????????CPU???
+?????????????????????
+
+tmpfs???????????????????????????NUMA??????????????????????????????(???????????????CONFIG_NUMA),
+???????????????mount -o remount ...?????????
+
+======================== ==============================================
+mpol=default             ????????????????????????
+                         (????????? set_mempolicy(2))
+mpol=prefer:Node         ??????????????????????????????
+mpol=bind:NodeList       ?????????????????????????????????
+mpol=interleave          ????????????????????????????????????
+mpol=interleave:NodeList ???????????????????????????
+mpol=local              prefers ???????????????????????????
+======================== ==============================================
+
+NodeList?????????????????????????????????????????????????????????????????????????????????????????????-
+?????????????????????????????????????????????mpol=bind0-3,5,7,9-15
+
+????????????NodeList????????????????????????????????????????????????????????????????????????????????????
+?????????????????????????????????????????????????????????????????????NodeList??????????????????????????????
+??????????????????cpuset[?????????Documentation/admin-guide/cgroup-v1/cpusets.rst]
+????????????????????????????????????????????????NodeLists????????????????????????????????????????????????
+??????????????????????????????
+
+NUMA????????????????????????????????????????????????????????????????????????tmpfs?????????????????????
+???????????????NodeList???????????????
+Documentation/admin-guide/mm/numa_memory_policy.rst???????????????????????????
+????????????????????????????????????????????????
+
+::
+
+       =static         ?????????       MPOL_F_STATIC_NODES
+       =relative       ?????????       MPOL_F_RELATIVE_NODES
+
+?????????mpol=bind=staticNodeList?????????MPOL_BIND|MPOL_F_STATIC_NODES???????????????
+
+?????????????????????????????????NUMA???????????????mpol????????????tmpfs???????????????nodelist?????????
+???????????????????????????????????????????????????????????????????????????????????????NUMA??????(???????????????
+revocery??????)?????????????????????????????????????????????????????????????????????mpol?????????????????????
+????????????????????????mount -o remount,mpol=Policy:NodeList 
MountPoint????????????????????????
+
+????????????????????????????????????????????????????????????
+
+====   ==================================
+?????? ??????????????????????????????
+uid            ??????ID
+gid            ???ID
+====   ==================================
+
+???????????????remount????????????????????????????????????chmod(1),chown(1)???chgrp(1)?????????
+????????????????????????
+
+tmpfs????????????32?????????64???inode??????????????????
+
+=======   ========================
+inode64   Use 64-bit inode numbers
+inode32   Use 32-bit inode numbers
+=======   ========================
+
+???32????????????????????????inode32??????????????????inode64???????????????
+???64??????????????????????????????CONFIG_TMPFS_INODE64???inode64???????????????????????????????????????
+????????????inode????????????????????????32?????????????????????glibc??????????????????tmpfs???????????????33
+???inode???????????????EOVERFLOW????????????????????????????????????2GiB?????????????????????EINVAL???
+
+??????'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs'??????
+/mytmpfs?????????tmpfs????????????????????????root???????????????10GB 
RAM/SWAP????????????10240???
+inode????????????
+
+
+:??????:
+   Christoph Rohland <[email protected]>, 1.12.01
+:??????:
+   Hugh Dickins, 4 June 2007
+:??????:
+   KOSAKI Motohiro, 16 Mar 2010
+:??????:
+   Chris Down, 13 July 2020
-- 
2.7.4

Reply via email to