Shiqi
Posts: 4
Joined: Mon Oct 28, 2019 2:51 pm

How to check if dynamic memory split is working?

Sun Dec 22, 2019 1:57 pm

I have added coherent_pool=6M smsc95xx.turbo_mode=N in cmdline.txt
and
cma_lwm=16
cma_hwm=32
cma_offline_start=16
in config,txt
But how to check if dynamic memory split is working?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9278
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to check if dynamic memory split is working?

Sun Dec 22, 2019 10:01 pm

Where have you got those config.txt settings from? None of them are supported, and I thought had been removed.
They were from old Broadcom android platforms, and even then it was a bit hit and miss.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Shiqi
Posts: 4
Joined: Mon Oct 28, 2019 2:51 pm

Re: How to check if dynamic memory split is working?

Mon Dec 23, 2019 5:42 am

6by9 wrote:
Sun Dec 22, 2019 10:01 pm
Where have you got those config.txt settings from? None of them are supported, and I thought had been removed.
They were from old Broadcom android platforms, and even then it was a bit hit and miss.
Here
https://elinux.org/RPiconfig

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9278
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to check if dynamic memory split is working?

Mon Dec 23, 2019 7:04 am

3rd party content. It also contains the sentence
Note: As per https://github.com/raspberrypi/linux/issues/503 popcornmix states that CMA is not officially supported.
A static cma heap is supported and used (particularly with pi4).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9278
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to check if dynamic memory split is working?

Mon Dec 23, 2019 7:20 am

https://github.com/raspberrypi/linux/co ... e8d115b104
commit b017e4f94b17ac322340159f63c546e8d115b104
Author: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Tue Oct 17 16:21:13 2017 +0100

vc-cma: Remove the driver as non-functional on Pi

vc-cma was pulled in from previous platforms. It
supposedly allowed the VPU relocatable heap to be
released to the kernel as CMA, but it was always
a little fragile.

Remove it to avoid complications.
That was on the 4.9 branch.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

bluenote
Posts: 116
Joined: Thu Feb 05, 2015 8:25 am

Re: How to check if dynamic memory split is working?

Sat Jan 11, 2020 4:54 am

6by9 wrote:
Mon Dec 23, 2019 7:20 am
https://github.com/raspberrypi/linux/co ... e8d115b104
commit b017e4f94b17ac322340159f63c546e8d115b104
Author: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Tue Oct 17 16:21:13 2017 +0100

vc-cma: Remove the driver as non-functional on Pi

vc-cma was pulled in from previous platforms. It
supposedly allowed the VPU relocatable heap to be
released to the kernel as CMA, but it was always
a little fragile.

Remove it to avoid complications.
That was on the 4.9 branch.
Sorry to be dense here, but does this mean there's no way to dynamically assign video memory in raspbian anymore? For example to run Kodi but then go back to more regular ram intensive applications?
Thanks.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9278
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: How to check if dynamic memory split is working?

Sat Jan 11, 2020 3:00 pm

bluenote wrote:
Sat Jan 11, 2020 4:54 am
Sorry to be dense here, but does this mean there's no way to dynamically assign video memory in raspbian anymore? For example to run Kodi but then go back to more regular ram intensive applications?
No, there is no way to dynamically assign gpu_mem to hand memory back to the ARM. The old mechanism was just too unstable to be worth supporting.
Very few use cases need more than 128MB of gpu_mem which isn't a huge sacrifice on any of the 1GB models. 512MB versions you'll probably want to reboot with alternate settings.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

andrum99
Posts: 1259
Joined: Fri Jul 20, 2012 2:41 pm

Re: How to check if dynamic memory split is working?

Sat Jan 11, 2020 4:45 pm

6by9 wrote:
Sat Jan 11, 2020 3:00 pm
bluenote wrote:
Sat Jan 11, 2020 4:54 am
Sorry to be dense here, but does this mean there's no way to dynamically assign video memory in raspbian anymore? For example to run Kodi but then go back to more regular ram intensive applications?
No, there is no way to dynamically assign gpu_mem to hand memory back to the ARM. The old mechanism was just too unstable to be worth supporting.
Very few use cases need more than 128MB of gpu_mem which isn't a huge sacrifice on any of the 1GB models. 512MB versions you'll probably want to reboot with alternate settings.
Just to add - the Pi 4B doesn't use the gpu_mem allocation for most of its GPU activities. Instead, the memory is dynamically allocated at run time from within Linux.

bluenote
Posts: 116
Joined: Thu Feb 05, 2015 8:25 am

Re: How to check if dynamic memory split is working?

Sat Jan 11, 2020 8:17 pm

6by9 wrote:
Sat Jan 11, 2020 3:00 pm
bluenote wrote:
Sat Jan 11, 2020 4:54 am
Sorry to be dense here, but does this mean there's no way to dynamically assign video memory in raspbian anymore? For example to run Kodi but then go back to more regular ram intensive applications?
No, there is no way to dynamically assign gpu_mem to hand memory back to the ARM. The old mechanism was just too unstable to be worth supporting.
Very few use cases need more than 128MB of gpu_mem which isn't a huge sacrifice on any of the 1GB models. 512MB versions you'll probably want to reboot with alternate settings.
Ok thanks for clarifying. I find on my pi2b 200 MB GPU is too little to get HEVC decoding to work, 300 is enough though (haven't tested in between as yet..). I guess I have a choice of either dual booting raspbian/libreelec or writing a little script to change config.txt and reboot to switch between raspbian memory configs. But really HEVC decoding on the pi2b is ... a fantastic bonus as it is.

Return to “Advanced users”