zsmalloc/zram: add zs_get_max_size_bytes and use it in zram
RFC 2/3 zsmalloc/zram: add zs_get_max_size_bytes and use it in zram
[2/3]
But why isn't mem_used_max writable? (save tearing down and rebuilding device to reset max)
static DEVICE_ATTR(mem_used_max, S_IRUGO, mem_used_max_show, NULL);
static DEVICE_ATTR(mem_used_max, S_IRUGO | S_IWUSR, mem_used_max_show, NULL);
with a check in the store() that the new value is positive and less
than current max?
I'm also a little puzzled why there is a new API zs_get_max_size_bytes if the data is accessible through sysfs?
Especially if max limit will be (as you propose for [3/3]) through accessed through zsmalloc and hence zram needn't access.
[3/3]
I concur that the zram limit is best implemented in zsmalloc. I am looking forward to that revised code.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Hello,
Sorry for the late response. I was on vacation and then was busy.
Quoted 6 lines · David Horner
[2/3]
But why isn't
mem_used_maxwritable? (save tearing down and rebuilding device to reset max)
I don't know what you mean but I will make it writable so user can reset it to zero when they want.
Quoted 5 lines
static
DEVICE_ATTR(mem_used_max, S_IRUGO, mem_used_max_show, NULL);static
DEVICE_ATTR(mem_used_max, S_IRUGO | S_IWUSR, mem_used_max_show, NULL);
Quoted 8 lines
with a check in the
store()that the new value is positive and less
than current max?I'm also a little puzzled why there is a new API
zs_get_max_size_bytesif the data is accessible through sysfs?
Especially if max limit will be (as you propose for [3/3]) through accessed through zsmalloc and hence zram needn't access.
I don't know why you meant.
Anyway, I will resend revised version and Cc you.
Please, comment on that. :)
Quoted 6 lines
[3/3]
I concur that the zram limit is best implemented in zsmalloc. I am looking forward to that revised code.
Thanks!
Quoted 9 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>