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