€•ŠÙŒsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ3/translations/zh_CN/admin-guide/device-mapper/cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/zh_TW/admin-guide/device-mapper/cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/it_IT/admin-guide/device-mapper/cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ja_JP/admin-guide/device-mapper/cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ko_KR/admin-guide/device-mapper/cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/pt_BR/admin-guide/device-mapper/cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/sp_SP/admin-guide/device-mapper/cache”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒCache”h]”hŒCache”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒM/var/lib/git/docbuild/linux/Documentation/admin-guide/device-mapper/cache.rst”h´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ Introduction”h]”hŒ Introduction”…”�”}”(hhÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhËh²hh³hÊh´KubhŒ paragraph”“”)�”}”(hŒ`dm-cache is a device mapper target written by Joe Thornber, Heinz Mauelshagen, and Mike Snitzer.”h]”hŒ`dm-cache is a device mapper target written by Joe Thornber, Heinz Mauelshagen, and Mike Snitzer.”…”�”}”(hhÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)�”}”(hŒ”It aims to improve performance of a block device (eg, a spindle) by dynamically migrating some of its data to a faster, smaller device (eg, an SSD).”h]”hŒ”It aims to improve performance of a block device (eg, a spindle) by dynamically migrating some of its data to a faster, smaller device (eg, an SSD).”…”�”}”(hhìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K hhËh²hubhÝ)�”}”(hXThis device-mapper solution allows us to insert this caching at different levels of the dm stack, for instance above the data device for a thin-provisioning pool. Caching solutions that are integrated more closely with the virtual memory system should give better performance.”h]”hXThis device-mapper solution allows us to insert this caching at different levels of the dm stack, for instance above the data device for a thin-provisioning pool. Caching solutions that are integrated more closely with the virtual memory system should give better performance.”…”�”}”(hhúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)�”}”(hŒMThe target reuses the metadata library used in the thin-provisioning library.”h]”hŒMThe target reuses the metadata library used in the thin-provisioning library.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)�”}”(hŒíThe decision as to what data to migrate and when is left to a plug-in policy module. Several of these have been written as we experiment, and we hope other people will contribute others for specific io scenarios (eg. a vm image server).”h]”hŒíThe decision as to what data to migrate and when is left to a plug-in policy module. Several of these have been written as we experiment, and we hope other people will contribute others for specific io scenarios (eg. a vm image server).”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒGlossary”h]”hŒGlossary”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj,h²hh³hÊh´KubhŒ block_quote”“”)�”}”(hŒõMigration Movement of the primary copy of a logical block from one device to the other. Promotion Migration from slow device to fast device. Demotion Migration from fast device to slow device. ”h]”hŒdefinition_list”“”)�”}”(hhh]”(hŒdefinition_list_item”“”)�”}”(hŒWMigration Movement of the primary copy of a logical block from one device to the other.”h]”(hŒterm”“”)�”}”(hŒ Migration”h]”hŒ Migration”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jNh³hÊh´K hjJubhŒ definition”“”)�”}”(hhh]”hÝ)�”}”(hŒMMovement of the primary copy of a logical block from one device to the other.”h]”hŒMMovement of the primary copy of a logical block from one device to the other.”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K hj`ubah}”(h]”h ]”h"]”h$]”h&]”uh1j^hjJubeh}”(h]”h ]”h"]”h$]”h&]”uh1jHh³hÊh´K hjEubjI)�”}”(hŒ4Promotion Migration from slow device to fast device.”h]”(jO)�”}”(hŒ Promotion”h]”hŒ Promotion”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jNh³hÊh´K"hj}ubj_)�”}”(hhh]”hÝ)�”}”(hŒ*Migration from slow device to fast device.”h]”hŒ*Migration from slow device to fast device.”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K#hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1j^hj}ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jHh³hÊh´K"hjEubjI)�”}”(hŒ4Demotion Migration from fast device to slow device. ”h]”(jO)�”}”(hŒDemotion”h]”hŒDemotion”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jNh³hÊh´K%hj¬ubj_)�”}”(hhh]”hÝ)�”}”(hŒ*Migration from fast device to slow device.”h]”hŒ*Migration from fast device to slow device.”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K%hj¾ubah}”(h]”h ]”h"]”h$]”h&]”uh1j^hj¬ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jHh³hÊh´K%hjEubeh}”(h]”h ]”h"]”h$]”h&]”uh1jChj?ubah}”(h]”h ]”h"]”h$]”h&]”uh1j=h³hÊh´Khj,h²hubhÝ)�”}”(hŒ The origin device always contains a copy of the logical block, which may be out of date or kept in sync with the copy on the cache device (depending on policy).”h]”hŒ The origin device always contains a copy of the logical block, which may be out of date or kept in sync with the copy on the cache device (depending on policy).”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K'hj,h²hubeh}”(h]”Œglossary”ah ]”h"]”Œglossary”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒDesign”h]”hŒDesign”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjýh²hh³hÊh´K,ubh¶)�”}”(hhh]”(h»)�”}”(hŒ Sub-devices”h]”hŒ Sub-devices”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´K/ubhÝ)�”}”(hŒfThe target is constructed by passing three devices to it (along with other parameters detailed later):”h]”hŒfThe target is constructed by passing three devices to it (along with other parameters detailed later):”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K1hjh²hubhŒenumerated_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ&An origin device - the big, slow one. ”h]”hÝ)�”}”(hŒ%An origin device - the big, slow one.”h]”hŒ%An origin device - the big, slow one.”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K4hj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1j2hj/h²hh³hÊh´Nubj3)�”}”(hŒ&A cache device - the small, fast one. ”h]”hÝ)�”}”(hŒ%A cache device - the small, fast one.”h]”hŒ%A cache device - the small, fast one.”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K6hjLubah}”(h]”h ]”h"]”h$]”h&]”uh1j2hj/h²hh³hÊh´Nubj3)�”}”(hXiA small metadata device - records which blocks are in the cache, which are dirty, and extra hints for use by the policy object. This information could be put on the cache device, but having it separate allows the volume manager to configure it differently, e.g. as a mirror for extra robustness. This metadata device may only be used by a single cache device. ”h]”hÝ)�”}”(hXhA small metadata device - records which blocks are in the cache, which are dirty, and extra hints for use by the policy object. This information could be put on the cache device, but having it separate allows the volume manager to configure it differently, e.g. as a mirror for extra robustness. This metadata device may only be used by a single cache device.”h]”hXhA small metadata device - records which blocks are in the cache, which are dirty, and extra hints for use by the policy object. This information could be put on the cache device, but having it separate allows the volume manager to configure it differently, e.g. as a mirror for extra robustness. This metadata device may only be used by a single cache device.”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K8hjdubah}”(h]”h ]”h"]”h$]”h&]”uh1j2hj/h²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1j-hjh²hh³hÊh´K4ubeh}”(h]”Œ sub-devices”ah ]”h"]”Œ sub-devices”ah$]”h&]”uh1hµhjýh²hh³hÊh´K/ubh¶)�”}”(hhh]”(h»)�”}”(hŒFixed block size”h]”hŒFixed block size”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj�h²hh³hÊh´K@ubhÝ)�”}”(hX#The origin is divided up into blocks of a fixed size. This block size is configurable when you first create the cache. Typically we've been using block sizes of 256KB - 1024KB. The block size must be between 64 sectors (32KB) and 2097152 sectors (1GB) and a multiple of 64 sectors (32KB).”h]”hX%The origin is divided up into blocks of a fixed size. This block size is configurable when you first create the cache. Typically we’ve been using block sizes of 256KB - 1024KB. The block size must be between 64 sectors (32KB) and 2097152 sectors (1GB) and a multiple of 64 sectors (32KB).”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KBhj�h²hubhÝ)�”}”(hXuHaving a fixed block size simplifies the target a lot. But it is something of a compromise. For instance, a small part of a block may be getting hit a lot, yet the whole block will be promoted to the cache. So large block sizes are bad because they waste cache space. And small block sizes are bad because they increase the amount of metadata (both in core and on disk).”h]”hXuHaving a fixed block size simplifies the target a lot. But it is something of a compromise. For instance, a small part of a block may be getting hit a lot, yet the whole block will be promoted to the cache. So large block sizes are bad because they waste cache space. And small block sizes are bad because they increase the amount of metadata (both in core and on disk).”…”�”}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KGhj�h²hubeh}”(h]”Œfixed-block-size”ah ]”h"]”Œfixed block size”ah$]”h&]”uh1hµhjýh²hh³hÊh´K@ubh¶)�”}”(hhh]”(h»)�”}”(hŒCache operating modes”h]”hŒCache operating modes”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÄh²hh³hÊh´KOubhÝ)�”}”(hŒMThe cache has three operating modes: writeback, writethrough and passthrough.”h]”hŒMThe cache has three operating modes: writeback, writethrough and passthrough.”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KQhjÄh²hubhÝ)�”}”(hŒ›If writeback, the default, is selected then a write to a block that is cached will go only to the cache and the block will be marked dirty in the metadata.”h]”hŒ›If writeback, the default, is selected then a write to a block that is cached will go only to the cache and the block will be marked dirty in the metadata.”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KThjÄh²hubhÝ)�”}”(hŒ£If writethrough is selected then a write to a cached block will not complete until it has hit both the origin and cache devices. Clean blocks should remain clean.”h]”hŒ£If writethrough is selected then a write to a cached block will not complete until it has hit both the origin and cache devices. Clean blocks should remain clean.”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KXhjÄh²hubhÝ)�”}”(hXSIf passthrough is selected, useful when the cache contents are not known to be coherent with the origin device, then all reads are served from the origin device (all reads miss the cache) and all writes are forwarded to the origin device; additionally, write hits cause cache block invalidates. To enable passthrough mode the cache must be clean. Passthrough mode allows a cache device to be activated without having to worry about coherency. Coherency that exists is maintained, although the cache will gradually cool as writes take place. If the coherency of the cache can later be verified, or established through use of the "invalidate_cblocks" message, the cache device can be transitioned to writethrough or writeback mode while still warm. Otherwise, the cache contents can be discarded prior to transitioning to the desired operating mode.”h]”hXWIf passthrough is selected, useful when the cache contents are not known to be coherent with the origin device, then all reads are served from the origin device (all reads miss the cache) and all writes are forwarded to the origin device; additionally, write hits cause cache block invalidates. To enable passthrough mode the cache must be clean. Passthrough mode allows a cache device to be activated without having to worry about coherency. Coherency that exists is maintained, although the cache will gradually cool as writes take place. If the coherency of the cache can later be verified, or established through use of the “invalidate_cblocksâ€� message, the cache device can be transitioned to writethrough or writeback mode while still warm. Otherwise, the cache contents can be discarded prior to transitioning to the desired operating mode.”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K\hjÄh²hubhÝ)�”}”(hXîA simple cleaner policy is provided, which will clean (write back) all dirty blocks in a cache. Useful for decommissioning a cache or when shrinking a cache. Shrinking the cache's fast device requires all cache blocks, in the area of the cache being removed, to be clean. If the area being removed from the cache still contains dirty blocks the resize will fail. Care must be taken to never reduce the volume used for the cache's fast device until the cache is clean. This is of particular importance if writeback mode is used. Writethrough and passthrough modes already maintain a clean cache. Future support to partially clean the cache, above a specified threshold, will allow for keeping the cache warm and in writeback mode during resize.”h]”hXòA simple cleaner policy is provided, which will clean (write back) all dirty blocks in a cache. Useful for decommissioning a cache or when shrinking a cache. Shrinking the cache’s fast device requires all cache blocks, in the area of the cache being removed, to be clean. If the area being removed from the cache still contains dirty blocks the resize will fail. Care must be taken to never reduce the volume used for the cache’s fast device until the cache is clean. This is of particular importance if writeback mode is used. Writethrough and passthrough modes already maintain a clean cache. Future support to partially clean the cache, above a specified threshold, will allow for keeping the cache warm and in writeback mode during resize.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KjhjÄh²hubeh}”(h]”Œcache-operating-modes”ah ]”h"]”Œcache operating modes”ah$]”h&]”uh1hµhjýh²hh³hÊh´KOubh¶)�”}”(hhh]”(h»)�”}”(hŒMigration throttling”h]”hŒMigration throttling”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj#h²hh³hÊh´KwubhÝ)�”}”(hXLMigrating data between the origin and cache device uses bandwidth. The user can set a throttle to prevent more than a certain amount of migration occurring at any one time. Currently we're not taking any account of normal io traffic going to the devices. More work needs doing here to avoid migrating during those peak io moments.”h]”hXNMigrating data between the origin and cache device uses bandwidth. The user can set a throttle to prevent more than a certain amount of migration occurring at any one time. Currently we’re not taking any account of normal io traffic going to the devices. More work needs doing here to avoid migrating during those peak io moments.”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kyhj#h²hubhÝ)�”}”(hŒ¥For the time being, a message "migration_threshold <#sectors>" can be used to set the maximum number of sectors being migrated, the default being 2048 sectors (1MB).”h]”hŒ©For the time being, a message “migration_threshold <#sectors>â€� can be used to set the maximum number of sectors being migrated, the default being 2048 sectors (1MB).”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khj#h²hubeh}”(h]”Œmigration-throttling”ah ]”h"]”Œmigration throttling”ah$]”h&]”uh1hµhjýh²hh³hÊh´Kwubh¶)�”}”(hhh]”(h»)�”}”(hŒUpdating on-disk metadata”h]”hŒUpdating on-disk metadata”…”�”}”(hj[h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjXh²hh³hÊh´K„ubhÝ)�”}”(hXROn-disk metadata is committed every time a FLUSH or FUA bio is written. If no such requests are made then commits will occur every second. This means the cache behaves like a physical disk that has a volatile write cache. If power is lost you may lose some recent writes. The metadata should always be consistent in spite of any crash.”h]”hXROn-disk metadata is committed every time a FLUSH or FUA bio is written. If no such requests are made then commits will occur every second. This means the cache behaves like a physical disk that has a volatile write cache. If power is lost you may lose some recent writes. The metadata should always be consistent in spite of any crash.”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K†hjXh²hubhÝ)�”}”(hXThe 'dirty' state for a cache block changes far too frequently for us to keep updating it on the fly. So we treat it as a hint. In normal operation it will be written when the dm device is suspended. If the system crashes all cache blocks will be assumed dirty when restarted.”h]”hXThe ‘dirty’ state for a cache block changes far too frequently for us to keep updating it on the fly. So we treat it as a hint. In normal operation it will be written when the dm device is suspended. If the system crashes all cache blocks will be assumed dirty when restarted.”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KŒhjXh²hubeh}”(h]”Œupdating-on-disk-metadata”ah ]”h"]”Œupdating on-disk metadata”ah$]”h&]”uh1hµhjýh²hh³hÊh´K„ubh¶)�”}”(hhh]”(h»)�”}”(hŒPer-block policy hints”h]”hŒPer-block policy hints”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj�h²hh³hÊh´K’ubhÝ)�”}”(hŒôPolicy plug-ins can store a chunk of data per cache block. It's up to the policy how big this chunk is, but it should be kept small. Like the dirty flags this data is lost if there's a crash so a safe fallback value should always be possible.”h]”hŒøPolicy plug-ins can store a chunk of data per cache block. It’s up to the policy how big this chunk is, but it should be kept small. Like the dirty flags this data is lost if there’s a crash so a safe fallback value should always be possible.”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K”hj�h²hubhÝ)�”}”(hŒ1Policy hints affect performance, not correctness.”h]”hŒ1Policy hints affect performance, not correctness.”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K™hj�h²hubeh}”(h]”Œper-block-policy-hints”ah ]”h"]”Œper-block policy hints”ah$]”h&]”uh1hµhjýh²hh³hÊh´K’ubh¶)�”}”(hhh]”(h»)�”}”(hŒPolicy messaging”h]”hŒPolicy messaging”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÂh²hh³hÊh´KœubhÝ)�”}”(hŒ³Policies will have different tunables, specific to each one, so we need a generic way of getting and setting these. Device-mapper messages are used. Refer to cache-policies.txt.”h]”hŒ³Policies will have different tunables, specific to each one, so we need a generic way of getting and setting these. Device-mapper messages are used. Refer to cache-policies.txt.”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KžhjÂh²hubeh}”(h]”Œpolicy-messaging”ah ]”h"]”Œpolicy messaging”ah$]”h&]”uh1hµhjýh²hh³hÊh´Kœubh¶)�”}”(hhh]”(h»)�”}”(hŒDiscard bitset resolution”h]”hŒDiscard bitset resolution”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjéh²hh³hÊh´K£ubhÝ)�”}”(hXÅWe can avoid copying data during migration if we know the block has been discarded. A prime example of this is when mkfs discards the whole block device. We store a bitset tracking the discard state of blocks. However, we allow this bitset to have a different block size from the cache blocks. This is because we need to track the discard state for all of the origin device (compare with the dirty bitset which is just for the smaller cache device).”h]”hXÅWe can avoid copying data during migration if we know the block has been discarded. A prime example of this is when mkfs discards the whole block device. We store a bitset tracking the discard state of blocks. However, we allow this bitset to have a different block size from the cache blocks. This is because we need to track the discard state for all of the origin device (compare with the dirty bitset which is just for the smaller cache device).”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K¥hjéh²hubeh}”(h]”Œdiscard-bitset-resolution”ah ]”h"]”Œdiscard bitset resolution”ah$]”h&]”uh1hµhjýh²hh³hÊh´K£ubeh}”(h]”Œdesign”ah ]”h"]”Œdesign”ah$]”h&]”uh1hµhh·h²hh³hÊh´K,ubh¶)�”}”(hhh]”(h»)�”}”(hŒTarget interface”h]”hŒTarget interface”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´K®ubh¶)�”}”(hhh]”(h»)�”}”(hŒ Constructor”h]”hŒ Constructor”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj)h²hh³hÊh´K±ubj>)�”}”(hXÇ :: cache <#feature args> []* <#policy args> [policy args]* ================ ======================================================= metadata dev fast device holding the persistent metadata cache dev fast device holding cached data blocks origin dev slow device holding original data blocks block size cache unit size in sectors #feature args number of feature arguments passed feature args writethrough or passthrough (The default is writeback.) policy the replacement policy to use #policy args an even number of arguments corresponding to key/value pairs passed to the policy policy args key/value pairs passed to the policy E.g. 'sequential_threshold 1024' See cache-policies.txt for details. ================ ======================================================= ”h]”(j>)�”}”(hŒ–:: cache <#feature args> []* <#policy args> [policy args]* ”h]”hŒ literal_block”“”)�”}”(hŒŽcache <#feature args> []* <#policy args> [policy args]*”h]”hŒŽcache <#feature args> []* <#policy args> [policy args]*”…”�”}”hjDsbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jBh³hÊh´Kµhj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j=h³hÊh´K³hj:ubhŒtable”“”)�”}”(hhh]”hŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jdhjaubje)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K7uh1jdhjaubhŒtbody”“”)�”}”(hhh]”(hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”hÝ)�”}”(hŒ metadata dev”h]”hŒ metadata dev”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kºhj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj�ubj…)�”}”(hhh]”hÝ)�”}”(hŒ+fast device holding the persistent metadata”h]”hŒ+fast device holding the persistent metadata”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kºhj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj�ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ cache dev”h]”hŒ cache dev”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K»hj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjºubj…)�”}”(hhh]”hÝ)�”}”(hŒ&fast device holding cached data blocks”h]”hŒ&fast device holding cached data blocks”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K»hjÔubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjºubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ origin dev”h]”hŒ origin dev”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K¼hjôubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjñubj…)�”}”(hhh]”hÝ)�”}”(hŒ(slow device holding original data blocks”h]”hŒ(slow device holding original data blocks”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K¼hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjñubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ block size”h]”hŒ block size”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K½hj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj(ubj…)�”}”(hhh]”hÝ)�”}”(hŒcache unit size in sectors”h]”hŒcache unit size in sectors”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K½hjBubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj(ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #feature args”h]”hŒ #feature args”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K¿hjbubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj_ubj…)�”}”(hhh]”hÝ)�”}”(hŒ"number of feature arguments passed”h]”hŒ"number of feature arguments passed”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K¿hjyubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj_ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ feature args”h]”hŒ feature args”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÀhj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj–ubj…)�”}”(hhh]”hÝ)�”}”(hŒ7writethrough or passthrough (The default is writeback.)”h]”hŒ7writethrough or passthrough (The default is writeback.)”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÀhj°ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj–ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒpolicy”h]”hŒpolicy”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÂhjÐubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjÍubj…)�”}”(hhh]”hÝ)�”}”(hŒthe replacement policy to use”h]”hŒthe replacement policy to use”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÂhjçubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjÍubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #policy args”h]”hŒ #policy args”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÃhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubj…)�”}”(hhh]”hÝ)�”}”(hŒQan even number of arguments corresponding to key/value pairs passed to the policy”h]”hŒQan even number of arguments corresponding to key/value pairs passed to the policy”…”�”}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÃhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ policy args”h]”hŒ policy args”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÅhj>ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj;ubj…)�”}”(hhh]”hÝ)�”}”(hŒikey/value pairs passed to the policy E.g. 'sequential_threshold 1024' See cache-policies.txt for details.”h]”hŒmkey/value pairs passed to the policy E.g. ‘sequential_threshold 1024’ See cache-policies.txt for details.”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÅhjUubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj;ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj|ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjaubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j_hj\ubah}”(h]”h ]”h"]”h$]”h&]”uh1jZhj:ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j=h³hÊh´K³hj)h²hubhÝ)�”}”(hŒOptional feature arguments are:”h]”hŒOptional feature arguments are:”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÊhj)h²hubj>)�”}”(hX÷==================== ======================================================== writethrough write through caching that prohibits cache block content from being different from origin block content. Without this argument, the default behaviour is to write back cache block contents later for performance reasons, so they may differ from the corresponding origin blocks. passthrough a degraded mode useful for various cache coherency situations (e.g., rolling back snapshots of underlying storage). Reads and writes always go to the origin. If a write goes to a cached origin block, then the cache block is invalidated. To enable passthrough mode the cache must be clean. metadata2 use version 2 of the metadata. This stores the dirty bits in a separate btree, which improves speed of shutting down the cache. no_discard_passdown disable passing down discards from the cache to the origin's data device. ==================== ======================================================== ”h]”j[)�”}”(hhh]”j`)�”}”(hhh]”(je)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jdhj ubje)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K8uh1jdhj ubj{)�”}”(hhh]”(j€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ writethrough”h]”hŒ writethrough”…”�”}”(hjÀh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÎhj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjºubj…)�”}”(hhh]”hÝ)�”}”(hXwrite through caching that prohibits cache block content from being different from origin block content. Without this argument, the default behaviour is to write back cache block contents later for performance reasons, so they may differ from the corresponding origin blocks.”h]”hXwrite through caching that prohibits cache block content from being different from origin block content. Without this argument, the default behaviour is to write back cache block contents later for performance reasons, so they may differ from the corresponding origin blocks.”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÎhjÔubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjºubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj·ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ passthrough”h]”hŒ passthrough”…”�”}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÔhjôubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjñubj…)�”}”(hhh]”hÝ)�”}”(hX(a degraded mode useful for various cache coherency situations (e.g., rolling back snapshots of underlying storage). Reads and writes always go to the origin. If a write goes to a cached origin block, then the cache block is invalidated. To enable passthrough mode the cache must be clean.”h]”hX(a degraded mode useful for various cache coherency situations (e.g., rolling back snapshots of underlying storage). Reads and writes always go to the origin. If a write goes to a cached origin block, then the cache block is invalidated. To enable passthrough mode the cache must be clean.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÔhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjñubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj·ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ metadata2”h]”hŒ metadata2”…”�”}”(hj.h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÛhj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj(ubj…)�”}”(hhh]”hÝ)�”}”(hŒ€use version 2 of the metadata. This stores the dirty bits in a separate btree, which improves speed of shutting down the cache.”h]”hŒ€use version 2 of the metadata. This stores the dirty bits in a separate btree, which improves speed of shutting down the cache.”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÛhjBubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj(ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj·ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒno_discard_passdown”h]”hŒno_discard_passdown”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kßhjbubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj_ubj…)�”}”(hhh]”hÝ)�”}”(hŒIdisable passing down discards from the cache to the origin's data device.”h]”hŒKdisable passing down discards from the cache to the origin’s data device.”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kßhjyubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj_ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj·ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhj ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j_hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jZhj™ubah}”(h]”h ]”h"]”h$]”h&]”uh1j=h³hÊh´KÍhj)h²hubhÝ)�”}”(hŒ‰A policy called 'default' is always registered. This is an alias for the policy we currently think is giving best all round performance.”h]”hŒ�A policy called ‘default’ is always registered. This is an alias for the policy we currently think is giving best all round performance.”…”�”}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kãhj)h²hubhÝ)�”}”(hŒŒAs the default policy could vary between kernels, if you are relying on the characteristics of a specific policy, always request it by name.”h]”hŒŒAs the default policy could vary between kernels, if you are relying on the characteristics of a specific policy, always request it by name.”…”�”}”(hj½h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kæhj)h²hubeh}”(h]”Œ constructor”ah ]”h"]”Œ constructor”ah$]”h&]”uh1hµhjh²hh³hÊh´K±ubh¶)�”}”(hhh]”(h»)�”}”(hŒStatus”h]”hŒStatus”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÓh²hh³hÊh´KêubjC)�”}”(hXV <#used metadata blocks>/<#total metadata blocks> <#used cache blocks>/<#total cache blocks> <#read hits> <#read misses> <#write hits> <#write misses> <#demotions> <#promotions> <#dirty> <#features> * <#core args> * <#policy args> * ”h]”hXV <#used metadata blocks>/<#total metadata blocks> <#used cache blocks>/<#total cache blocks> <#read hits> <#read misses> <#write hits> <#write misses> <#demotions> <#promotions> <#dirty> <#features> * <#core args> * <#policy args> * ”…”�”}”hjäsbah}”(h]”h ]”h"]”h$]”h&]”jRjSuh1jBh³hÊh´KîhjÓh²hubj[)�”}”(hhh]”j`)�”}”(hhh]”(je)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jdhjõubje)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K5uh1jdhjõubj{)�”}”(hhh]”(j€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒmetadata block size”h]”hŒmetadata block size”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K÷hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubj…)�”}”(hhh]”hÝ)�”}”(hŒ3Fixed block size for each metadata block in sectors”h]”hŒ3Fixed block size for each metadata block in sectors”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K÷hj)ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ#used metadata blocks”h]”hŒ#used metadata blocks”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KùhjIubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjFubj…)�”}”(hhh]”hÝ)�”}”(hŒNumber of metadata blocks used”h]”hŒNumber of metadata blocks used”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kùhj`ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjFubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ#total metadata blocks”h]”hŒ#total metadata blocks”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kúhj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj}ubj…)�”}”(hhh]”hÝ)�”}”(hŒTotal number of metadata blocks”h]”hŒTotal number of metadata blocks”…”�”}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kúhj—ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj}ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒcache block size”h]”hŒcache block size”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kûhj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj´ubj…)�”}”(hhh]”hÝ)�”}”(hŒ7Configurable block size for the cache device in sectors”h]”hŒ7Configurable block size for the cache device in sectors”…”�”}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KûhjÎubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj´ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ#used cache blocks”h]”hŒ#used cache blocks”…”�”}”(hjñh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kýhjîubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjëubj…)�”}”(hhh]”hÝ)�”}”(hŒ&Number of blocks resident in the cache”h]”hŒ&Number of blocks resident in the cache”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kýhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjëubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ#total cache blocks”h]”hŒ#total cache blocks”…”�”}”(hj( h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kþhj% ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj" ubj…)�”}”(hhh]”hÝ)�”}”(hŒTotal number of cache blocks”h]”hŒTotal number of cache blocks”…”�”}”(hj? h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kþhj< ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj" ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #read hits”h]”hŒ #read hits”…”�”}”(hj_ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kÿhj\ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjY ubj…)�”}”(hhh]”hÝ)�”}”(hŒ7Number of times a READ bio has been mapped to the cache”h]”hŒ7Number of times a READ bio has been mapped to the cache”…”�”}”(hjv h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kÿhjs ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjY ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #read misses”h]”hŒ #read misses”…”�”}”(hj– h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj“ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj� ubj…)�”}”(hhh]”hÝ)�”}”(hŒ8Number of times a READ bio has been mapped to the origin”h]”hŒ8Number of times a READ bio has been mapped to the origin”…”�”}”(hj­ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjª ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj� ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #write hits”h]”hŒ #write hits”…”�”}”(hjÍ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MhjÊ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjÇ ubj…)�”}”(hhh]”hÝ)�”}”(hŒ8Number of times a WRITE bio has been mapped to the cache”h]”hŒ8Number of times a WRITE bio has been mapped to the cache”…”�”}”(hjä h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjá ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjÇ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #write misses”h]”hŒ #write misses”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjþ ubj…)�”}”(hhh]”hÝ)�”}”(hŒ9Number of times a WRITE bio has been mapped to the origin”h]”hŒ9Number of times a WRITE bio has been mapped to the origin”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjþ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #demotions”h]”hŒ #demotions”…”�”}”(hj; h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj8 ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj5 ubj…)�”}”(hhh]”hÝ)�”}”(hŒ7Number of times a block has been removed from the cache”h]”hŒ7Number of times a block has been removed from the cache”…”�”}”(hjR h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MhjO ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj5 ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #promotions”h]”hŒ #promotions”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M hjo ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjl ubj…)�”}”(hhh]”hÝ)�”}”(hŒ3Number of times a block has been moved to the cache”h]”hŒ3Number of times a block has been moved to the cache”…”�”}”(hj‰ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M hj† ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjl ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ#dirty”h]”hŒ#dirty”…”�”}”(hj© h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M hj¦ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj£ ubj…)�”}”(hhh]”hÝ)�”}”(hŒ9Number of blocks in the cache that differ from the origin”h]”hŒ9Number of blocks in the cache that differ from the origin”…”�”}”(hjÀ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M hj½ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj£ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #feature args”h]”hŒ #feature args”…”�”}”(hjà h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M hjÝ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjÚ ubj…)�”}”(hhh]”hÝ)�”}”(hŒ Number of feature args to follow”h]”hŒ Number of feature args to follow”…”�”}”(hj÷ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M hjô ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjÚ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ feature args”h]”hŒ feature args”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj ubj…)�”}”(hhh]”hÝ)�”}”(hŒ'writethrough' (optional)”h]”hŒ‘writethrough’ (optional)”…”�”}”(hj. h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj+ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ #core args”h]”hŒ #core args”…”�”}”(hjN h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MhjK ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjH ubj…)�”}”(hhh]”hÝ)�”}”(hŒ'Number of core arguments (must be even)”h]”hŒ'Number of core arguments (must be even)”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjb ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjH ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ core args”h]”hŒ core args”…”�”}”(hj… h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj‚ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj ubj…)�”}”(hhh]”hÝ)�”}”(hŒ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj$ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒcache metadata mode”h]”hŒcache metadata mode”…”�”}”(hja h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj^ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj[ ubj…)�”}”(hhh]”(hÝ)�”}”(hŒ!ro if read-only, rw if read-write”h]”hŒ!ro if read-only, rw if read-write”…”�”}”(hjx h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhju ubhÝ)�”}”(hŒÄIn serious cases where even a read-only mode is deemed unsafe no further I/O will be permitted and the status will just contain the string 'Fail'. The userspace recovery tools should then be used.”h]”hŒÈIn serious cases where even a read-only mode is deemed unsafe no further I/O will be permitted and the status will just contain the string ‘Fail’. The userspace recovery tools should then be used.”…”�”}”(hj† h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhju ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j„hj[ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubj€)�”}”(hhh]”(j…)�”}”(hhh]”hÝ)�”}”(hŒ needs_check”h]”hŒ needs_check”…”�”}”(hj¦ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj£ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj  ubj…)�”}”(hhh]”hÝ)�”}”(hX)'needs_check' if set, '-' if not set A metadata operation has failed, resulting in the needs_check flag being set in the metadata's superblock. The metadata device must be deactivated and checked/repaired before the cache can be made fully operational again. '-' indicates needs_check is not set.”h]”hX7‘needs_check’ if set, ‘-’ if not set A metadata operation has failed, resulting in the needs_check flag being set in the metadata’s superblock. The metadata device must be deactivated and checked/repaired before the cache can be made fully operational again. ‘-’ indicates needs_check is not set.”…”�”}”(hj½ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhjº ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hj  ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jzhjõubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j_hjòubah}”(h]”h ]”h"]”h$]”h&]”uh1jZhjÓh²hh³hÊh´Nubeh}”(h]”Œstatus”ah ]”h"]”Œstatus”ah$]”h&]”uh1hµhjh²hh³hÊh´Kêubh¶)�”}”(hhh]”(h»)�”}”(hŒMessages”h]”hŒMessages”…”�”}”(hjõ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjò h²hh³hÊh´M%ubhÝ)�”}”(hŒÂPolicies will have different tunables, specific to each one, so we need a generic way of getting and setting these. Device-mapper messages are used. (A sysfs interface would also be possible.)”h]”hŒÂPolicies will have different tunables, specific to each one, so we need a generic way of getting and setting these. Device-mapper messages are used. (A sysfs interface would also be possible.)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M'hjò h²hubhÝ)�”}”(hŒThe message format is::”h]”hŒThe message format is:”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M+hjò h²hubjC)�”}”(hŒ ”h]”hŒ ”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”jRjSuh1jBh³hÊh´M-hjò h²hubhÝ)�”}”(hŒE.g.::”h]”hŒE.g.:”…”�”}”(hj- h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M/hjò h²hubjC)�”}”(hŒ4dmsetup message my_cache 0 sequential_threshold 1024”h]”hŒ4dmsetup message my_cache 0 sequential_threshold 1024”…”�”}”hj; sbah}”(h]”h ]”h"]”h$]”h&]”jRjSuh1jBh³hÊh´M1hjò h²hubhÝ)�”}”(hXCInvalidation is removing an entry from the cache without writing it back. Cache blocks can be invalidated via the invalidate_cblocks message, which takes an arbitrary number of cblock ranges. Each cblock range's end value is "one past the end", meaning 5-10 expresses a range of values from 5 to 9. Each cblock must be expressed as a decimal value, in the future a variant message that takes cblock ranges expressed in hexadecimal may be needed to better support efficient invalidation of larger caches. The cache must be in passthrough mode when invalidate_cblocks is used::”h]”hXHInvalidation is removing an entry from the cache without writing it back. Cache blocks can be invalidated via the invalidate_cblocks message, which takes an arbitrary number of cblock ranges. Each cblock range’s end value is “one past the endâ€�, meaning 5-10 expresses a range of values from 5 to 9. Each cblock must be expressed as a decimal value, in the future a variant message that takes cblock ranges expressed in hexadecimal may be needed to better support efficient invalidation of larger caches. The cache must be in passthrough mode when invalidate_cblocks is used:”…”�”}”(hjI h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M4hjò h²hubjC)�”}”(hŒ:invalidate_cblocks [|-]*”h]”hŒ:invalidate_cblocks [|-]*”…”�”}”hjW sbah}”(h]”h ]”h"]”h$]”h&]”jRjSuh1jBh³hÊh´M>hjò h²hubhÝ)�”}”(hŒE.g.::”h]”hŒE.g.:”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M@hjò h²hubjC)�”}”(hŒFdmsetup message my_cache 0 invalidate_cblocks 2345 3456-4567 5678-6789”h]”hŒFdmsetup message my_cache 0 invalidate_cblocks 2345 3456-4567 5678-6789”…”�”}”hjs sbah}”(h]”h ]”h"]”h$]”h&]”jRjSuh1jBh³hÊh´MBhjò h²hubeh}”(h]”Œmessages”ah ]”h"]”Œmessages”ah$]”h&]”uh1hµhjh²hh³hÊh´M%ubeh}”(h]”Œtarget-interface”ah ]”h"]”Œtarget interface”ah$]”h&]”uh1hµhh·h²hh³hÊh´K®ubh¶)�”}”(hhh]”(h»)�”}”(hŒExamples”h]”hŒExamples”…”�”}”(hj” h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj‘ h²hh³hÊh´MEubhÝ)�”}”(hŒ!The test suite can be found here:”h]”hŒ!The test suite can be found here:”…”�”}”(hj¢ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MGhj‘ h²hubhÝ)�”}”(hŒ5https://github.com/jthornber/device-mapper-test-suite”h]”hŒ reference”“”)�”}”(hj² h]”hŒ5https://github.com/jthornber/device-mapper-test-suite”…”�”}”(hj¶ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j² uh1j´ hj° ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MIhj‘ h²hubjC)�”}”(hXPdmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \ /dev/mapper/ssd /dev/mapper/origin 512 1 writeback default 0' dmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \ /dev/mapper/ssd /dev/mapper/origin 1024 1 writeback \ mq 4 sequential_threshold 1024 random_threshold 8'”h]”hXPdmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \ /dev/mapper/ssd /dev/mapper/origin 512 1 writeback default 0' dmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \ /dev/mapper/ssd /dev/mapper/origin 1024 1 writeback \ mq 4 sequential_threshold 1024 random_threshold 8'”…”�”}”hjÊ sbah}”(h]”h ]”h"]”h$]”h&]”jRjSuh1jBh³hÊh´MMhj‘ h²hubeh}”(h]”Œexamples”ah ]”h"]”Œexamples”ah$]”h&]”uh1hµhh·h²hh³hÊh´MEubeh}”(h]”Œcache”ah ]”h"]”Œcache”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”j„Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jå jâ j)j&júj÷jjjŒj‰jÁj¾j jjUjRjŠj‡j¿j¼jæjãj j jŽ j‹ jÐjÍjï jì j† jƒ jÝ jÚ uŒ nametypes”}”(jå ‰j)‰jú‰j‰jŒ‰jÁ‰j ‰jU‰jЉj¿‰jæ‰j ‰jŽ ‰jЉjï ‰j† ‰jÝ ‰uh}”(jâ h·j&hËj÷j,jjýj‰jj¾j�jjÄjRj#j‡jXj¼j�jãjÂj jéj‹ jjÍj)jì jÓjƒ jò jÚ j‘ uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.