Re: newbie question: tcp/ip in kernel

From: Richard B. Johnson (
Date: Tue Aug 29 2000 - 07:54:16 EST

On Mon, 28 Aug 2000, Reto Baettig wrote:

> "Richard B. Johnson" wrote:
> >
> > Unix and Unix variants such as Linux have kernels that perform functions
> > in behalf of tasks (processes) . The kernel, alone, does not have a
> > process context so it can't do something for "itself".
> I am sorry. I did not make myself clear enough:
> It's a kernel-thread which is doing TCP/IP, not the "kernel itself". The
> thread should be associated with the init process.
> >


Okay. So you do know how it works. Some newbies look at the kernel code
and say; "Ahh this is written in 'C'. I know how to do this.....". The
next thing you know is that are trying to put databases in the kernel.

> ...see previous explanation. Is that ok?


> >
> > > What is the proper way to make that thing SMP-Safe in 2.4?
> >

Don't use the big kernel lock. Put spin-locks around anything that
could possibly change, destroying the logic of your code. Do not do any
I/O to any user-context while holding a lock (needs to page-fault).

Dick Johnson

Penguin : Linux version 2.2.15 on an i686 machine (797.90 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:23 EST