-sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextEnglish}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget/mm/remap_file_pagesmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/mm/remap_file_pagesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/mm/remap_file_pagesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/mm/remap_file_pagesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/mm/remap_file_pagesmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/mm/remap_file_pagesmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageChinese (Simplified)uh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hremap_file_pages()系统调用h]hremap_file_pages()系统调用}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhT/var/lib/git/docbuild/linux/Documentation/translations/zh_CN/mm/remap_file_pages.rsthK ubh paragraph)}(hX remap_file_pages()系统调用被用来创建一个非线性映射,也就是说,在这个映射中, 文件的页面被无序映射到内存中。使用remap_file_pages()比重复调用mmap(2)的好 处是,前者不需要内核创建额外的VMA(虚拟内存区)数据结构。h]hX remap_file_pages()系统调用被用来创建一个非线性映射,也就是说,在这个映射中, 文件的页面被无序映射到内存中。使用remap_file_pages()比重复调用mmap(2)的好 处是,前者不需要内核创建额外的VMA(虚拟内存区)数据结构。}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX支持非线性映射需要在内核虚拟内存子系统中编写大量的non-trivial的代码,包括热 路径。另外,为了使非线性映射工作,内核需要一种方法来区分正常的页表项和带有文件 偏移的项(pte_file)。内核为达到这个目的在PTE中保留了标志。PTE标志是稀缺资 源,特别是在某些CPU架构上。如果能腾出这个标志用于其他用途就更好了。h]hX支持非线性映射需要在内核虚拟内存子系统中编写大量的non-trivial的代码,包括热 路径。另外,为了使非线性映射工作,内核需要一种方法来区分正常的页表项和带有文件 偏移的项(pte_file)。内核为达到这个目的在PTE中保留了标志。PTE标志是稀缺资 源,特别是在某些CPU架构上。如果能腾出这个标志用于其他用途就更好了。}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX$幸运的是,在生活中并没有很多remap_file_pages()的用户。只知道有一个企业的RDBMS 实现在32位系统上使用这个系统调用来映射比32位虚拟地址空间线性尺寸更大的文件。 由于64位系统的广泛使用,这种使用情况已经不重要了。h]hX$幸运的是,在生活中并没有很多remap_file_pages()的用户。只知道有一个企业的RDBMS 实现在32位系统上使用这个系统调用来映射比32位虚拟地址空间线性尺寸更大的文件。 由于64位系统的广泛使用,这种使用情况已经不重要了。}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hsyscall被废弃了,现在用一个模拟来代替它。仿真会创建新的VMA,而不是非线性映射。 对于remap_file_pages()的少数用户来说,它的工作速度会变慢,但ABI被保留了。h]hsyscall被废弃了,现在用一个模拟来代替它。仿真会创建新的VMA,而不是非线性映射。 对于remap_file_pages()的少数用户来说,它的工作速度会变慢,但ABI被保留了。}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h仿真的一个副作用(除了性能之外)是,由于额外的VMA,用户可以更容易达到 vm.max_map_count的限制。关于限制的更多细节,请参见DEFAULT_MAX_MAP_COUNT 的注释。h]h仿真的一个副作用(除了性能之外)是,由于额外的VMA,用户可以更容易达到 vm.max_map_count的限制。关于限制的更多细节,请参见DEFAULT_MAX_MAP_COUNT 的注释。}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]remap-file-pagesah ]h"]remap_file_pages()系统调用ah$]h&]uh1hhhhhhhhK ubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj*error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jjs nametypes}jsh}jhs footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.