Disable Lazy Preempt
Hey guys,
I'm pretty new to linux and working on getting a real-time kernel up and running for robot applications. I'm on Ubuntu 14.04, using kernel 3.14.3 and the 3.14.3-rt5 real-time patch. Also using x86-64. There's a known error where the whole system crashes under some load when lazy preempt is enabled. My question is: How do I disable lazy preempt? I read to add "NO_PREEMPT_LAZY" to the end of /sys/kernel/debug/sched_features, but when I try to do that (using sudo vim /sys/kernel/debug/sched_features), upon trying to save and exit (:wq) I get the following error: ' "/sys/kernel/debug/sched_features" "/sys/kernel/debug/sched_features" E667: Fsync failed WARNING: Original file may be lost or damaged don't quit the editor until the file is successfully written! Press ENTER or type command to continue ' If someone could help me get past the vim 'Fsync failed' or disable lazy preempt in another way, I would greatly appraciate it. Thank you! |
hi Tdjames
You shouldn't use vim to edit files in the /sys directory. It's a pseudo-filesystem and isn't compatible with text editors. Use echo instead: Code:
echo NO_PREEMPT_LAZY > /sys/kernel/debug/sched_features |
Hi ophirg,
Thank you for the quick response! I used the code you wrote, as well as adding sudo in front, but both times I got this: bash: /sys/kernel/debug/sched_features: Permission denied How do I get past this permission? Thank you. |
hi again
The problem with using sudo is that when you pipe the output to a file (using ">"), you are writing to the file as the original user (not root) One solution is to use bash as root. Exit bash right after executing the command. Using bash with root user is very problematic (for security reasons). Code:
sudo bash |
ophirg,
Thank you for the help. Last question though: When I used those commands I got the error: bash: echo: write error: Invalid argument Does this mean that I'm just going in the wrong direction and that using "NO_PREEMPT_LAZY" is not actually the correct way to disable lazy preempt? Thanks! I really appreciate the help. |
All times are GMT -5. The time now is 01:49 AM. |