-
Notifications
You must be signed in to change notification settings - Fork 42
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
Kernel config suggestions #8
Comments
@larsim are there any plans to implement some of these changes in the "official" kernel for the reMarkable? Would you be more likely to incorporate these changes if a PR were opened? It would be great to not have to compile and install a custom kernel to get the performance and battery life improvements listed above! |
One really cool addition would also be to have uinput in the kernel by default. I don't think that the additional size would be noticeable to most while solving a plethora of challenges for certain custom software. Examples:
The fuse module would probably also be nice for some people but is of lesser importance for me personally and I don't see as much usecases for it. As said this is just a suggestion. I fully understand if this is not something that is deemed useful for the device and therefore not added. Edit: Fixed grammar |
I agree.
Ideally, every debug stuff should be disabled.
watchdog is a security mechanism to prevent the unbounded hanging of the system, it's a must-have feature on these devices. Moreover, the overhead is insignificant, something like few CPU cycles every ~30s when the device is running, that's not executed when the device is sleeping,
Can you elaborate here, what do you want to change? add more branch-prediction helper calls?
You should not worry too much about CONFIG_HZ, interrupt are not really impacted by that, hard interrupt handlers are executed 'synchronously' and so do not depend on that value, 'threaded' interrupts handlers are executed with SCHED_FIFO algorithm making them running fast after the interrupt occurred. CONFIG_HZ mainly impacts the time wheel accuracy, but most of the time it's not so important. The other impact could be the task timeslice being too large, but it's in part fixed by CONFIG_SCHED_HRTICK that causes the kernel to rely on high-resolution timer for fair scheduling.
I would say such a device does not host real-time applications, so I'm not really sure what it could improve for the user. Sure it will bring 'bounded latency', but will also degrade overall performances. One problem is also that RT-patched Linux is far less tested than mainline Linux, and not sure that downstream drivers integrated for this project have been well tested with RT patches. RT patches make substantial modifications (e.g. converting spinlock to mutex) that may have not been taken into account by all these drivers, and so can bring a wide new range of issues.
Yes, that should probably be worth testing that.
Thanks for all your ideas, we are looking at them, and some changes have already been applied internally. |
It looks like that's a private repository. |
'Optimize very likely/unlikely branches' is a kernel config option. It's just provides hints to gcc, making things slightly faster when it's profiling is right and slightly slower when it's not, which should be the minority case. Maybe you can argue negativity bias might make disabling it preferable but I think it's worth considering.
This is really cool to hear, glad I could help! |
One of the suggested changes, i.e. trim unused symbols, has been implemented with commit 6df0622 Unfortunately, because of this change it is now impossible to load custom modules. Could this change be reverted? |
Can't you rebuild your own kernel with required config changes to load your module(s)? |
Yes, but that can be risky, and makes it harder to provide custom software to people that requires it, as it's a lot harder to ask them to replace the kernel on their device. |
I'd similarly ask if you'd consider reverting the TRIM_UNUSED_KSYMS change. It has significantly degraded my experience with my rM2. It breaks almost all ability to add extra modules: something as simple as needing the device to connect to a VPN now requires completely rebuilding a new kernel, with all the risks that this entails (particularly on the rM2), rather than simply compiling a module and copying over a few files, eg, for Wireguard or tun/tap interfaces. The kernel config documentation generally recommends against enabling the option, and doesn't even display it in configuration unless expert mode is enabled, noting that it's for 'specialized environments that can tolerate a "non-standard" kernel'. It really does cripple the device for some users, for seemingly minimal benefit. Having it disabled is not a debugging option: keeping ksyms is the standard. |
Thank you 80c6812 |
I would suggest closing this issue now. |
Hi, I compiled a custom kernel for my reMarkable 1 and was talking about the changes to the configs I made in the discord. It was suggested I share them here, as they may be useful to include in the default kernel to improve performance, battery life or both.
The following changes I see no reason not to have on all kernels:
I've made some more changes that I'm slightly uncertain about for enabling by default, but will share them anyway:
I'm an armature coming at this with little experience, so forgive me if everything here has already been considered and accounted for, but I figured if there was a chance even one of these things hadn't been thought of in the existing config it could be useful to flag up! I will say, though I haven't benchmarked regular usage performance or screen latency, I have recorded an almost exactly three second decrease in boot time with these settings, which I think is fairly significant.
The text was updated successfully, but these errors were encountered: