Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there any side effects to kernel page size configuration? #6605

Open
tuzbtla opened this issue Jan 11, 2025 · 5 comments
Open

Are there any side effects to kernel page size configuration? #6605

tuzbtla opened this issue Jan 11, 2025 · 5 comments

Comments

@tuzbtla
Copy link

tuzbtla commented Jan 11, 2025

Describe the bug

After I configured the kernel to 4K page table, there was an exception when opening chromium-browser.But my system still works.

Steps to reproduce the behaviour

KERNEL=kernel_2712

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2712_defconfig

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig

menuconfig changes the page size to 4K
image

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs

Replace the kernel after compiling

Device (s)

Raspberry Pi CM5

System

cat /etc/rpi-issue 
Raspberry Pi reference 2024-11-19
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 891df1e21ed2b6099a2e6a13e26c91dea44b34d4, stage4

vcgencmd version 
2024/09/23 14:02:56 
Copyright (c) 2012 Broadcom
version 26826259 (release) (embedded)

uname -a
Linux raspberrypi 6.6.69-v8-16k+ #3 SMP PREEMPT Sat Jan 11 16:48:06 CST 2025 aarch64 GNU/Linux

Logs

[ 47.264394] v3d 1002000000.v3d: MMU error from client PTB (1) at 0x1761000, pte invalid

Additional context

No response

@pelwell
Copy link
Contributor

pelwell commented Jan 11, 2025

If all you want to do is change the Pi5 page size to 4kB, use bcm2711_defconfig - it's the only difference between the two defconfigs. And if you don't need to build your own kernel for other reasons, use the prebuilt kernel8.img, which works on all 64-bit-capable Pis:

kernel=kernel8.img

@tuzbtla
Copy link
Author

tuzbtla commented Jan 11, 2025

If all you want to do is change the Pi5 page size to 4kB, use bcm2711_defconfig - it's the only difference between the two defconfigs. And if you don't need to build your own kernel for other reasons, use the prebuilt kernel8.img, which works on all 64-bit-capable Pis:

kernel=kernel8.img

uname -a
Linux raspberrypi 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux

Thanks, I used defconfig because I wanted to eliminate the effects of my own configuration. I tried kernel8.img and he appeared occasionally

@pelwell
Copy link
Contributor

pelwell commented Jan 13, 2025

I tried kernel8.img you said and it doesn't have this log ”v3d 1002000000.v3d: MMU error from client PTB (1) at 0x1761000, pte invalid.“ Does that mean there's something wrong with the latest kernel?

It's not clear which of those two kernels is "the latest" in your view, but those error message have dogged the V3D driver over the years. Whenever I/we have investigated we've put them down to prefetch/overreading by the 3D hardware when objects end right at the end of a memory page and the following page is not mapped. I submitted a Mesa patch that added some padding after each object. It's possible that for newer V3D blocks more padding is required, but AFAIK these errors are still harmless.

@pelwell
Copy link
Contributor

pelwell commented Jan 13, 2025

And to answer the question in the issue title, have you seen this feedback issue?: raspberrypi/bookworm-feedback#107

@tuzbtla
Copy link
Author

tuzbtla commented Jan 13, 2025

I tried kernel8.img you said and it doesn't have this log ”v3d 1002000000.v3d: MMU error from client PTB (1) at 0x1761000, pte invalid.“ Does that mean there's something wrong with the latest kernel?

It's not clear which of those two kernels is "the latest" in your view, but those error message have dogged the V3D driver over the years. Whenever I/we have investigated we've put them down to prefetch/overreading by the 3D hardware when objects end right at the end of a memory page and the following page is not mapped. I submitted a Mesa patch that added some padding after each object. It's possible that for newer V3D blocks more padding is required, but AFAIK these errors are still harmless.

Thank you, Is the patch you're talking about this commit?

The 6.6.51 4K kernel also appears occasionally, and at first I was misled. There was a problem with my last reply, I have changed it.

I tried 6.6.47 6.6.51 6.6.69, 6.6.70 of 4K kernel, will occasionally the log, but I can't reproduce it in 16K kernel. Could be the answer you're talking about. My program worked, and I decided not to focus on him.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants