Nitin Gupta | e98419c | 2010-08-09 22:56:56 +0530 | [diff] [blame] | 1 | What: /sys/block/zram<id>/disksize |
| 2 | Date: August 2010 |
| 3 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 4 | Description: |
| 5 | The disksize file is read-write and specifies the disk size |
| 6 | which represents the limit on the *uncompressed* worth of data |
| 7 | that can be stored in this disk. |
| 8 | |
| 9 | What: /sys/block/zram<id>/initstate |
| 10 | Date: August 2010 |
| 11 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 12 | Description: |
| 13 | The disksize file is read-only and shows the initialization |
| 14 | state of the device. |
| 15 | |
| 16 | What: /sys/block/zram<id>/reset |
| 17 | Date: August 2010 |
| 18 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 19 | Description: |
| 20 | The disksize file is write-only and allows resetting the |
| 21 | device. The reset operation frees all the memory assocaited |
| 22 | with this device. |
| 23 | |
| 24 | What: /sys/block/zram<id>/num_reads |
| 25 | Date: August 2010 |
| 26 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 27 | Description: |
| 28 | The num_reads file is read-only and specifies the number of |
| 29 | reads (failed or successful) done on this device. |
| 30 | |
| 31 | What: /sys/block/zram<id>/num_writes |
| 32 | Date: August 2010 |
| 33 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 34 | Description: |
| 35 | The num_writes file is read-only and specifies the number of |
| 36 | writes (failed or successful) done on this device. |
| 37 | |
| 38 | What: /sys/block/zram<id>/invalid_io |
| 39 | Date: August 2010 |
| 40 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 41 | Description: |
| 42 | The invalid_io file is read-only and specifies the number of |
| 43 | non-page-size-aligned I/O requests issued to this device. |
| 44 | |
Sergey Senozhatsky | de980e9 | 2014-04-07 15:38:14 -0700 | [diff] [blame] | 45 | What: /sys/block/zram<id>/failed_reads |
| 46 | Date: February 2014 |
| 47 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 48 | Description: |
| 49 | The failed_reads file is read-only and specifies the number of |
| 50 | failed reads happened on this device. |
| 51 | |
| 52 | What: /sys/block/zram<id>/failed_writes |
| 53 | Date: February 2014 |
| 54 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 55 | Description: |
| 56 | The failed_writes file is read-only and specifies the number of |
| 57 | failed writes happened on this device. |
| 58 | |
| 59 | What: /sys/block/zram<id>/max_comp_streams |
| 60 | Date: February 2014 |
| 61 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 62 | Description: |
| 63 | The max_comp_streams file is read-write and specifies the |
| 64 | number of backend's zcomp_strm compression streams (number of |
| 65 | concurrent compress operations). |
| 66 | |
Sergey Senozhatsky | 0626b80d | 2014-04-07 15:38:17 -0700 | [diff] [blame] | 67 | What: /sys/block/zram<id>/comp_algorithm |
| 68 | Date: February 2014 |
| 69 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> |
| 70 | Description: |
| 71 | The comp_algorithm file is read-write and lets to show |
| 72 | available and selected compression algorithms, change |
| 73 | compression algorithm selection. |
| 74 | |
Nitin Gupta | e98419c | 2010-08-09 22:56:56 +0530 | [diff] [blame] | 75 | What: /sys/block/zram<id>/notify_free |
| 76 | Date: August 2010 |
| 77 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 78 | Description: |
Sergey Senozhatsky | c85f1d3 | 2014-10-09 15:29:57 -0700 | [diff] [blame] | 79 | The notify_free file is read-only. Depending on device usage |
| 80 | scenario it may account a) the number of pages freed because |
| 81 | of swap slot free notifications or b) the number of pages freed |
| 82 | because of REQ_DISCARD requests sent by bio. The former ones |
| 83 | are sent to a swap block device when a swap slot is freed, which |
| 84 | implies that this disk is being used as a swap disk. The latter |
| 85 | ones are sent by filesystem mounted with discard option, |
| 86 | whenever some data blocks are getting discarded. |
Nitin Gupta | e98419c | 2010-08-09 22:56:56 +0530 | [diff] [blame] | 87 | |
| 88 | What: /sys/block/zram<id>/discard |
| 89 | Date: August 2010 |
| 90 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 91 | Description: |
| 92 | The discard file is read-only and specifies the number of |
| 93 | discard requests received by this device. These requests |
| 94 | provide information to block device regarding blocks which are |
| 95 | no longer used by filesystem. |
| 96 | |
| 97 | What: /sys/block/zram<id>/zero_pages |
| 98 | Date: August 2010 |
| 99 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 100 | Description: |
| 101 | The zero_pages file is read-only and specifies number of zero |
| 102 | filled pages written to this disk. No memory is allocated for |
| 103 | such pages. |
| 104 | |
| 105 | What: /sys/block/zram<id>/orig_data_size |
| 106 | Date: August 2010 |
| 107 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 108 | Description: |
| 109 | The orig_data_size file is read-only and specifies uncompressed |
| 110 | size of data stored in this disk. This excludes zero-filled |
| 111 | pages (zero_pages) since no memory is allocated for them. |
| 112 | Unit: bytes |
| 113 | |
| 114 | What: /sys/block/zram<id>/compr_data_size |
| 115 | Date: August 2010 |
| 116 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 117 | Description: |
| 118 | The compr_data_size file is read-only and specifies compressed |
| 119 | size of data stored in this disk. So, compression ratio can be |
| 120 | calculated using orig_data_size and this statistic. |
| 121 | Unit: bytes |
| 122 | |
| 123 | What: /sys/block/zram<id>/mem_used_total |
| 124 | Date: August 2010 |
| 125 | Contact: Nitin Gupta <ngupta@vflare.org> |
| 126 | Description: |
| 127 | The mem_used_total file is read-only and specifies the amount |
| 128 | of memory, including allocator fragmentation and metadata |
| 129 | overhead, allocated for this disk. So, allocator space |
| 130 | efficiency can be calculated using compr_data_size and this |
| 131 | statistic. |
Jesper Juhl | f902831 | 2012-07-20 22:35:17 +0200 | [diff] [blame] | 132 | Unit: bytes |
Minchan Kim | 3c854b6 | 2014-10-09 15:29:53 -0700 | [diff] [blame] | 133 | |
Minchan Kim | cda6b06 | 2014-10-09 15:29:55 -0700 | [diff] [blame] | 134 | What: /sys/block/zram<id>/mem_used_max |
| 135 | Date: August 2014 |
| 136 | Contact: Minchan Kim <minchan@kernel.org> |
| 137 | Description: |
| 138 | The mem_used_max file is read/write and specifies the amount |
| 139 | of maximum memory zram have consumed to store compressed data. |
| 140 | For resetting the value, you should write "0". Otherwise, |
| 141 | you could see -EINVAL. |
| 142 | Unit: bytes |
| 143 | |
Minchan Kim | 3c854b6 | 2014-10-09 15:29:53 -0700 | [diff] [blame] | 144 | What: /sys/block/zram<id>/mem_limit |
| 145 | Date: August 2014 |
| 146 | Contact: Minchan Kim <minchan@kernel.org> |
| 147 | Description: |
| 148 | The mem_limit file is read/write and specifies the maximum |
| 149 | amount of memory ZRAM can use to store the compressed data. The |
| 150 | limit could be changed in run time and "0" means disable the |
| 151 | limit. No limit is the initial state. Unit: bytes |