SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slackware64-current with "True Multilib" and KDE4Town.
Posts: 9,109
Original Poster
Rep:
Quote:
Originally Posted by cwizardone
FWIW:
The 5.15-rc6 kernel has been built and installed. It still has a blank screen for 7 seconds after the BIOS check, but other than that, all is well.
Since I have the today and tomorrow off I installed the testing kernel and took it for a spin in some video games.
It feels much better in terms of input latency for shooters but is definitely not stable. I've had several crashes for CSGO and it's a significant change from the normal kernel.
So far I have played Darkplaces (Quake), OpenJK (Jedi Outcast), dhewm3 (Doom 3), yamagi-quake2 (Quake2), and eduke32 (Duken Nukem 3d). Admittedly I haven't played for hours on end, but I haven't had a single issue as of yet. I think may re-play Black Mesa and Half-Life 2 and see how they perform.
I got preempt working with the 5.14.14-x86_64-3 set (earlier I didn't notice it was in testing/ so just reinstalled 5.14.14-x86_64-1.) I ran into another problem after this but that should probably be its own thread (about LILO.) I had significant desktop lag for years/decades using Slackware even after disabling animations, most effects, and upgrading to new hardware (compared to DOS-based even on a 486) but some things seem to be improving now. I just hope we'll have the option for a full 'lowlatency' kernel same style as some distros have as an alternative option, without having to use custom kernel and lose support.
I'm now also with my workplace laptop on 5.14.14-x86_64-3 with preempt=full, and it feels so much better. I've a lot webrtc Meetings/Phonecalls and windows10 running in qemu.
The qemu startup wasn't slower with fullpreempt, which someone reported elsewhere(other distro, ubuntu?).
It feels much more fluent and faster working most of the time with firefox and parallel chromium, i hope this kernelconfig will make it into 15.0.
You need a preemptd listening on dbus to go along with that!
Yeah, probably this way he will write a systemd-preemptd thing...
BUT, I've got a reason to switch the preemption methods on particular situations - going "none" when building things, otherwise staying on "voluntary" and inspecting again and again the /sys filesystem, then doing echoing on it looks a bit overhand.
So, considering that also other people may want to inspect and/or switch often the preemption method, I thought about the need for a script.
And, do not worry! I do not asked you to write it. I will write it myself - for my own usage will be enough.
Last edited by LuckyCyborg; 10-26-2021 at 06:09 AM.
I will write it myself - for my own usage will be enough.
And here it's my take on a preemptctl script:
Code:
#!/bin/sh
#
# Copyright 2021 Patrick Volkerding, Sebeka, MN, USA
#
# Redistribution and use of this script, with or without modification, is.
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF.
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,.
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,.
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR.
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF.
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
SYSFILE=/sys/kernel/debug/sched/preempt
function show_preempt_mode()
{
local PREEMPT_MODE=$(cat $SYSFILE | sed -r "s/^.*\((.*)\).*?$/\1/g")
echo "Dynamic Preempt: ${PREEMPT_MODE}"
}
if [ ! -e $SYSFILE ]; then
echo "${SYSFILE} not found?"
exit 1
elif [ $# -ge 1 ]; then
echo "Usage: $(basename $0) <method> ..."
exit 1
elif [ $# -eq 0 ]; then
show_preempt_mode
exit 0
fi
PREEMPT_MODE="$1"
# Sanity check:
if ! echo $PREEMPT_MODE | grep -wq -e none -e voluntary -e full ; then
echo "ERROR: Invalid mode for Dynamic Preempt: $PREEMPT_MODE"
exit 1
fi
echo "$PREEMPT_MODE" > $SYSFILE
show_preempt_mode
exit 0
It assumes that /sys/kernel/debug is always mounted via /etc/fstab
Is there any reason why we couldn't package the preempt kernel as a different set of packages? This would be similar to the x86 port with the smp/non-smp packages. In the past we've had to make decisions about kernel config and in this case I feel like it's worth doing that to make 15.0 a little less scary.
Back in the day I would switch to the smp kernel on my 800 MHz Pentium3 so having a desktop-oriented kernel presented as an option for those who want it could be implemented the same way.
Is there any reason why we couldn't package the preempt kernel as a different set of packages? This would be similar to the x86 port with the smp/non-smp packages. In the past we've had to make decisions about kernel config and in this case I feel like it's worth doing that to make 15.0 a little less scary.
Back in the day I would switch to the smp kernel on my 800 MHz Pentium3 so having a desktop-oriented kernel presented as an option for those who want it could be implemented the same way.
WHY we should package it as a different set of packages, when this kernel is essentially universal, for both servers and desktops?
By default, this /testing kernel uses no preemption, then it is on "server mode" and the user can tune it as he likes for desktop usage, up to "full" preemptive mode, good for gaming and audiophiles.
Please note that the today kernel's behavior from -current basically is equivalent with "voluntary" mode, which is not the best for servers.
Last edited by LuckyCyborg; 10-26-2021 at 11:37 AM.
Is there any reason why we couldn't package the preempt kernel as a different set of packages? This would be similar to the x86 port with the smp/non-smp packages. In the past we've had to make decisions about kernel config and in this case I feel like it's worth doing that to make 15.0 a little less scary.
Back in the day I would switch to the smp kernel on my 800 MHz Pentium3 so having a desktop-oriented kernel presented as an option for those who want it could be implemented the same way.
Switching between smp/non-smp at boot/runtime is not possible, so there was no choice other than have two kernels at that time.
To feel less scary it's best to use preempt kernel as much as possible and report any issues, i think.
Obvious it's a tool made to run as root - it should be put in a /sbin path.
For me, this script is more than enough - anybody interested feel free to improve it as you like.
Congratulations for this nice script, it looks very useful!
And congratulations for involuntary great demonstration of how can be made a proprietary program with source code available.
Yes, a program published without a license, automatically is considered having a proprietary license where "all rights are reserved" to author. This happens at least on America, Europa and Asia.
So, if our BDFL wants to include it on Slackware, he (and nobody else) can't redistribute it because "all rights are reserved" to you. In fact, because you expressed to willingness to share it, the people are free to download or cut&paste it from your post, and use the script for personal purposes, other than commercial.
I raised this point as aside of how important is the licensing of a program. Is not enough to have access at its source code, but also to have a series of freedoms to use and reuse it.
And your program is a perfect example of proprietary program with source code available.
Last edited by ZhaoLin1457; 10-26-2021 at 01:06 PM.
Congratulations for this nice script, it looks very useful!
Thanks!
Quote:
Originally Posted by ZhaoLin1457
And congratulations for involuntary great demonstration of how can be made a proprietary program with source code available.
Yes, a program published without a license, automatically is considered having a proprietary license where "all rights are reserved" to author. This happens at least on America, Europa and Asia.
So, if our BDFL wants to include it on Slackware, he (and nobody else) can't redistribute it because "all rights are reserved" to you. In fact, because you expressed to willingness to share it, the people are free to download or cut&paste it from your post, and use the script for personal purposes, other than commercial.
I raised this point as aside of how important is the licensing of a program. Is not enough to have access at its source code, but also to have a series of freedoms to use and reuse it.
And your program is a perfect example of proprietary program with source code available.
My bad!
All right, all rights handed to our BDFL with a license added accordingly.
Last edited by LuckyCyborg; 10-26-2021 at 01:29 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.