mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
zram: move zram size warning to documentation
Move zram warning about disksize and size of memory correlation to zram documentation. Signed-off-by: Sergey Senozhatsky <[email protected]> Acked-by: Minchan Kim <[email protected]> Cc: Jerome Marchand <[email protected]> Cc: Nitin Gupta <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
59fc86a492
commit
e64cd51d2f
2 changed files with 5 additions and 15 deletions
|
|
@ -535,23 +535,8 @@ static void zram_reset_device(struct zram *zram, bool reset_capacity)
|
|||
|
||||
static void zram_init_device(struct zram *zram, struct zram_meta *meta)
|
||||
{
|
||||
if (zram->disksize > 2 * (totalram_pages << PAGE_SHIFT)) {
|
||||
pr_info(
|
||||
"There is little point creating a zram of greater than "
|
||||
"twice the size of memory since we expect a 2:1 compression "
|
||||
"ratio. Note that zram uses about 0.1%% of the size of "
|
||||
"the disk when not in use so a huge zram is "
|
||||
"wasteful.\n"
|
||||
"\tMemory Size: %lu kB\n"
|
||||
"\tSize you selected: %llu kB\n"
|
||||
"Continuing anyway ...\n",
|
||||
(totalram_pages << PAGE_SHIFT) >> 10, zram->disksize >> 10
|
||||
);
|
||||
}
|
||||
|
||||
/* zram devices sort of resembles non-rotational disks */
|
||||
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, zram->disk->queue);
|
||||
|
||||
zram->meta = meta;
|
||||
pr_debug("Initialization done!\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue