LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-08-2003, 05:13 PM   #1
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
ksoftirqd???


what is ksoftirqd_CPU0? it's just started showing up in top and i can't find any practical information on it. it seems to be some sort of daemon related to wireless networking that eats CPU cycles ? or what? i don't have wireless. ? how can i turn it off?
 
Old 08-08-2003, 05:42 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
From the Kernel Analysis Howto:
Code:
5.3 Softirq

When an IRQ comes, task switching is deferred until later to get better performance. Some Task jobs (that could have to be done just after the IRQ and that could take much CPU in interrupt time, like building up a TCP/IP packet) are queued and will be done at scheduling time (once a time-slice will end).

In recent kernels (2.4.x) the softirq mechanisms are given to a kernel_thread: ''ksoftirqd_CPUn''. n stands for the number of CPU executing kernel_thread (in a monoprocessor system ''ksoftirqd_CPU0'' uses PID 3).
Cheers,
Tink
 
Old 08-08-2003, 05:54 PM   #3
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Original Poster
Rep: Reputation: 48
so in other words, it is something in the kernel that manages requests to the CPU, and i should leave it on?
 
Old 08-08-2003, 05:58 PM   #4
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
That means some device in your system is sending the processor a slew of IRQs so that the softirqd for your processor is being consistenly woken up, which ends up using most of your CPU cycles. What needs to be done is to identify the 'culprit' and stop the interrupts. What does your syslog say?
 
Old 08-08-2003, 06:40 PM   #5
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Original Poster
Rep: Reputation: 48
oh man, it says a ton of stuff going back weeks. starting from the bottom, there are a lot of these:


Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:25:26 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:30:44 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:33:15 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:45 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:35:52 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:38:30 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-slot-1
Aug 8 17:39:33 localhost modprobe: modprobe: Can't locate module sound-service-1-0
Aug 8 17:39:46 localhost modprobe: modprobe: Can't locate module sound-slot-1


maybe having something to do with onboard sound chip, even though i have that disabled in the BIOS and am using a PCI sound card?

then there's a ton more stuff, a lot looking similar to what i get during booting (e.g., some md/ RAID/ "personality" stuff that i hate seeing every time and can't figure out how to turn off). and this looks maybe related to IRQ issues:


Aug 8 17:22:27 localhost kernel: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 000000001fff0000 - 000000001fff3000 (ACPI NVS)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 000000001fff3000 - 0000000020000000 (ACPI data)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
Aug 8 17:22:27 localhost kernel: BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)


then it basically repeats a few times, i guess reflecting the times i rebooted after making changes. i tried to keep it short, but should i just post one whole "cycle" of messages?

any help appreciated, i am in over my head with this stuff!

-----------------------------
>edit: here's some top:


top - 19:45:01 up 2:22, 1 user, load average: 0.11, 0.10, 0.03
Tasks: 60 total, 2 running, 58 sleeping, 0 stopped, 0 zombie
Cpu(s): 19.0% user, 0.7% system, 0.0% nice, 80.3% idle
Mem: 515612k total, 412988k used, 102624k free, 52424k buffers
Swap: 1172736k total, 0k used, 1172736k free, 214520k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
637 root 17 0 108m 43m 8876 R 16.7 8.7 4:52.08 X
713 sero 9 0 46984 45m 18m S 1.7 9.1 2:12.77 mozilla-bin
1244 sero 10 0 13540 13m 7408 S 0.7 2.6 0:00.80 gnome-terminal
664 sero 9 0 7372 7372 5996 S 0.3 1.4 0:03.19 metacity
670 sero 9 0 6360 6360 4668 S 0.3 1.2 0:00.98 gkrellm
1 root 8 0 228 228 196 S 0.0 0.0 0:04.72 init
2 root 9 0 0 0 0 S 0.0 0.0 0:00.06 keventd
3 root 18 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd_CPU0


it's not often using any CPU, but what is that 18 and 19 in the PR/NI columns? that doesn't look very good.

Last edited by synaptical; 08-08-2003 at 06:45 PM.
 
Old 08-10-2003, 01:38 PM   #6
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Add this to your /etc/modules.conf
Code:
alias sound-slot-1 off
alias sound-service-1-0 off
Although I don't think the problem you're having is due to the sound-slot issue, that should stop the related messages.

Your top output looks good. softirqd is 'S' -> sleeping. When you notice your CPU going through the roof, take a ps/top snapshot and your dmesg output and post it to the group.

18/19 is the priority/niceness of your softirqd. I have the same values for the said process. In linux, a process's 'niceness' is indicated by a value between -20 and +19, -20 being the 'rude' end ( only the superuser can set a negative nice value) and 19 the heights of niceness itself. The nicer the process is, the more it 'yeilds' to other process or it becomes less 'competitive' to grab CPU cycles. Read up on nice and renice on how you can use those commands to ru a program with a modified scheduling priority. Priority of a certain process, is a dynamic entity that the scheduler keeps changing indicative of the actual scheduling priority of the process with respect to the other jobs.
 
Old 08-10-2003, 01:59 PM   #7
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Original Poster
Rep: Reputation: 48
Quote:
Originally posted by nxny
In linux, a process's 'niceness' is indicated by a value between -20 and +19, -20 being the 'rude' end ( only the superuser can set a negative nice value) and 19 the heights of niceness itself.
<snip>
thanks a ton for that explanation! i have been meaning to find out what nice meant for a while now (seems there is always something else coming up to research ). now hopefully i can figure out how to disable that RAID probing and messages during boot up, and that damn mdrecoveryd (which i believe is somehow related to RAID?) and which is always at -19 and -20 niceness! (i'm kind of obsessive compulsive about achieving total "sleekness," ie., having only those processes, daemons, services etc, running and booting that are absolutely necessary lots to learn! ) i'll see what the changes to modules.conf do, also. appreciate.
 
Old 08-10-2003, 02:32 PM   #8
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Total sleekness, I hear you.

Forgot about the RAID messages. The kernel will probe for raid devices at startup as part of hardware probe, but if you see stuff about personality, it is likely that one of your mounted volumes reside on a RAID partition. Can you post the relevant part from syslog?

Please post your
/etc/fstab
/proc/mounts

/etc/raidtab
/proc/devices
/proc/mdstat


That should tell us what's going on.

As you know, RAID is a set of disks made to look like a single large disk and/or provide redundancy by simple mirroring or storing parity information to protect against disk failures.

If the md devices (RAID or LVM) are not shutdown properly, the data on those disks will need to be rearranged so that it complies to the original set of rules it was designed for. If a discrepancy is found at bootup, the needful is done by the kernel process 'mdrecoveryd'. The superuser can control the RAID rebuild process. Anyway, you do shutdown your system properly don't you?
 
Old 08-10-2003, 02:58 PM   #9
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Original Poster
Rep: Reputation: 48
i am getting messages about personality (listed below). the strange thing is, i don't even have RAID on this mobo, an Epox 8RDA+. and afaik i've always shut down properly using shutdown -h now. usually i don't even shut down, actually, but just logout with the gnome logout manager, and then either "reboot," "shutdown -r now," log back in, etc.

here are the logs, thanks again for the help.


dmesg:

md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
8regs : 3162.000 MB/sec
32regs : 1818.000 MB/sec
pIII_sse : 6063.200 MB/sec
pII_mmx : 5163.200 MB/sec
p5_mmx : 6588.800 MB/sec
raid5: using function: pIII_sse (6063.200 MB/sec)
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/etc/fstab:

/dev/hdb1 / reiserfs defaults 1 1
/dev/hdb2 /home reiserfs defaults 1 2
/dev/hda6 /mnt/windows vfat auto,user,umask=002 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,users,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/proc/mounts:

rootfs / rootfs rw 0 0
/dev/root / reiserfs rw 0 0
/dev/hdb2 /home reiserfs rw 0 0
/dev/hda6 /mnt/windows vfat rw,nosuid,nodev,noexec 0 0
devpts /dev/pts devpts rw 0 0
proc /proc proc rw 0 0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cat: /etc/raidtab: No such file or directory

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/proc/devices:

Character devices:
1 mem
2 pty
3 ttyp
4 ttyS
5 cua
7 vcs
10 misc
14 sound
29 fb
109 lvm
128 ptm
129 ptm
136 pts
137 pts
162 raw
171 ieee1394

Block devices:
1 ramdisk
2 fd
3 ide0
7 loop
9 md
22 ide1
58 lvm

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/proc/mdstat:

Personalities : [linear] [raid0] [raid1] [raid5]
read_ahead not set
unused devices: <none>
 
Old 08-12-2003, 02:50 PM   #10
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
We're talking software RAID here ( the linux kernel controls your RAID volumes and can be administered via userspace applications such as the set of raidtools and mdadm ). For example, anyone with just 2 partitions can run a minimal RAID mirror for 'limited' protection (against bad sectors etc., but not a device failure). A RAID controller is not necessary for software RAID.

You are not using software RAID. The kernel's md driver ( if built in) will probe your disks to see if have any md drivers unless you compile your own kernel without the said drivers.

find /lib/modules/$(uname -r)/kernel/drivers/md/

If the command above comes back with results such as raid1.o, raid5.o etc, you have them built as modules.

In which case you should create another initrd and boot from it ( see man mkinitrd option --omit-raid-modules )

HTH
 
Old 08-13-2003, 12:20 PM   #11
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Original Poster
Rep: Reputation: 48
thanks. the find command didn't come back with any raid modules, but i'm going to try to compile a new kernel anyway. think i will go with 2.4.21. i've only been using linux for a few weeks so it seems a bit daunting, but i've been really curious about this whole "compile your kernel" thing, and i want to try to do it. hope i don't mess anything up!
 
Old 08-13-2003, 01:04 PM   #12
quest4knowledge
Member
 
Registered: Aug 2003
Distribution: gentoo
Posts: 62

Rep: Reputation: 15
Cudos to you. I think you are going about this the right way. The best way to learn linux is to just jump in and try everything you can.

Dont worry about messing things up, because you WILL mess things up. Its normal. Luckily everything can be fixed and it is difficult to permanently damage your hardware.

So have fun, mess things up and learn from your mistakes.
 
Old 11-15-2003, 12:17 AM   #13
doris
Member
 
Registered: May 2001
Location: New York, USA
Distribution: RH 7.3, 8.0
Posts: 64

Rep: Reputation: 15
Questions about softirq

Hi Tinkster, synaptical and nxny,

My situation is quite similar. Here's my top looks like:

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
21 root 15 0 0 0 0 DW 12.3 0.0 5:34 2 kjournald
15713 root 15 0 1132 1132 868 R 0.4 0.0 0:00 1 top
1 root 15 0 476 476 420 S 0.0 0.0 0:05 3 init
2 root RT 0 0 0 0 SW 0.0 0.0 0:00 0 migration/0
3 root RT 0 0 0 0 SW 0.0 0.0 0:00 1 migration/1
4 root RT 0 0 0 0 SW 0.0 0.0 0:00 2 migration/2
5 root RT 0 0 0 0 SW 0.0 0.0 0:00 3 migration/3
6 root 15 0 0 0 0 SW 0.0 0.0 0:00 0 keventd
7 root 34 19 0 0 0 SWN 0.0 0.0 0:00 0 ksoftirqd_CPU0
8 root 34 19 0 0 0 SWN 0.0 0.0 0:00 1 ksoftirqd_CPU1
9 root 34 19 0 0 0 SWN 0.0 0.0 0:00 2 ksoftirqd_CPU2
10 root 34 19 0 0 0 SWN 0.0 0.0 0:00 3 ksoftirqd_CPU3

In my syslog, there are many lines about the sound module.
"...modprobe: Can't locate module sound-slot-0
...modprobe: modprobe: Can't locate module sound-service-0-3
"

So I added these 2 lines to /etc/module.conf.
alias sound-slot-0 off
alias sound-service-0-3 off

But I still have three questions:
1). What should I do after modifying module.conf? Is there any daemon I need to restart?
2). Is it possible to get rid of ksoftirqd and display CPU in its normal way?
3). What's ksoftirq good for? (Otherwise I really dislike it.) Is ksoftirq for the kernel-level threading?
4). In my case, why 4 CPU showed up while there are only 2 CPU? Is there a simple command to find out the number of CPUs physically there? /proc/cpuinfo is also wrong because I know there are only 2 CPU.

Any help is greatly appreciated. Thanks for your time and help.

doris
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ksoftirqd cpu usage & load 100% mismacku Linux - General 1 02-25-2009 04:29 AM
Ksoftirqd SMP system skyraven Linux - General 6 01-02-2008 11:17 AM
ksoftirqd eating >60% of my CPU subaruwrx Fedora 0 09-22-2004 01:10 AM
Network triggers ksoftirqd/0 weird behaviour bruno buys Linux - Networking 1 09-20-2004 05:24 PM
ksoftirqd shellcode Slackware 1 10-06-2003 08:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:57 PM.

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