"Usphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget/translations/zh_CN/mm/slabmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/zh_TW/mm/slabmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/it_IT/mm/slabmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/ja_JP/mm/slabmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/ko_KR/mm/slabmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget/translations/sp_SP/mm/slabmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh5/var/lib/git/docbuild/linux/Documentation/mm/slab.rsthKubhsection)}(hhh](htitle)}(hSlab Allocationh]hSlab Allocation}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFunctions and structuresh]hFunctions and structures}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleslab_folio (C macro) c.slab_foliohNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(h slab_folioh]hdesc_signature_line)}(h slab_folioh]h desc_name)}(h slab_folioh]h desc_sig_name)}(hhh]h slab_folio}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhhubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKuubah}(h]h ]h"]h$]h&]hh add_permalinkuh1hsphinx_line_type declaratorhhhhhjhKuubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1hhjhKuhhhhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1j/hhhhhjhKuubeh}(h]h ](cmacroeh"]h$]h&]domainj=objtypej>desctypej>noindex noindexentrynocontentsentryuh1hhhhhhNhNubh paragraph)}(h``slab_folio (s)``h]hliteral)}(hjLh]hslab_folio (s)}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjJubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKwhhhhubh block_quote)}(hThe folio allocated for a slab h]jI)}(hThe folio allocated for a slabh]hThe folio allocated for a slab}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKuhjfubah}(h]h ]h"]h$]h&]uh1jdhjxhKuhhhhubh container)}(hX**Parameters** ``s`` The slab. **Description** Slabs are allocated as folios that contain the individual objects and are using some fields in the first struct page of the folio - those fields are now accessed by struct slab. It is occasionally necessary to convert back to a folio in order to communicate with the rest of the mm. Please use this helper function instead of casting yourself, as the implementation may change in the future.h](jI)}(h**Parameters**h]hstrong)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKyhjubhdefinition_list)}(hhh]hdefinition_list_item)}(h``s`` The slab. h](hterm)}(h``s``h]jO)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubah}(h]h ]h"]h$]h&]uh1jhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKvhjubh definition)}(hhh]jI)}(h The slab.h]h The slab.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhjhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubjI)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKxhjubjI)}(hXSlabs are allocated as folios that contain the individual objects and are using some fields in the first struct page of the folio - those fields are now accessed by struct slab. It is occasionally necessary to convert back to a folio in order to communicate with the rest of the mm. Please use this helper function instead of casting yourself, as the implementation may change in the future.h]hXSlabs are allocated as folios that contain the individual objects and are using some fields in the first struct page of the folio - those fields are now accessed by struct slab. It is occasionally necessary to convert back to a folio in order to communicate with the rest of the mm. Please use this helper function instead of casting yourself, as the implementation may change in the future.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKwhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hpage_slab (C function) c.page_slabhNtauh1hhhhhhNhNubh)}(hhh](h)}(h1struct slab * page_slab (const struct page *page)h]h)}(h/struct slab *page_slab(const struct page *page)h](hdesc_sig_keyword)}(hstructh]hstruct}(hj2hhhNhNubah}(h]h ]kah"]h$]h&]uh1j0hj,hhhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKubhdesc_sig_space)}(h h]h }(hjDhhhNhNubah}(h]h ]wah"]h$]h&]uh1jBhj,hhhjAhKubh)}(hhh]j)}(hslabh]hslab}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&] refdomainj=reftype identifier reftargetjXmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jq ASTIdentifier)}jl page_slabsb c.page_slabasbuh1hhj,hhhjAhKubjC)}(h h]h }(hjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj,hhhjAhKubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj,hhhjAhKubh)}(h page_slabh]j)}(hj|h]h page_slab}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1hhj,hhhjAhKubhdesc_parameterlist)}(h(const struct page *page)h]hdesc_parameter)}(hconst struct page *pageh](j1)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]j=ah"]h$]h&]uh1j0hjubjC)}(h h]h }(hjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjubj1)}(hj4h]hstruct}(hjhhhNhNubah}(h]h ]j=ah"]h$]h&]uh1j0hjubjC)}(h h]h }(hjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjubh)}(hhh]j)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainj=reftypejl reftargetjmodnameN classnameNjpjs)}jv]jz c.page_slabasbuh1hhjubjC)}(h h]h }(hjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhjubj)}(hjh]h*}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hpageh]hpage}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhj,hhhjAhKubeh}(h]h ]h"]h$]h&]hhj!uh1hj"j#hj(hhhjAhKubah}(h]j#ah ](j'j(eh"]h$]h&]j,j-)j.huh1hhjAhKhj%hhubj0)}(hhh]jI)}(h&Converts from struct page to its slab.h]h&Converts from struct page to its slab.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhj[hhubah}(h]h ]h"]h$]h&]uh1j/hj%hhhjAhKubeh}(h]h ](j=functioneh"]h$]h&]jBj=jCjvjDjvjEjFjGuh1hhhhhhNhNubj)}(h**Parameters** ``const struct page *page`` A page which may or may not belong to a slab. **Return** The slab which contains this page or NULL if the page does not belong to a slab. This includes pages returned from large kmalloc.h](jI)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjzubj)}(hhh]j)}(hJ``const struct page *page`` A page which may or may not belong to a slab. h](j)}(h``const struct page *page``h]jO)}(hjh]hconst struct page *page}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubah}(h]h ]h"]h$]h&]uh1jhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjubj)}(hhh]jI)}(h-A page which may or may not belong to a slab.h]h-A page which may or may not belong to a slab.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjzubjI)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjzubjI)}(hThe slab which contains this page or NULL if the page does not belong to a slab. This includes pages returned from large kmalloc.h]hThe slab which contains this page or NULL if the page does not belong to a slab. This includes pages returned from large kmalloc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjzubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hslab_page (C macro) c.slab_pagehNtauh1hhhhhhNhNubh)}(hhh](h)}(h slab_pageh]h)}(h slab_pageh]h)}(h slab_pageh]j)}(hjh]h slab_page}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1hhjhhhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKubah}(h]h ]h"]h$]h&]hhj!uh1hj"j#hjhhhj6hKubah}(h]jah ](j'j(eh"]h$]h&]j,j-)j.huh1hhj6hKhjhhubj0)}(hhh]h}(h]h ]h"]h$]h&]uh1j/hjhhhj6hKubeh}(h]h ](j=macroeh"]h$]h&]jBj=jCjOjDjOjEjFjGuh1hhhhhhNhNubjI)}(h``slab_page (s)``h]jO)}(hjUh]h slab_page (s)}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjSubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhhhhubje)}(h+The first struct page allocated for a slab h]jI)}(h*The first struct page allocated for a slabh]h*The first struct page allocated for a slab}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjkubah}(h]h ]h"]h$]h&]uh1jdhj}hKhhhhubj)}(h**Parameters** ``s`` The slab. **Description** A convenience wrapper for converting slab to the first struct page of the underlying folio, to communicate with code not yet converted to folio or struct slab.h](jI)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjubj)}(hhh]j)}(h``s`` The slab. h](j)}(h``s``h]jO)}(hjh]hs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubah}(h]h ]h"]h$]h&]uh1jhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjubj)}(hhh]jI)}(h The slab.h]h The slab.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubjI)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjubjI)}(hA convenience wrapper for converting slab to the first struct page of the underlying folio, to communicate with code not yet converted to folio or struct slab.h]hA convenience wrapper for converting slab to the first struct page of the underlying folio, to communicate with code not yet converted to folio or struct slab.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:10: ./mm/slab.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hslab_flags (C enum) c.slab_flagshNtauh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chNubh)}(hhh](h)}(h slab_flagsh]h)}(henum slab_flagsh](j1)}(henumh]henum}(hj*hhhNhNubah}(h]h ]j=ah"]h$]h&]uh1j0hj&hhhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKubjC)}(h h]h }(hj9hhhNhNubah}(h]h ]jOah"]h$]h&]uh1jBhj&hhhj8hKubh)}(h slab_flagsh]j)}(hj$h]h slab_flags}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubah}(h]h ](jjeh"]h$]h&]hhuh1hhj&hhhj8hKubeh}(h]h ]h"]h$]h&]hhj!uh1hj"j#hj"hhhj8hKubah}(h]jah ](j'j(eh"]h$]h&]j,j-)j.huh1hhj8hKhjhhubj0)}(hhh]jI)}(h!How the slab flags bits are used.h]h!How the slab flags bits are used.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhjjhhubah}(h]h ]h"]h$]h&]uh1j/hjhhhj8hKubeh}(h]h ](j=enumeh"]h$]h&]jBj=jCjjDjjEjFjGuh1hhhhhhjhNubj)}(h**Constants** ``SL_locked`` Is locked with slab_lock() ``SL_partial`` On the per-node partial list ``SL_pfmemalloc`` Was allocated from PF_MEMALLOC reservesh](jI)}(h **Constants**h]j)}(hjh]h Constants}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhjubj)}(hhh](j)}(h)``SL_locked`` Is locked with slab_lock() h](j)}(h ``SL_locked``h]jO)}(hjh]h SL_locked}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubah}(h]h ]h"]h$]h&]uh1jhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhjubj)}(hhh]jI)}(hIs locked with slab_lock()h]hIs locked with slab_lock()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h,``SL_partial`` On the per-node partial list h](j)}(h``SL_partial``h]jO)}(hjh]h SL_partial}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubah}(h]h ]h"]h$]h&]uh1jhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhjubj)}(hhh]jI)}(hOn the per-node partial listh]hOn the per-node partial list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h9``SL_pfmemalloc`` Was allocated from PF_MEMALLOC reservesh](j)}(h``SL_pfmemalloc``h]jO)}(hj h]h SL_pfmemalloc}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jNhjubah}(h]h ]h"]h$]h&]uh1jhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhjubj)}(hhh]jI)}(h'Was allocated from PF_MEMALLOC reservesh]h'Was allocated from PF_MEMALLOC reserves}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhj6ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj5hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhjhNubjI)}(h**Description**h]j)}(hjch]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhhhhubjI)}(hThe slab flags share space with the page flags but some bits have different interpretations. The high bits are used for information like zone/node/section.h]hThe slab flags share space with the page flags but some bits have different interpretations. The high bits are used for information like zone/node/section.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhA/var/lib/git/docbuild/linux/Documentation/mm/slab:11: ./mm/slub.chKhhhhubeh}(h]functions-and-structuresah ]h"]functions and structuresah$]h&]uh1hhhhhhhhKubeh}(h]slab-allocationah ]h"]slab allocationah$]h&]uh1hhhhhhhhKubeh}(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_handlerjerror_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}(jjjju nametypes}(jjuh}(jhjhhhj#j(jjjj"u 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.