[xenial/linux-kvm,SRU,1/1] UBUNTU: [Config]: enable CONFIG_ZRAM

Message ID 20180803065107.28833-2-po-hsu.lin@canonical.com
State New
Headers show
Series
  • UBUNTU: [Config]: enable CONFIG_ZRAM
Related show

Commit Message

Po-Hsu Lin Aug. 3, 2018, 6:51 a.m.
BugLink: https://bugs.launchpad.net/bugs/1766823

zram is an useful module for memory constrained systems. However it's
imposibble for KVM kernel user to use it.

Enable the CONFIG_ZRAM and other related configs like in generic kernel to make
it available for KVM kernels, so that it can pass the ubuntu_zram_smoke_test
in the SRU regression test suite.

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 debian.kvm/config/config.common.ubuntu | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Kleber Souza Aug. 14, 2018, 4:01 p.m. | #1
On 08/03/18 08:51, Po-Hsu Lin wrote:
> BugLink: https://bugs.launchpad.net/bugs/1766823
> 
> zram is an useful module for memory constrained systems. However it's
> imposibble for KVM kernel user to use it.
> 
> Enable the CONFIG_ZRAM and other related configs like in generic kernel to make
> it available for KVM kernels, so that it can pass the ubuntu_zram_smoke_test
> in the SRU regression test suite.
> 
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
> ---
>  debian.kvm/config/config.common.ubuntu | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/debian.kvm/config/config.common.ubuntu b/debian.kvm/config/config.common.ubuntu
> index 20e51ff2..d2093c1 100644
> --- a/debian.kvm/config/config.common.ubuntu
> +++ b/debian.kvm/config/config.common.ubuntu
> @@ -1709,6 +1709,7 @@ CONFIG_PERF_EVENTS=y
>  CONFIG_PERF_EVENTS_INTEL_UNCORE=y
>  # CONFIG_PERSISTENT_KEYRINGS is not set
>  CONFIG_PGTABLE_LEVELS=4
> +CONFIG_PGTABLE_MAPPING=y
>  # CONFIG_PHANTOM is not set
>  # CONFIG_PHONET is not set
>  # CONFIG_PHYLIB is not set
> @@ -2291,4 +2292,8 @@ CONFIG_ZLIB_INFLATE=y
>  CONFIG_ZONE_DMA32=y
>  CONFIG_ZONE_DMA_FLAG=0
>  # CONFIG_ZPOOL is not set
> -# CONFIG_ZSMALLOC is not set
> +CONFIG_ZRAM=m
> +CONFIG_ZRAM_LZ4_COMPRESS=y
> +CONFIG_ZRAM_WRITEBACK=y

CONFIG_ZRAM_WRITEBACK hasn't been implemented yet in Xenial's 4.4 kernel.

> +CONFIG_ZSMALLOC=y
> +# CONFIG_ZSMALLOC_STAT is not set
>
Po-Hsu Lin Aug. 15, 2018, 7:23 a.m. | #2
Thanks, I will send V2 for this.

BTW, how did you find this issue, I tried to build the kernel before
sending this patch but the compiler didn't complain about his.

On Wed, Aug 15, 2018 at 12:01 AM, Kleber Souza
<kleber.souza@canonical.com> wrote:
> On 08/03/18 08:51, Po-Hsu Lin wrote:
>> BugLink: https://bugs.launchpad.net/bugs/1766823
>>
>> zram is an useful module for memory constrained systems. However it's
>> imposibble for KVM kernel user to use it.
>>
>> Enable the CONFIG_ZRAM and other related configs like in generic kernel to make
>> it available for KVM kernels, so that it can pass the ubuntu_zram_smoke_test
>> in the SRU regression test suite.
>>
>> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
>> ---
>>  debian.kvm/config/config.common.ubuntu | 7 ++++++-
>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/debian.kvm/config/config.common.ubuntu b/debian.kvm/config/config.common.ubuntu
>> index 20e51ff2..d2093c1 100644
>> --- a/debian.kvm/config/config.common.ubuntu
>> +++ b/debian.kvm/config/config.common.ubuntu
>> @@ -1709,6 +1709,7 @@ CONFIG_PERF_EVENTS=y
>>  CONFIG_PERF_EVENTS_INTEL_UNCORE=y
>>  # CONFIG_PERSISTENT_KEYRINGS is not set
>>  CONFIG_PGTABLE_LEVELS=4
>> +CONFIG_PGTABLE_MAPPING=y
>>  # CONFIG_PHANTOM is not set
>>  # CONFIG_PHONET is not set
>>  # CONFIG_PHYLIB is not set
>> @@ -2291,4 +2292,8 @@ CONFIG_ZLIB_INFLATE=y
>>  CONFIG_ZONE_DMA32=y
>>  CONFIG_ZONE_DMA_FLAG=0
>>  # CONFIG_ZPOOL is not set
>> -# CONFIG_ZSMALLOC is not set
>> +CONFIG_ZRAM=m
>> +CONFIG_ZRAM_LZ4_COMPRESS=y
>> +CONFIG_ZRAM_WRITEBACK=y
>
> CONFIG_ZRAM_WRITEBACK hasn't been implemented yet in Xenial's 4.4 kernel.
>
>> +CONFIG_ZSMALLOC=y
>> +# CONFIG_ZSMALLOC_STAT is not set
>>
>
Kleber Souza Aug. 15, 2018, 8:36 a.m. | #3
Hi Sam,

On 08/15/18 09:23, Po-Hsu Lin wrote:
> Thanks, I will send V2 for this.
> 
> BTW, how did you find this issue, I tried to build the kernel before
> sending this patch but the compiler didn't complain about his.

I ran a grep in the debian* directories (and also on the source code
itself to double check) looking for the config options, not finding it I
checked the mainline tree for the introducing commit.


Thanks,
Kleber

> 
> On Wed, Aug 15, 2018 at 12:01 AM, Kleber Souza
> <kleber.souza@canonical.com> wrote:
>> On 08/03/18 08:51, Po-Hsu Lin wrote:
>>> BugLink: https://bugs.launchpad.net/bugs/1766823
>>>
>>> zram is an useful module for memory constrained systems. However it's
>>> imposibble for KVM kernel user to use it.
>>>
>>> Enable the CONFIG_ZRAM and other related configs like in generic kernel to make
>>> it available for KVM kernels, so that it can pass the ubuntu_zram_smoke_test
>>> in the SRU regression test suite.
>>>
>>> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
>>> ---
>>>  debian.kvm/config/config.common.ubuntu | 7 ++++++-
>>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/debian.kvm/config/config.common.ubuntu b/debian.kvm/config/config.common.ubuntu
>>> index 20e51ff2..d2093c1 100644
>>> --- a/debian.kvm/config/config.common.ubuntu
>>> +++ b/debian.kvm/config/config.common.ubuntu
>>> @@ -1709,6 +1709,7 @@ CONFIG_PERF_EVENTS=y
>>>  CONFIG_PERF_EVENTS_INTEL_UNCORE=y
>>>  # CONFIG_PERSISTENT_KEYRINGS is not set
>>>  CONFIG_PGTABLE_LEVELS=4
>>> +CONFIG_PGTABLE_MAPPING=y
>>>  # CONFIG_PHANTOM is not set
>>>  # CONFIG_PHONET is not set
>>>  # CONFIG_PHYLIB is not set
>>> @@ -2291,4 +2292,8 @@ CONFIG_ZLIB_INFLATE=y
>>>  CONFIG_ZONE_DMA32=y
>>>  CONFIG_ZONE_DMA_FLAG=0
>>>  # CONFIG_ZPOOL is not set
>>> -# CONFIG_ZSMALLOC is not set
>>> +CONFIG_ZRAM=m
>>> +CONFIG_ZRAM_LZ4_COMPRESS=y
>>> +CONFIG_ZRAM_WRITEBACK=y
>>
>> CONFIG_ZRAM_WRITEBACK hasn't been implemented yet in Xenial's 4.4 kernel.
>>
>>> +CONFIG_ZSMALLOC=y
>>> +# CONFIG_ZSMALLOC_STAT is not set
>>>
>>

Patch

diff --git a/debian.kvm/config/config.common.ubuntu b/debian.kvm/config/config.common.ubuntu
index 20e51ff2..d2093c1 100644
--- a/debian.kvm/config/config.common.ubuntu
+++ b/debian.kvm/config/config.common.ubuntu
@@ -1709,6 +1709,7 @@  CONFIG_PERF_EVENTS=y
 CONFIG_PERF_EVENTS_INTEL_UNCORE=y
 # CONFIG_PERSISTENT_KEYRINGS is not set
 CONFIG_PGTABLE_LEVELS=4
+CONFIG_PGTABLE_MAPPING=y
 # CONFIG_PHANTOM is not set
 # CONFIG_PHONET is not set
 # CONFIG_PHYLIB is not set
@@ -2291,4 +2292,8 @@  CONFIG_ZLIB_INFLATE=y
 CONFIG_ZONE_DMA32=y
 CONFIG_ZONE_DMA_FLAG=0
 # CONFIG_ZPOOL is not set
-# CONFIG_ZSMALLOC is not set
+CONFIG_ZRAM=m
+CONFIG_ZRAM_LZ4_COMPRESS=y
+CONFIG_ZRAM_WRITEBACK=y
+CONFIG_ZSMALLOC=y
+# CONFIG_ZSMALLOC_STAT is not set