Sergey Senozhatsky | 8f7d282 | 2015-04-15 16:16:09 -0700 | [diff] [blame] | 1 | What: /sys/block/zram<id>/num_reads |
| 2 | Date: August 2015 |
| 3 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 4 | Description: |
| 5 | The num_reads file is read-only and specifies the number of |
| 6 | reads (failed or successful) done on this device. |
| 7 | Now accessible via zram<id>/stat node. |
| 8 | |
| 9 | What: /sys/block/zram<id>/num_writes |
| 10 | Date: August 2015 |
| 11 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 12 | Description: |
| 13 | The num_writes file is read-only and specifies the number of |
| 14 | writes (failed or successful) done on this device. |
| 15 | Now accessible via zram<id>/stat node. |
| 16 | |
| 17 | What: /sys/block/zram<id>/invalid_io |
| 18 | Date: August 2015 |
| 19 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 20 | Description: |
| 21 | The invalid_io file is read-only and specifies the number of |
| 22 | non-page-size-aligned I/O requests issued to this device. |
| 23 | Now accessible via zram<id>/io_stat node. |
| 24 | |
| 25 | What: /sys/block/zram<id>/failed_reads |
| 26 | Date: August 2015 |
| 27 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 28 | Description: |
| 29 | The failed_reads file is read-only and specifies the number of |
| 30 | failed reads happened on this device. |
| 31 | Now accessible via zram<id>/io_stat node. |
| 32 | |
| 33 | What: /sys/block/zram<id>/failed_writes |
| 34 | Date: August 2015 |
| 35 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 36 | Description: |
| 37 | The failed_writes file is read-only and specifies the number of |
| 38 | failed writes happened on this device. |
| 39 | Now accessible via zram<id>/io_stat node. |
| 40 | |
| 41 | What: /sys/block/zram<id>/notify_free |
| 42 | Date: August 2015 |
| 43 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 44 | Description: |
| 45 | The notify_free file is read-only. Depending on device usage |
| 46 | scenario it may account a) the number of pages freed because |
| 47 | of swap slot free notifications or b) the number of pages freed |
| 48 | because of REQ_DISCARD requests sent by bio. The former ones |
| 49 | are sent to a swap block device when a swap slot is freed, which |
| 50 | implies that this disk is being used as a swap disk. The latter |
| 51 | ones are sent by filesystem mounted with discard option, |
| 52 | whenever some data blocks are getting discarded. |
| 53 | Now accessible via zram<id>/io_stat node. |
| 54 | |
| 55 | What: /sys/block/zram<id>/zero_pages |
| 56 | Date: August 2015 |
| 57 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 58 | Description: |
| 59 | The zero_pages file is read-only and specifies number of zero |
| 60 | filled pages written to this disk. No memory is allocated for |
| 61 | such pages. |
| 62 | Now accessible via zram<id>/mm_stat node. |
| 63 | |
| 64 | What: /sys/block/zram<id>/orig_data_size |
| 65 | Date: August 2015 |
| 66 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 67 | Description: |
| 68 | The orig_data_size file is read-only and specifies uncompressed |
| 69 | size of data stored in this disk. This excludes zero-filled |
| 70 | pages (zero_pages) since no memory is allocated for them. |
| 71 | Unit: bytes |
| 72 | Now accessible via zram<id>/mm_stat node. |
| 73 | |
| 74 | What: /sys/block/zram<id>/compr_data_size |
| 75 | Date: August 2015 |
| 76 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 77 | Description: |
| 78 | The compr_data_size file is read-only and specifies compressed |
| 79 | size of data stored in this disk. So, compression ratio can be |
| 80 | calculated using orig_data_size and this statistic. |
| 81 | Unit: bytes |
| 82 | Now accessible via zram<id>/mm_stat node. |
| 83 | |
| 84 | What: /sys/block/zram<id>/mem_used_total |
| 85 | Date: August 2015 |
| 86 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 87 | Description: |
| 88 | The mem_used_total file is read-only and specifies the amount |
| 89 | of memory, including allocator fragmentation and metadata |
| 90 | overhead, allocated for this disk. So, allocator space |
| 91 | efficiency can be calculated using compr_data_size and this |
| 92 | statistic. |
| 93 | Unit: bytes |
| 94 | Now accessible via zram<id>/mm_stat node. |
| 95 | |
| 96 | What: /sys/block/zram<id>/mem_used_max |
| 97 | Date: August 2015 |
| 98 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 99 | Description: |
| 100 | The mem_used_max file is read/write and specifies the amount |
| 101 | of maximum memory zram have consumed to store compressed data. |
| 102 | For resetting the value, you should write "0". Otherwise, |
| 103 | you could see -EINVAL. |
| 104 | Unit: bytes |
| 105 | Downgraded to write-only node: so it's possible to set new |
| 106 | value only; its current value is stored in zram<id>/mm_stat |
| 107 | node. |
| 108 | |
| 109 | What: /sys/block/zram<id>/mem_limit |
| 110 | Date: August 2015 |
| 111 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 112 | Description: |
| 113 | The mem_limit file is read/write and specifies the maximum |
| 114 | amount of memory ZRAM can use to store the compressed data. |
| 115 | The limit could be changed in run time and "0" means disable |
| 116 | the limit. No limit is the initial state. Unit: bytes |
| 117 | Downgraded to write-only node: so it's possible to set new |
| 118 | value only; its current value is stored in zram<id>/mm_stat |
| 119 | node. |