2001-07-21 16:09:18

by peter k.

[permalink] [raw]
Subject: 2.4.7: wtf is "ksoftirqd_CPU0"

i just installed 2.4.7, now a new process called "ksoftirqd_CPU0" is started
automatically when booting (by the kernel obviously)? why? what does it do?
i didnt find any useful information on it in linuxdoc / linux-kernel
archives



2001-07-21 16:16:38

by peter k.

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"

i knew that i forgot to say something: i was using 2.4.6 before and i never
saw that process with 2.4.6 or any other 2.4.x version


> i just installed 2.4.7, now a new process called "ksoftirqd_CPU0" is
started
> automatically when booting (by the kernel obviously)? why? what does it
do?
> i didnt find any useful information on it in linuxdoc / linux-kernel
> archives


2001-07-21 16:30:18

by peter k.

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"


> > i just installed 2.4.7, now a new process called "ksoftirqd_CPU0"
> > is started
> > automatically when booting (by the kernel obviously)? why? what
> > does it do?
> > i didnt find any useful information on it in linuxdoc / linux-kernel
> > archives
>
> It's the kernel soft IRQ daemon. It provides a context from which to
> execute 'slow' code that was triggered by an interrupt. There will be one
> per CPU.
>
> DS

why wasnt it run in previous kernels? im just wondering why it suddenly
appeared without anyone saying a word about it ;)

2001-07-21 16:36:18

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"

Em Sat, Jul 21, 2001 at 06:29:37PM +0200, peter k. escreveu:
>
> > > i just installed 2.4.7, now a new process called "ksoftirqd_CPU0"
> > > is started
> > > automatically when booting (by the kernel obviously)? why? what
> > > does it do?
> > > i didnt find any useful information on it in linuxdoc / linux-kernel
> > > archives
> > It's the kernel soft IRQ daemon. It provides a context from which to
> > execute 'slow' code that was triggered by an interrupt. There will be one
> > per CPU.
>
> why wasnt it run in previous kernels? im just wondering why it suddenly

because previous kernels had problems that Andrea's approach fixes? Read
the archives for the thread about it.

- Arnaldo

2001-07-21 16:37:48

by Jeff Garzik

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"

"peter k." wrote:
>
> i just installed 2.4.7, now a new process called "ksoftirqd_CPU0" is started
> automatically when booting (by the kernel obviously)? why? what does it do?
> i didnt find any useful information on it in linuxdoc / linux-kernel
> archives

it is used internally, ignore it.

--
Jeff Garzik | "I wouldn't be so judgemental
Building 1024 | if you weren't such a sick freak."
MandrakeSoft | -- goats.com

2001-07-21 17:15:44

by Dave Jones

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"

On Sat, 21 Jul 2001, peter k. wrote:

> why wasnt it run in previous kernels?

Because it was only added to mainline in 2.4.7

> im just wondering why it suddenly
> appeared without anyone saying a word about it ;)

>From the changelog...

-pre8:
- Paul Mackerras: PPC updates (softirq)

-pre5:
- Andrea Arkangeli: softirq cleanups and fixes, and everybody is happy
again (ie I changed some details to make me happy ;)

There were also several discussions about Andreas ksoftirq patches
a few weeks back.

regards,

Dave.

--
| Dave Jones. http://www.suse.de/~davej
| SuSE Labs

2001-07-21 23:32:57

by Daniel Phillips

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"

On Saturday 21 July 2001 18:38, Jeff Garzik wrote:
> "peter k." wrote:
> > i just installed 2.4.7, now a new process called "ksoftirqd_CPU0"
> > is started automatically when booting (by the kernel obviously)?
> > why? what does it do? i didnt find any useful information on it in
> > linuxdoc / linux-kernel archives
>
> it is used internally, ignore it.

It's pretty hard to ignore a process with a name that ugly ;-)

How about just ksoft0 ? Or kirq0?

I don't see the sense of trying to encode a whole sentence into the
process name.

(Peter, this handles softirqs in a more predictable way by allowing the
scheduler to take care of any softirq that can't conveniently be
executed immediately. Among other benefits, this approach eliminated
the need to check for and execute pending softirqs on exit from system
calls.)

--
Daniel

2001-07-21 23:54:59

by Tom Rini

[permalink] [raw]
Subject: [OT] Re: 2.4.7: wtf is "ksoftirqd_CPU0"

On Sun, Jul 22, 2001 at 01:37:02AM +0200, Daniel Phillips wrote:
> On Saturday 21 July 2001 18:38, Jeff Garzik wrote:
> > "peter k." wrote:
> > > i just installed 2.4.7, now a new process called "ksoftirqd_CPU0"
> > > is started automatically when booting (by the kernel obviously)?
> > > why? what does it do? i didnt find any useful information on it in
> > > linuxdoc / linux-kernel archives
> >
> > it is used internally, ignore it.
>
> It's pretty hard to ignore a process with a name that ugly ;-)
>
> How about just ksoft0 ? Or kirq0?

Now this is just getting silly. It follows the same convention the
6-8 other k* daemons follow. Would you want kswpd? kupd? kreclmd? Probably
not.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

2001-07-22 02:40:39

by Horst von Brand

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"

Jeff Garzik <[email protected]> said:
> "peter k." wrote:

> > i just installed 2.4.7, now a new process called "ksoftirqd_CPU0" is
> > started automatically when booting (by the kernel obviously)? why? what
> > does it do? i didnt find any useful information on it in linuxdoc /
> > linux-kernel archives

> it is used internally, ignore it.

I'd advise not to do so in general: It is a rather tempting name for
crackers to hide illegal activities.
--
Horst von Brand [email protected]
Casilla 9G, Vin~a del Mar, Chile +56 32 672616

2001-07-22 10:02:17

by P.A.M. van Dam

[permalink] [raw]
Subject: Re: 2.4.7: wtf is "ksoftirqd_CPU0"

On Sat, Jul 21, 2001 at 08:23:36PM -0400, Horst von Brand wrote:
> Jeff Garzik <[email protected]> said:
> > "peter k." wrote:
>
> > > i just installed 2.4.7, now a new process called "ksoftirqd_CPU0" is
> > > started automatically when booting (by the kernel obviously)? why? what
> > > does it do? i didnt find any useful information on it in linuxdoc /
> > > linux-kernel archives
>
> > it is used internally, ignore it.
>
> I'd advise not to do so in general: It is a rather tempting name for
> crackers to hide illegal activities.

Kernel daemons/threads still use "reserved pids" (< 100 I believe) so it's
pretty to distinguish them. Ofcourse on 128-way SMP machine, things would
be rather difficult.

Best regards,

Pascal


> --
> Horst von Brand [email protected]
> Casilla 9G, Vin~a del Mar, Chile +56 32 672616
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2001-07-22 10:24:31

by Mike Black

[permalink] [raw]
Subject: Re: [OT] Re: 2.4.7: wtf is "ksoftirqd_CPU0"

Actually -- is it possible (or desirable) to make ALL kernel daemons begin
with say "_" or some other special character to distinguish them from
userland threads? The "k......d" paradigm is OK but not very distinctive.
That way you have a simple line in the kernel docs that says "Any process
with a leading _ is a kernel process and should NEVER be killed or otherwise
messed with except as noted elsewhere in the docs".

Also would make it easy for things like ps, top and other process-aware
things to have a really simple "show kernel processes only" option.


----- Original Message -----
From: "Tom Rini" <[email protected]>
To: "Daniel Phillips" <[email protected]>
Cc: "peter k." <[email protected]>;
<[email protected]>
Sent: Saturday, July 21, 2001 7:53 PM
Subject: [OT] Re: 2.4.7: wtf is "ksoftirqd_CPU0"


> On Sun, Jul 22, 2001 at 01:37:02AM +0200, Daniel Phillips wrote:
> > On Saturday 21 July 2001 18:38, Jeff Garzik wrote:
> > > "peter k." wrote:
> > > > i just installed 2.4.7, now a new process called "ksoftirqd_CPU0"
> > > > is started automatically when booting (by the kernel obviously)?
> > > > why? what does it do? i didnt find any useful information on it in
> > > > linuxdoc / linux-kernel archives
> > >
> > > it is used internally, ignore it.
> >
> > It's pretty hard to ignore a process with a name that ugly ;-)
> >
> > How about just ksoft0 ? Or kirq0?
>
> Now this is just getting silly. It follows the same convention the
> 6-8 other k* daemons follow. Would you want kswpd? kupd? kreclmd?
Probably
> not.
>
> --
> Tom Rini (TR1265)
> http://gate.crashing.org/~trini/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2001-07-22 15:14:08

by Andreas Schwab

[permalink] [raw]
Subject: Re: [OT] Re: 2.4.7: wtf is "ksoftirqd_CPU0"

"Mike Black" <[email protected]> writes:

|> Actually -- is it possible (or desirable) to make ALL kernel daemons begin
|> with say "_" or some other special character to distinguish them from
|> userland threads? The "k......d" paradigm is OK but not very distinctive.
|> That way you have a simple line in the kernel docs that says "Any process
|> with a leading _ is a kernel process and should NEVER be killed or otherwise
|> messed with except as noted elsewhere in the docs".
|>
|> Also would make it easy for things like ps, top and other process-aware
|> things to have a really simple "show kernel processes only" option.

Kernel threads can easily be identified by having a zero virtual size.

Andreas.

--
Andreas Schwab "And now for something
SuSE Labs completely different."
[email protected]
SuSE GmbH, Schanz?ckerstr. 10, D-90443 N?rnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5

2001-07-22 16:42:58

by Horst von Brand

[permalink] [raw]
Subject: Re: [OT] Re: 2.4.7: wtf is "ksoftirqd_CPU0"

"Mike Black" <[email protected]> said:
> Actually -- is it possible (or desirable) to make ALL kernel daemons begin
> with say "_" or some other special character to distinguish them from
> userland threads? The "k......d" paradigm is OK but not very distinctive.
> That way you have a simple line in the kernel docs that says "Any process
> with a leading _ is a kernel process and should NEVER be killed or otherwise
> messed with except as noted elsewhere in the docs".

It is rather easy to fake any process name.
--
Horst von Brand [email protected]
Casilla 9G, Vin~a del Mar, Chile +56 32 672616

2001-07-23 14:10:22

by Daniel Phillips

[permalink] [raw]
Subject: Re: [OT] Re: 2.4.7: wtf is "ksoftirqd_CPU0"

On Sunday 22 July 2001 01:53, Tom Rini wrote:
> On Sun, Jul 22, 2001 at 01:37:02AM +0200, Daniel Phillips wrote:
> > On Saturday 21 July 2001 18:38, Jeff Garzik wrote:
> > > "peter k." wrote:
> > > > i just installed 2.4.7, now a new process called
> > > > "ksoftirqd_CPU0" is started automatically when booting (by the
> > > > kernel obviously)? why? what does it do? i didnt find any
> > > > useful information on it in linuxdoc / linux-kernel archives
> > >
> > > it is used internally, ignore it.
> >
> > It's pretty hard to ignore a process with a name that ugly ;-)
> >
> > How about just ksoft0 ? Or kirq0?
>
> Now this is just getting silly. It follows the same convention the
> 6-8 other k* daemons follow. Would you want kswpd? kupd? kreclmd?
> Probably not.

Err, wasn't I arguing *against* trying to encode whole sentences in the
daemon names? Personally, I have a similar distaste for naming
strategies that involve leaving out the vowels.

And no, I don't really like kirq or ksoft very much either.

I'd like to see the following in my ps -A list:

kupdate
kflush
kinterrupt

Something like that. We don't need d's at the ends because we have k's
at the beginnings, don't you think? I can see the logic for appending
numbers to per-processor daemons, but as for doing it even on UP
kernels, it's not so obviously a good idea.

As far as 'naming conventions' for daemons go, they went out the window
when kflushd became bdflush.

--
Daniel