Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

sunxi64: Decrease amount of (video?) reserved memory

Featured Replies

Is it a way to reduce the amount of reserved memory on sunxi64 devices?

 

Trying to remove all useless for my case features (video/audio/wireless) to free up memory/resources for other tasks.

 

The amount of total (413M) vs real (512M) memory is quite low:

# grep -e Mem -e Cma /proc/meminfo
MemTotal:         422416 kB
MemFree:           49620 kB
MemAvailable:     314396 kB
CmaTotal:              0 kB
CmaFree:               0 kB

# dmesg | grep Memory:
[    0.000000] Memory: 407924K/524288K available (14144K kernel code, 1456K rwdata, 8700K rodata, 3072K init, 521K bss, 116364K reserved, 0K cma-reserved)

# grep extraargs /boot/armbianEnv.txt
extraargs=cma=0 sunxi_no_mali_mem_reserve sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16

# uname -a
Linux pi160 6.6.65-current-sunxi64 #1 SMP Wed Dec 11 19:13:43 +04 2024 aarch64 GNU/Linux

 

The tricks which works for `sunxi` (e.g. `orangepizero`) does not work for `sunxi64`  boards:

https://linux-sunxi.org/Kernel_arguments

 

Attempt to specify that extraargs in /boot/armbianEnv.txt have no effect (also their defaults are absent in /boot/boot.cmd, while present in orangepizero's version), except for `cma=0` with is not directly related to total available memory.

Custom kernel with `CONFIG_CMA=n` also changes nothing.

Edited by vmspike

Solved by vmspike

  • Author
  • Solution

The same case was already discussed here, but with no result:

 

Finally found that adding `swiotlb=1` to kernel args releases 64 MB of memory:

/boot/armbianEnv.txt:extraargs=... nokaslr cma=0 swiotlb=0

but not disables it completely:

[    0.000000] software IO TLB: SWIOTLB bounce buffer size roundup to 1MB


Now:

MemTotal: 487684 kB

 

Alternative option `iommu=off` does not work.
 

So it's not for graphics.

This option looks reasonable for less than 4 GB RAM devices(?)

If someone knows potential drawbacks, please disclose.

 

Edited by vmspike

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.