cvs commit: src/sys/kern kern_sig.c

Scott Long scottl at samsco.org
Thu Mar 3 14:08:39 GMT 2005


David Xu wrote:
> John Baldwin wrote:
> 
>>
>> Note that swapping out the stack is the default behavior in 4.x, so
>> I actually think that the million lines of kernel code are indeed
>> safe, only sigwait() is broken and should be fixed. :)
>>
> Many 4.x programming skill can not be applied to FreeBSD current,
> they are so different, most of code in kern/ seems be completely
> rewritten. :=)
> 
> David Xu
> 

I think you're making a much bigger deal out of this than it needs to
be.  Swapping the kernel stacks is important on real production systems.
FreeBSD has always been much better at handling low-memory situations
that most other OSes, and it's one of the things that has kept it
relevant in the server area.  A few 16K chunks might not seem like a lot
on a desktop system, but when you're talking about a server with
hundreds of ithreads and hundreds of user processes, it matters a quite
a bit.  Also, there is talk about increasing the default kstack size due
to all of the extra inlining that the compiler does with the -O2 option
and the large recursion problems in the softdep code.  If we do this,
then being able to swap them out gets even more important.

It's not about convenience or taking the easy way out.  Let's fix
sigwait() to have the proper assumptions and go from there.  I'm
inclined to agree with John that the problem is not widespread or
impossible to track down.  Fixing it is not hard either, we already have
the PHOLD()/PRELE() functions for doing exactly what is needed here.

Scott


More information about the cvs-src mailing list