tło
W trybie Super użytkownik z zaakceptowaną odpowiedzią :
Również w superużytkowniku:
- i od pierwszej odpowiedzi rozumiemy, że wartość argumentu rozruchowego vm_compressor
nie odpowiada wartości zmiennej sysctl vm.compressor_mode
.
W Apple open source dla OS X 10.9, Mavericks; w xnu-2422.1.72:
W 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.
*/
Na MacBookPro5,2 z 8 GB pamięci znajduję:
sh-3.2$ sysctl -a vm.compressor_mode
vm.compressor_mode: 4
W pobliżu stóp 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))
Pytanie
Czy możliwe jest włączenie trybu innego niż 4 dla pamięci skompresowanej ?
Jeśli tak, to czy możemy znaleźć proste angielskie wyjaśnienie trybów?