I had thought that they would come from the .config file from either the kernel-source.rpm or the kernel-devel.rpm for my current kernel. But these two files are different. I run the latest kernel, namely linux-2.6.30.x86_64 . In particular, is my current kernel PREEMPT or VOLUNTARY_PREEMPT? Any way to find this out?
I know I can get the kernel I want (PREEMPT) by rebuilding, but it would be nice to avoid this, and also to be able to settle this question in general.
Thanks - jon
=========== diffs between kernel-source and kernel-devel ===========
$ diff -c ~/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config *** /home/jonrysh/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config Tue Oct 27 20:25:44 2009 --- /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config Sat Oct 17 08:38:07 2009 *************** *** 1,7 **** # # Automatically generated make config: don't edit ! # Linux kernel version: 2.6.30.8 ! # Tue Oct 27 20:25:44 2009 # CONFIG_64BIT=y # CONFIG_X86_32 is not set --- 1,7 ---- # # Automatically generated make config: don't edit ! # Linux kernel version: 2.6.30.9-90.fc11.x86_64 ! # Sat Oct 17 11:22:55 2009 # CONFIG_64BIT=y # CONFIG_X86_32 is not set *************** *** 284,291 **** CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set ! # CONFIG_PREEMPT_VOLUNTARY is not set ! CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y --- 284,291 ---- CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set ! CONFIG_PREEMPT_VOLUNTARY=y ! # CONFIG_PREEMPT is not set CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y *************** *** 3298,3304 **** CONFIG_USB_STORAGE_ALAUDA=m CONFIG_USB_STORAGE_ONETOUCH=m CONFIG_USB_STORAGE_KARMA=m ! CONFIG_USB_STORAGE_CYPRESS_ATACB=m # CONFIG_USB_LIBUSUAL is not set
# --- 3298,3304 ---- CONFIG_USB_STORAGE_ALAUDA=m CONFIG_USB_STORAGE_ONETOUCH=m CONFIG_USB_STORAGE_KARMA=m ! # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set # CONFIG_USB_LIBUSUAL is not set
# *************** *** 3969,3975 **** # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set - CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set --- 3969,3974 ---- *************** *** 3977,3983 **** # CONFIG_DEBUG_LOCK_ALLOC is not set # CONFIG_PROVE_LOCKING is not set # CONFIG_LOCK_STAT is not set - CONFIG_TRACE_IRQFLAGS=y CONFIG_DEBUG_SPINLOCK_SLEEP=y # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set CONFIG_STACKTRACE=y --- 3976,3981 ---- *************** *** 4024,4031 **** # CONFIG_FUNCTION_TRACER=y # CONFIG_FUNCTION_GRAPH_TRACER is not set ! CONFIG_IRQSOFF_TRACER=y ! # CONFIG_PREEMPT_TRACER is not set CONFIG_SYSPROF_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_CONTEXT_SWITCH_TRACER=y --- 4022,4028 ---- # CONFIG_FUNCTION_TRACER=y # CONFIG_FUNCTION_GRAPH_TRACER is not set ! # CONFIG_IRQSOFF_TRACER is not set CONFIG_SYSPROF_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_CONTEXT_SWITCH_TRACER=y
Jonathan Ryshpan wrote:
I had thought that they would come from the .config file from either the kernel-source.rpm or the kernel-devel.rpm for my current kernel. But these two files are different. I run the latest kernel, namely linux-2.6.30.x86_64 . In particular, is my current kernel PREEMPT or VOLUNTARY_PREEMPT? Any way to find this out?
I know I can get the kernel I want (PREEMPT) by rebuilding, but it would be nice to avoid this, and also to be able to settle this question in general.
Thanks - jon
=========== diffs between kernel-source and kernel-devel ===========
$ diff -c ~/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config *** /home/jonrysh/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config Tue Oct 27 20:25:44 2009 --- /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config Sat Oct 17 08:38:07 2009
*** 1,7 **** # # Automatically generated make config: don't edit ! # Linux kernel version: 2.6.30.8 ! # Tue Oct 27 20:25:44 2009 # CONFIG_64BIT=y # CONFIG_X86_32 is not set --- 1,7 ---- # # Automatically generated make config: don't edit ! # Linux kernel version: 2.6.30.9-90.fc11.x86_64 ! # Sat Oct 17 11:22:55 2009 # CONFIG_64BIT=y # CONFIG_X86_32 is not set
*** 284,291 **** CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set ! # CONFIG_PREEMPT_VOLUNTARY is not set ! CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y --- 284,291 ---- CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set ! CONFIG_PREEMPT_VOLUNTARY=y ! # CONFIG_PREEMPT is not set CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
*** 3298,3304 **** CONFIG_USB_STORAGE_ALAUDA=m CONFIG_USB_STORAGE_ONETOUCH=m CONFIG_USB_STORAGE_KARMA=m ! CONFIG_USB_STORAGE_CYPRESS_ATACB=m # CONFIG_USB_LIBUSUAL is not set
# --- 3298,3304 ---- CONFIG_USB_STORAGE_ALAUDA=m CONFIG_USB_STORAGE_ONETOUCH=m CONFIG_USB_STORAGE_KARMA=m ! # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set # CONFIG_USB_LIBUSUAL is not set
#
*** 3969,3975 **** # CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set
- CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set
--- 3969,3974 ----
*** 3977,3983 **** # CONFIG_DEBUG_LOCK_ALLOC is not set # CONFIG_PROVE_LOCKING is not set # CONFIG_LOCK_STAT is not set
- CONFIG_TRACE_IRQFLAGS=y CONFIG_DEBUG_SPINLOCK_SLEEP=y # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set CONFIG_STACKTRACE=y
--- 3976,3981 ----
*** 4024,4031 **** # CONFIG_FUNCTION_TRACER=y # CONFIG_FUNCTION_GRAPH_TRACER is not set ! CONFIG_IRQSOFF_TRACER=y ! # CONFIG_PREEMPT_TRACER is not set CONFIG_SYSPROF_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_CONTEXT_SWITCH_TRACER=y --- 4022,4028 ---- # CONFIG_FUNCTION_TRACER=y # CONFIG_FUNCTION_GRAPH_TRACER is not set ! # CONFIG_IRQSOFF_TRACER is not set CONFIG_SYSPROF_TRACER=y CONFIG_SCHED_TRACER=y CONFIG_CONTEXT_SWITCH_TRACER=y
The config parameters for kernels installed by RPM packages are in /boot. Look for "config-(kernelversion)" files. For example, to see if my current kernel was compiled with PREEMPT:
[root@bigdog ~]# grep PREEMPT /boot/config-`uname -r` # CONFIG_PREEMPT_RCU is not set # CONFIG_PREEMPT_RCU_TRACE is not set CONFIG_PREEMPT_NOTIFIERS=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set
So, no, my kernel is not compiled with PREEMPT set. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer ricks@nerd.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - "How does that damned three seashell thing work?" - - - Sylvester Stallone, "Demolition Man" - ----------------------------------------------------------------------
On Thu, 2009-10-29 at 12:14 -0700, Rick Stevens wrote:
Jonathan Ryshpan wrote:
I had thought that they would come from the .config file from either the kernel-source.rpm or the kernel-devel.rpm for my current kernel. But these two files are different.CER=y
The config parameters for kernels installed by RPM packages are in /boot. Look for "config-(kernelversion)" files. For example, to see if my current kernel was compiled with PREEMPT:
[root@bigdog ~]# grep PREEMPT /boot/config-`uname -r` # CONFIG_PREEMPT_RCU is not set # CONFIG_PREEMPT_RCU_TRACE is not set CONFIG_PREEMPT_NOTIFIERS=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set
So, no, my kernel is not compiled with PREEMPT set.
Thanks.
In fact the controlling config file is the one in kernel-devel.rpm, which matches the one in /boot. In past releases, this has matched the one in kernel-source.rpm, but apparently not in this release.
$ sum /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config \
~/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config \ /boot/config-2.6.30.9-90.fc11.x86_64
22614 93 /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config 16416 94 /home/jonrysh/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config 22614 93 /boot/config-2.6.30.9-90.fc11.x86_64
Jonathan Ryshpan wrote:
On Thu, 2009-10-29 at 12:14 -0700, Rick Stevens wrote:
Jonathan Ryshpan wrote:
I had thought that they would come from the .config file from either the kernel-source.rpm or the kernel-devel.rpm for my current kernel. But these two files are different.CER=y
The config parameters for kernels installed by RPM packages are in /boot. Look for "config-(kernelversion)" files. For example, to see if my current kernel was compiled with PREEMPT:
[root@bigdog ~]# grep PREEMPT /boot/config-`uname -r` # CONFIG_PREEMPT_RCU is not set # CONFIG_PREEMPT_RCU_TRACE is not set CONFIG_PREEMPT_NOTIFIERS=y # CONFIG_PREEMPT_NONE is not set CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_PREEMPT is not set
So, no, my kernel is not compiled with PREEMPT set.
Thanks.
In fact the controlling config file is the one in kernel-devel.rpm, which matches the one in /boot. In past releases, this has matched the one in kernel-source.rpm, but apparently not in this release.
$ sum /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config \
~/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config \ /boot/config-2.6.30.9-90.fc11.x86_64
22614 93 /usr/src/kernels/2.6.30.9-90.fc11.x86_64/.config 16416 94 /home/jonrysh/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64/.config 22614 93 /boot/config-2.6.30.9-90.fc11.x86_64
The kernel binary RPM contains the /boot/config-(kernelversion) file that was used to create the kernel. The ".config" file from the install of the kernel-devel package is the same since the data in the kernel-devel RPM was built at the same time as the kernel in the binary RPM. Both of these are born out by your test results (first and third lines of the results).
The kernel source RPM ("kernel-whatever.src.rpm" package) does not contain a ".config" file. You must create one by copying one of the other "config-*" files in the RPM or via the "make menuconfig" or "make xconfig" operations and saving the resulting configuration. Again, your results show that as well since the block count of the one in the second line of your results is bigger and its checksum is different.
When building kernels from scratch, I usually install the source RPM, use "rpmbuild -bp --target=x86)64", then switch to the destination, "make xconfig", import the /boot config file and tweak things from there--unless I'm making a very different kernel than the distribution version. YMMV! ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer ricks@nerd.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - Brain: The organ with which we think that we think. - ----------------------------------------------------------------------
On Thu, 2009-10-29 at 15:17 -0700, Rick Stevens wrote:
The kernel source RPM ("kernel-whatever.src.rpm" package) does not contain a ".config" file. You must create one by copying one of the other "config-*" files in the RPM or via the "make menuconfig" or "make xconfig" operations and saving the resulting configuration.
It looks like: $ cd ~/rpmbuild $ rpmbuild -bp SPECS/kernel.spec generates a .configure file in the tree under BUILD -- There are both a .configure and a .configure.old there. Here is what I find: $ ll -At ~/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64 total 952 drwxr-xr-x. 83 jonrysh jonrysh 12288 Oct 27 20:25 Documentation/ drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 mm/ -rw-r--r--. 1 jonrysh jonrysh 95272 Oct 27 20:25 .config drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 block/ drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 configs/ drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 init/ drwxr-xr-x. 6 jonrysh jonrysh 4096 Oct 27 20:25 kernel/ drwxr-xr-x. 22 jonrysh jonrysh 4096 Oct 27 20:25 include/ -rw-r--r--. 1 jonrysh jonrysh 148470 Oct 27 20:25 MAINTAINERS drwxr-xr-x. 7 jonrysh jonrysh 4096 Oct 27 20:25 security/ drwxr-xr-x. 70 jonrysh jonrysh 4096 Oct 27 20:25 fs/ drwxr-xr-x. 6 jonrysh jonrysh 4096 Oct 27 20:25 lib/ -rw-r--r--. 1 jonrysh jonrysh 55238 Oct 27 20:25 Makefile -rw-r--r--. 1 jonrysh jonrysh 109487 Oct 27 20:25 .config.old -rw-r--r--. 1 jonrysh jonrysh 1782 Oct 27 20:25 config-arm -rw-r--r--. 1 jonrysh jonrysh 974 Oct 27 20:25 config-debug -rw-r--r--. 1 jonrysh jonrysh 86400 Oct 27 20:25 config-generic -rw-r--r--. 1 jonrysh jonrysh 122 Oct 27 20:25 config-i586 -rw-r--r--. 1 jonrysh jonrysh 95 Oct 27 20:25 config-i686-PAE ...
Jonathan Ryshpan wrote:
On Thu, 2009-10-29 at 15:17 -0700, Rick Stevens wrote:
The kernel source RPM ("kernel-whatever.src.rpm" package) does not contain a ".config" file. You must create one by copying one of the other "config-*" files in the RPM or via the "make menuconfig" or "make xconfig" operations and saving the resulting configuration.
It looks like: $ cd ~/rpmbuild $ rpmbuild -bp SPECS/kernel.spec generates a .configure file in the tree under BUILD -- There are both a .configure and a .configure.old there. Here is what I find: $ ll -At ~/rpmbuild/BUILD/kernel-2.6.30/linux-2.6.30.x86_64 total 952 drwxr-xr-x. 83 jonrysh jonrysh 12288 Oct 27 20:25 Documentation/ drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 mm/ -rw-r--r--. 1 jonrysh jonrysh 95272 Oct 27 20:25 .config drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 block/ drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 configs/ drwxr-xr-x. 2 jonrysh jonrysh 4096 Oct 27 20:25 init/ drwxr-xr-x. 6 jonrysh jonrysh 4096 Oct 27 20:25 kernel/ drwxr-xr-x. 22 jonrysh jonrysh 4096 Oct 27 20:25 include/ -rw-r--r--. 1 jonrysh jonrysh 148470 Oct 27 20:25 MAINTAINERS drwxr-xr-x. 7 jonrysh jonrysh 4096 Oct 27 20:25 security/ drwxr-xr-x. 70 jonrysh jonrysh 4096 Oct 27 20:25 fs/ drwxr-xr-x. 6 jonrysh jonrysh 4096 Oct 27 20:25 lib/ -rw-r--r--. 1 jonrysh jonrysh 55238 Oct 27 20:25 Makefile -rw-r--r--. 1 jonrysh jonrysh 109487 Oct 27 20:25 .config.old -rw-r--r--. 1 jonrysh jonrysh 1782 Oct 27 20:25 config-arm -rw-r--r--. 1 jonrysh jonrysh 974 Oct 27 20:25 config-debug -rw-r--r--. 1 jonrysh jonrysh 86400 Oct 27 20:25 config-generic -rw-r--r--. 1 jonrysh jonrysh 122 Oct 27 20:25 config-i586 -rw-r--r--. 1 jonrysh jonrysh 95 Oct 27 20:25 config-i686-PAE ...
That's entirely possible. What I was trying to say is that there is no ".configure" file in the RPM, proper. It's created by an rpmbuild, or one of the various "make" operations (make xconfig, make menuconfig, make oldconfig, etc.) done after the source RPM is installed. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer ricks@nerd.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - The world is coming to an end ... SAVE YOUR FILES!!! - ----------------------------------------------------------------------