バックグラウンド
承認済みの回答を含むスーパーユーザーの場合:
スーパーユーザーでも:
–そして、最初の回答から、ブート引数 vm_compressor
の値がsysctl変数の 値と一致しないことがわかりますvm.compressor_mode
。
OS X 10.9のAppleオープンソース、Mavericks。xnu-2422.1.72の場合:
vm_compressor.cで:
/*
* vm_compressor_mode has a heirarchy of control to set its value.
* boot-args are checked first, then device-tree, and finally
* the default value that is defined below. See vm_fault_init() for
* the boot-arg & device-tree code.
*/
8 GBのメモリを搭載したMacBookPro5,2の場合:
sh-3.2$ sysctl -a vm.compressor_mode
vm.compressor_mode: 4
vm_pageout.hのふもと付近:
extern int vm_compressor_mode;
extern int vm_compressor_thread_count;
#define VM_PAGER_DEFAULT 0x1 /* Use default pager. */
#define VM_PAGER_COMPRESSOR_NO_SWAP 0x2 /* In-core compressor only. */
#define VM_PAGER_COMPRESSOR_WITH_SWAP 0x4 /* In-core compressor + swap backend. */
#define VM_PAGER_FREEZER_DEFAULT 0x8 /* Freezer backed by default pager.*/
#define VM_PAGER_FREEZER_COMPRESSOR_NO_SWAP 0x10 /* Freezer backed by in-core compressor only i.e. frozen data remain in-core compressed.*/
#define VM_PAGER_FREEZER_COMPRESSOR_WITH_SWAP 0x20 /* Freezer backed by in-core compressor with swap support too.*/
#define VM_PAGER_MAX_MODES 6 /* Total number of vm compressor modes supported */
#define DEFAULT_PAGER_IS_ACTIVE ((vm_compressor_mode & VM_PAGER_DEFAULT) == VM_PAGER_DEFAULT)
#define COMPRESSED_PAGER_IS_ACTIVE (vm_compressor_mode & (VM_PAGER_COMPRESSOR_NO_SWAP | VM_PAGER_COMPRESSOR_WITH_SWAP))
#define DEFAULT_FREEZER_IS_ACTIVE ((vm_compressor_mode & VM_PAGER_FREEZER_DEFAULT) == VM_PAGER_FREEZER_DEFAULT)
#define DEFAULT_FREEZER_COMPRESSED_PAGER_IS_ACTIVE (vm_compressor_mode & (VM_PAGER_FREEZER_COMPRESSOR_NO_SWAP | VM_PAGER_FREEZER_COMPRESSOR_WITH_SWAP))
質問
それが持っていることは可能ですが有効のために4以外のモードを圧縮メモリ?
もしそうなら、モードの簡単な英語の説明を見つけることができますか?