Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jan 2000 20:05:57 -0800
From:      Alfred Perlstein <>
Cc:        smp@FreeBSD.ORG
Subject:   Re: kernel thread issue
Message-ID:  <>
In-Reply-To: <>; from on Sat, Jan 22, 2000 at 09:57:42PM -0500
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
* <> [000122 19:26] wrote:
> Hi!
> I have some questions which I would like some kernel hackers could answer me.
> First,
> Why kernel thread cannot be spawned out for SMP case?
> The comment written in kern_fork.c said that "cannot have same
> PTD on both cpus, the PTD needs to be  move out of PTmap and be
> per-process". Could anyone explain on this comment?

I'm not all that up to speed on 3.x, however what it seems to mean
is that the CPUs in 3.x don't share page table descriptors in such
a way that makes it possible to safely have two programs sharing
them on seperate processors.

4.0 Has fixed this (afaik thanks to Alan Cox), since 4.0 is slated
for an upcoming release I wouldn't concern myself with this too

> Second,
> As I know that most kernel design to support kernel thread, will
> have to explicitly define another 'thread' data structure and try
> to put scheduling related information and hardware PCB and others
> to the thread structure.

Yes, this is the way to do it without having ugly things like
kthreads polluting the process namespace.

> It seems that if the kernel is designed in this way to support
> the kernel thread, it makes things more explicitly defned.

Yes, Linux does this with 'struct task'.

> For instance, Solaris 2.x can even use the kernel thread to
> schedule interrupt handler in certain case. Hence it makes the
> kernel fully preemptible. The question is what will be the impact
> to the kernel if thread data structure is added in and used as the
> fundamental active scheduling objects?

That's not what makes the kernel fully preemptible, it helps, but
it's not the only key you need.

As far as seperating processes from tasks, the concepts have already
been thought out and discussed thouroughly on the arch- mailing

You can check it out at:
searching for 'KSE' will probably give you what you are looking

Btw, for someone with such insight into the code you ought to have
a properly configured mail client. :) please wrap lines at 70


To Unsubscribe: send mail to
with "unsubscribe freebsd-smp" in the body of the message

Want to link to this message? Use this URL: <>