LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-18-2019, 08:08 AM   #1
monopolyman720
LQ Newbie
 
Registered: May 2019
Posts: 1

Rep: Reputation: Disabled
Compiling Fedora kernel with preemption (not voluntary)


I'm trying to compile a kernel with preemption so I can get lower latency in my Windows 10 virtual machine. I suppose the first question is whether it's even worth it to try to use fedpkg and the fedora kernel, or should I just use mainline?

Now to the problem I'm having with the fedora kernel. I keep getting some variation of "[OPTION]=is not set after generation, had [OPTION]=[VALUE] in Source tree" when trying to actually build the kernel. Below are the steps I'm taking and the errors I'm getting. What's going on here?
Code:
$ fedpkg clone -a kernel
$ cd kernel
Modified kernel.spec to add a patch (acs override) and change the buildid

Added options to kernel-local:

Code:
CONFIG_PREEMPT=y
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_RCU_NOCB_CPU=y
CONFIG_HZ=1000
CONFIG_SCHED_AUTOGROUP=y
CONFIG_GENERIC_CPU=y
Code:
$ fedpkg local
        
Processing /home/joe/git/kernel/kernel-5.1.fc31/linux-5.2.0-0.rc0.git9.1.vfio.fc31.x86_64/configs/kernel-5.2.0-x86_64.config ... /home/joe/git/kernel/kernel-5.1.fc31/linux-5.2.0-0.rc0.git9.1.vfio.fc31.x86_64/configs/kernel-5.2.0-x86_64.config:4340:warning: override: PREEMPT_VOLUNTARY changes choice state
/home/joe/git/kernel/kernel-5.1.fc31/linux-5.2.0-0.rc0.git9.1.vfio.fc31.x86_64/configs/kernel-5.2.0-x86_64.config:4340:warning: override: PREEMPT_VOLUNTARY changes choice state
Error: Mismatches found in configuration files
Found CONFIG_PREEMPT=is not set after generation, had CONFIG_PREEMPT=y in Source tree

This made me think I just need to disable voluntary preemption, so I added the following to kernel-local:

Code:
CONFIG_PREEMPT_VOLUNTARY=n
Code:
$ fedpkg local
    
Processing /home/joe/git/kernel/kernel-5.1.fc31/linux-5.2.0-0.rc0.git9.1.vfio.fc31.x86_64/configs/kernel-5.2.0-x86_64.config ... Found unset config items, please set them to an appropriate value
    CONFIG_CEC_GPIO=n
    CONFIG_DEBUG_PREEMPT=y
    CONFIG_PREEMPT_TRACER=n
Ok… I added those to kernel-local. So now it looks like this:

Code:
CONFIG_PREEMPT=y
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_RCU_NOCB_CPU=y
CONFIG_HZ=1000
CONFIG_SCHED_AUTOGROUP=y
CONFIG_GENERIC_CPU=y
CONFIG_PREEMPT_VOLUNTARY=n
CONFIG_CEC_GPIO=n
CONFIG_DEBUG_PREEMPT=y
CONFIG_PREEMPT_TRACER=n

Code:
$ fedpkg local
    
Processing /home/joe/git/kernel/kernel-5.1.fc31/linux-5.2.0-0.rc0.git9.1.vfio.fc31.x86_64/configs/kernel-5.2.0-x86_64.config ... Error: Mismatches found in configuration files
Found CONFIG_PREEMPT_VOLUNTARY=is not set after generation, had CONFIG_PREEMPT_VOLUNTARY=n in Source tree
Found CONFIG_CEC_GPIO=is not set after generation, had CONFIG_CEC_GPIO=n in Source tree
Found CONFIG_PREEMPT_TRACER=is not set after generation, had CONFIG_PREEMPT_TRACER=n in Source tree
Tried to disable DEBUG_PREEMPT because the other two are already disabled (although I was doubtful it would make a difference)

Code:
$ fedpkg local
    
Found CONFIG_PREEMPT_VOLUNTARY=is not set after generation, had CONFIG_PREEMPT_VOLUNTARY=n in Source tree
Found CONFIG_CEC_GPIO=is not set after generation, had CONFIG_CEC_GPIO=n in Source tree
Found CONFIG_DEBUG_PREEMPT=is not set after generation, had CONFIG_DEBUG_PREEMPT=n in Source tree
Found CONFIG_PREEMPT_TRACER=is not set after generation, had CONFIG_PREEMPT_TRACER=n in Source tree
 
Old 05-27-2019, 07:21 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
To quote the Kerryman, when asked for directions: "You know, if I was you, I wouldn't start from here at all!"

You're strictly on your own here. The issues are:
  • All Red Hat machines have a considerable wad of kernel patches installed in the kernel source.
  • Fedora regularly updates the kernel and grub, potentially crashing your system, but you probably know that; It's all good fun, anyhow.
  • Your patch could conflict with theirs.

I have point 3 there because Red Hat have somebody/somebodies on the LKML, and they probably can't get their patches past Linus. So they have some issues, or mebbe they're just going a different road.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using kernel preemption power in application not in C programing language arash_220 Programming 1 12-29-2009 09:29 AM
LXer: Open source business models must be voluntary LXer Syndicated Linux News 0 12-27-2008 12:10 PM
Need confirmation regarding preemption in 2.6.10 kernel archieval Programming 0 04-23-2007 01:51 AM
Rt2500 preemption kernel driver available? lebabyg Linux - Wireless Networking 6 06-29-2006 04:01 AM
Kernel preemption error installing Zaptel for Asterisks neutrin0 Linux - Software 1 11-13-2005 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration