[Arm-dev] unable to configure zram-swap on RPI 4 8G model (32bit)

Thu Dec 17 21:10:31 UTC 2020
mark <mark at havak.nl>

-----Original message-----
> From: Pablo Sebastián Greco <pablo at fliagreco.com.ar>
> Sent: Thursday, December 17, 2020 9:39 PM
> To: mark <mark at havak.nl>; Conversations around CentOS on ARM hardware <arm-dev at centos.org>
> Subject: Re: [Arm-dev] unable to configure zram-swap on RPI 4 8G model (32bit)
>
>
> On 17/12/20 14:09, mark wrote:
> > -----Original message-----
> >> From: mark <mark at havak.nl>
> >> Sent: Monday, December 14, 2020 6:15 PM
> >> To: Pablo Sebastián Greco <pablo at fliagreco.com.ar>; Conversations around
> CentOS on ARM hardware <arm-dev at centos.org>
> >> Subject: RE: [Arm-dev] unable to configure zram-swap on RPI 4 8G model
> (32bit)
> >>
> >>
> >>
> >> -----Original message-----
> >>> From: Pablo Sebastián Greco <pablo at fliagreco.com.ar>
> >>> Sent: Monday, December 14, 2020 6:00 PM
> >>> To: Conversations around CentOS on ARM hardware <arm-dev at centos.org>;
> mark
> >> <mark at havak.nl>
> >>> Subject: Re: [Arm-dev] unable to configure zram-swap on RPI 4 8G model
> (32bit)
> >>>
> >>>
> >>> On 14/12/20 13:43, mark wrote:
> >>>> -----Original Message-----
> >>>> From: Pablo Sebastián Greco <pablo at fliagreco.com.ar>
> >>>> Sent: maandag 14 december 2020 17:20
> >>>> To: Conversations around CentOS on ARM hardware <arm-dev at centos.org>;
> >> mark
> >>> <mark at havak.nl>
> >>>> Subject: Re: [Arm-dev] unable to configure zram-swap on RPI 4 8G model
> >> (32bit)
> >>>>
> >>>> On 14/12/20 11:42, mark wrote:
> >>>>> Being aware using zram-swap is not a default feature  on the CentOS
> >>>>> Userland for armv7hl, Still want to share the problem I ran in to.
> >>>>>
> >>>>> I turns out the arm 32bit kernel with large memory support OOPS if zram-swap
> >>> is deployed if the system has more than 4GB ram.
> >>>> I'm a heavy user of zram-swap, even not being default, but I have only
> >> used
> >>> with devices that have 2G max, this is interesting. Does it still happen
> >> if
> >>> you limit the size?
> >>>> Did not test limiting the ram to 4GB myself jet, it does according to
> >> :
> >>>> https://github.com/raspberrypi/linux/issues/3839#issuecomment-723027652
> >>> I meant limiting the size of the zram-swap
> >> No the size of the swap does not seem matter: I tried 512, 1024 and 4096MB
> >>
> >> On a RPI4 4GB model it works just fine,
> >> on a 8GB model I get a "Internal error: Oops: 207"
> >>
> >> BTW running a fresh homebrew image of CentOS 7.9.2009 without a swap-partition
> >> and kernel:
> >> 5.4.72-v7l.1.el7 #1 SMP Wed Oct 21 17:20:56 UTC 2020 armv7l armv7l armv7l
> >> GNU/Linux
> >>
> >>
> >>>>
> >>>>> This issue seems to be addressed (verry recently) in kernel 5.4.81 (1)
> >>>>>
> >>>>> As mentioned this is verry recently, version 5.4.81 is just 12 day's
> >> old..
> >>>>> However if there is a testbuild of this rpi2-kernel4: I'm eager to test
> >>> it 
> > Just a heads-up,
> >
> > I could not figure out how to make a test build of a kernel => 5.4.81 based
> on the current raspberrypi2-kernel4-5.4.72 kernel.
> > Not knowledgeable enough to update the rpi-5.4.x.patch... My Bad
> >
> > However was able to rebuild the current kernel with the patch mentioned
> in the commit (1);
> > needed to include an other, quite harmless looking, patch in order to get
> it applied clean
>
> That's even better actually, because we can confirm that it actually
> that patch that fixes it, thanks!!!
>
> Just curious, how long did it take to rebuild the kernel?

About 01:45; (mock) state.log building on an odroid hc1:

2020-12-17 15:46:56,190 - Mock Version: 2.7
2020-12-17 15:46:58,637 - Start: yum update
2020-12-17 15:47:11,414 - Finish: yum update
2020-12-17 15:47:11,458 - Finish: chroot init
2020-12-17 15:47:11,470 - Start: build phase for raspberrypi2-5.4.72-v7.1.1.ns7.src.rpm
2020-12-17 15:47:11,488 - Start: build setup for raspberrypi2-5.4.72-v7.1.1.ns7.src.rpm
2020-12-17 15:48:41,143 - Finish: build setup for raspberrypi2-5.4.72-v7.1.1.ns7.src.rpm
2020-12-17 15:48:41,147 - Start: Outputting list of installed packages
2020-12-17 15:48:41,842 - Finish: Outputting list of installed packages
2020-12-17 15:48:41,843 - Start: rpmbuild raspberrypi2-5.4.72-v7.1.1.ns7.src.rpm
2020-12-17 17:28:49,731 - Finish: rpmbuild raspberrypi2-5.4.72-v7.1.1.ns7.src.rpm
2020-12-17 17:28:51,856 - Finish: build phase for raspberrypi2-5.4.72-v7.1.1.ns7.src.rpm
2020-12-17 17:28:51,884 - Start: clean chroot
2020-12-17 17:30:32,678 - Finish: clean chroot
2020-12-17 17:30:32,683 - Finish: run

probably going to move to a (faster) platform in the future;
it is hard to just say goodbye to a device that served you well :)

>
> > Long story short, zram-swap works on my RPI4 8G model:
> >
> > # swapon --show
> > NAME       TYPE      SIZE USED PRIO
> > /dev/zram0 partition 3.7G   0B   -2
> >
> > # uname -a
> > Linux localhost 5.4.72-v7l.1.1.el7 #1 SMP Thu Dec 17 16:13:03 CET 2020 armv7l
> armv7l armv7l GNU/Linux
> >
> > # free -m
> >                total        used        free      shared  buff/cache   available
> > Mem:           7876          94        7469          16         312       
> 7691
> > Swap:          3755           0        3755
> >
> >
> > In my (probably short lived) git repo the changes I made:
> > https://github.com/markVnl/Centos-raspberrypi2-kernel/tree/zram-swap-oops
> >
> >
> >>>> There's no test build yet, I'm still adjusting to what happened last
> >>>> week, but hopefully we'll have a new kernel soon
> >>>>> 1) https://github.com/raspberrypi/linux/commit/1bef5f25a69234613b92a0e2456870fee4a57efc
> >>>>>
> >>>>>    
> >>>> Pablo.
> >>>>
> >>>> _______________________________________________
> >>>> Arm-dev mailing list
> >>>> Arm-dev at centos.org
> >>>> https://lists.centos.org/mailman/listinfo/arm-dev
> Pablo.
>