Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Does anyone use sys-kernel/rt-sources on Raspberry Pi 3 B+?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 454

PostPosted: Mon Sep 09, 2019 5:11 am    Post subject: Does anyone use sys-kernel/rt-sources on Raspberry Pi 3 B+? Reply with quote

Is it even possible? I want to use CONFIG_PREEMPT_RT_FULL because sys-fs/zfs-kmod refused to compile for arm64 because CONFIG_PREEMPT used GPL-only symbols on arm64.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 395

PostPosted: Mon Sep 09, 2019 7:22 am    Post subject: Reply with quote

I use
https://github.com/raspberrypi/linux/tree/rpi-4.19.y-rt
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47136
Location: 56N 3W

PostPosted: Mon Sep 09, 2019 10:26 am    Post subject: Reply with quote

crocket,

You will need to apply the rt patch set to the Pi kernel as lots of the Pi kernel is not upstreamed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 454

PostPosted: Mon Sep 09, 2019 10:39 am    Post subject: Reply with quote

antonellocaroli wrote:
I use
https://github.com/raspberrypi/linux/tree/rpi-4.19.y-rt


Unfortunately, PREEMPT_RT_FULL selects PREEMPT=y which blocks sys-fs/zfs-kmod-0.8.1
It seems I should stick with zfs-0.7.13 for now.

NeddySeagoon wrote:
crocket,

You will need to apply the rt patch set to the Pi kernel as lots of the Pi kernel is not upstreamed.


https://github.com/raspberrypi/linux/tree/rpi-4.19.y-rt seems easier.
When is upstreaming going to be largely done?


Last edited by crocket on Mon Sep 09, 2019 12:36 pm; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47136
Location: 56N 3W

PostPosted: Mon Sep 09, 2019 12:35 pm    Post subject: Reply with quote

crocket,

Some of the Pi code will never be upstreamed.

I don't know if the realtime patch set applies to the 4.19.y Pi kernel branch but it looks like someone has tried with some degree of success as rpi-4.19.y-rt exists.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 395

PostPosted: Mon Sep 09, 2019 12:36 pm    Post subject: Reply with quote

yesterday I used directly the RT patch on the sources:

https://github.com/raspberrypi/linux

compiled for arm64,

everything seems to have gone well.

Code:
wget https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.19/patch-4.19.59-rt24.patch.xz


Quote:
xzcat patch-4.19.59-rt24.patch.xz | patch -p1
Code:
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 454

PostPosted: Mon Sep 09, 2019 1:18 pm    Post subject: Reply with quote

NeddySeagoon wrote:
crocket,

Some of the Pi code will never be upstreamed.

I don't know if the realtime patch set applies to the 4.19.y Pi kernel branch but it looks like someone has tried with some degree of success as rpi-4.19.y-rt exists.


Do you know how to configure vanilla linux kernel for Raspberry Pi 3 B+?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47136
Location: 56N 3W

PostPosted: Mon Sep 09, 2019 2:37 pm    Post subject: Reply with quote

crocket,

Yes but don't do that. About 50% of the dts is missing in the vanilla kernel, so not much works.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 454

PostPosted: Tue Sep 10, 2019 3:21 am    Post subject: Reply with quote

NeddySeagoon wrote:
crocket,

Yes but don't do that. About 50% of the dts is missing in the vanilla kernel, so not much works.


dts? Do I need to copy bcm2710-rpi-3-b-plus.dtb to /boot whenever I compile a new kernel?
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 454

PostPosted: Thu Sep 12, 2019 5:16 am    Post subject: Reply with quote

antonellocaroli wrote:
yesterday I used directly the RT patch on the sources:

https://github.com/raspberrypi/linux

compiled for arm64,

everything seems to have gone well.

Code:
wget https://cdn.kernel.org/pub/linux/kernel/projects/rt/4.19/patch-4.19.59-rt24.patch.xz


Quote:
xzcat patch-4.19.59-rt24.patch.xz | patch -p1


Everything seems to work well, but some things are broken.
While Raspberry Pi 3 B+ was running on the latest commit of the raspberry pi kernel patched with patch-4.19.59-rt24.patch.xz, dwc_otg interrupts were always consuming 30% of CPU resource.
This interrupt increased CPU temperature by 6 degrees celcius.

I went back to the raspberry pi kernel which was enough to eliminate xruns.
CONFIG_PREEMPT and CONFIG_RT_GROUP_SCHED can withstand xruns when devices like GPU, HDD, and SSD don't interrupt CPU too much.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 395

PostPosted: Sat Sep 14, 2019 6:22 am    Post subject: Reply with quote

crocket wrote:
NeddySeagoon wrote:
crocket,

Yes but don't do that. About 50% of the dts is missing in the vanilla kernel, so not much works.


dts? Do I need to copy bcm2710-rpi-3-b-plus.dtb to /boot whenever I compile a new kernel?


yes


Quote:
Everything seems to work well, but some things are broken.
While Raspberry Pi 3 B+ was running on the latest commit of the raspberry pi kernel patched with patch-4.19.59-rt24.patch.xz, dwc_otg interrupts were always consuming 30% of CPU resource.
This interrupt increased CPU temperature by 6 degrees celcius.

I went back to the raspberry pi kernel which was enough to eliminate xruns.
CONFIG_PREEMPT and CONFIG_RT_GROUP_SCHED can withstand xruns when devices like GPU, HDD, and SSD don't interrupt CPU too much.


It doesn't seem to me that I have this kind of problem.

Code:
   83 root     -92   0       0      0      0 S   5.0   0.0   3:02.14 irq/39-xhci_hcd                                                                                                         
 1534 root     -90   0       0      0      0 S   1.7   0.0   1:11.78 irq/30-eth0                                                                                                             
   11 root      rt   0       0      0      0 S   1.0   0.0   0:31.54 ktimersoftd/0                                                                                                           
 1594 network+ -86 -10   84116   7024   3916 S   1.0   0.2   0:40.99 networkaudiod                                                                                                           
19577 root      20   0    8016   2636   2096 R   0.7   0.1   0:00.09 top                                                                                                                     
   12 root      -2   0       0      0      0 S   0.3   0.0   0:01.81 rcuc/0                                                                                                                   
    1 root      20   0    1996   1356   1260 S   0.0   0.0   0:00.78 init                     


in these images you will find RT kernels already compiled.

https://www.nexthardware.com/forum/pc-top-software/90075-gentooplayer-immagini-x86_64-raspberry-pi-3b-3b-allo-sparkyusbbridge-beaglebone-black-botic-driver-9.html#post987403

maybe try, they are arm64...

you should copy the files to your boot and rename them, and the modules to /lib/modules/
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 454

PostPosted: Sat Sep 14, 2019 6:38 am    Post subject: Reply with quote

antonellocaroli wrote:
in these images you will find RT kernels already compiled.

https://www.nexthardware.com/forum/pc-top-software/90075-gentooplayer-immagini-x86_64-raspberry-pi-3b-3b-allo-sparkyusbbridge-beaglebone-black-botic-driver-9.html#post987403

maybe try, they are arm64...

you should copy the files to your boot and rename them, and the modules to /lib/modules/


Forget about making real-time linux patch work on Raspberry Pi 3 B+.
I decided to minimize computer maintenance by selling Raspberry Pi 3 B+. I am using it only as a morning alarm.
It's just easier to buy a portable alarm clock that plays music playlists for this.

If you still want to investigate, you should dig `top`. It reports dwc_otg interrupts which have real-time priority of 51.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 395

PostPosted: Sat Sep 14, 2019 6:53 am    Post subject: Reply with quote

Code:
  87 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/22-dwc_otg_                                                                                                         
   89 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/22-dwc_otg_                                                                                                         
   85 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/22-dwc_otg                                                                                                           
   88 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/21-dwc_otg_                                                                                                         
   54 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/16-fe00b880                                                                                                         
 1622 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ipv6_addrconf                                                                                                           
    1 root      20   0    1996   1356   1260 S   0.0   0.0   0:00.81 init                                                                                                                     
   97 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ext4-rsv-conver                                                                                                         
 4431 root      20   0   74992  65948   8228 S   0.0   1.7   0:20.51 emerge                                                                                                                   
10496 portage   20   0    9228   3724   2656 S   0.0   0.1   0:00.02 emake                                                                                                                   
10477 portage   20   0   12100   6612   2936 S   0.0   0.2   0:00.10 ebuild.sh                                                                                                               
10493 portage   20   0   12096   5892   2160 S   0.0   0.1   0:00.00 ebuild.sh                                                                                                               
   84 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 dwc_otg             
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 454

PostPosted: Sat Sep 14, 2019 10:41 am    Post subject: Reply with quote

Well done. But, I'm going to sell Raspberry Pi 3 B+.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum