Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Difference between SMP and Non-Smp kernels???


    Hi all,

    Can anybody point out the differences??? ..Is there any change in the source code of smp and Non-smp kernels??.......or its just the configuration files??? ....

    Thank You
    Greenday

  2. #2
    I guess the source code is the same,since we could build both smp and non smp kernels from the same source code


    regards

  3. #3
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    Quote Originally Posted by nature
    I guess the source code is the same,since we could build both smp and non smp kernels from the same source code
    That's not completely true. The source code is the same yes, but the compiled binary is not the same. The reason is the conditional compilation of certain parts in the kernel source tree depending on the definition of the CONFIG_SMP constant.

    For example, spin locks has no use in a non-SMP system, but they are lighter if compared with semaphores, so they are really used on SMP systems.

    Regards

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,148
    Out of interest since 2.6.17 all kernels are SMP,they autodetect CPUs at boot and enable them.

  6. #5
    Thamks everyone...

    However, i ahve the following problem..

    I have 2 images 2.4.20-6 and 2.4.20-6 smp....however i want to build a new image with a different configuration for SMP system......

    so, i did the following.....

    1.Installed the source code from the CD (It's by the name kernel-source 2.4.20-6) at /usr/src/linux.

    2. Then i did a "make xconfig".

    3. Then i did a "make dep".

    4. Then i did a "make bzImage"

    It prints out bunch of error messages........however if i use the config file from /boot directory with which the current smp image is built it goes fine.........It gives me errors if i create a new config file through make xconfig...why is that so????...

    but even if i make a new bzImage by using the existing config file for smp image in /boot directory......I succeed in creating a new bzImage....but "make modules" is exiting with errors.......
    I donno y this is happenning.....never had any problems like this.........so i thought may be the source code is different for a smp kernel.......

    any ideas regarding this problem.......??

  7. #6
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,148
    Don't you need to build a kernel before you create the initial ramdisk for it? I could be wrong here, but I would have thought you needed to.

  8. #7
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    Quote Originally Posted by Greenday
    1.Installed the source code from the CD (It's by the name kernel-source 2.4.20-6) at /usr/src/linux.

    2. Then i did a "make xconfig".

    3. Then i did a "make dep".

    4. Then i did a "make bzImage"

    It prints out bunch of error messages........however if i use the config file from /boot directory with which the current smp image is built it goes fine.........It gives me errors if i create a new config file through make xconfig...why is that so????...
    Just after
    Code:
    make dep
    You should run
    Code:
    make clean
    and then
    Code:
    make bzImage
    For more info :
    http://www.digitalhermit.com/linux/K....html#BUILDING
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •