Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2000 20:41:35 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        mjacob@feral.com
Cc:        freebsd-smp@freebsd.org
Subject:   Re: cvs commit: src/sys/sys mutex.h 
Message-ID:  <13423.972326495@critter>
In-Reply-To: Your message of "Mon, 23 Oct 2000 09:26:42 PDT." <Pine.LNX.4.21.0010230917550.9395-100000@zeppo.feral.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.LNX.4.21.0010230917550.9395-100000@zeppo.feral.com>, Matthew J
acob writes:
>[ taken to smp... ]
>
>> This was the warnings I talked about, hoping they would remind
>> the SMPng team about their brokenness...
>> 
>> On i386 those were exactly warnings, they did not break the build.
>
>Broke it on alpha :-). It might actually break on an SMP kernel build for i386
>too.

It didn't, I tested that.  I don't have an alpha I can test on here,
so my automatic scripts didn't cover that.

>Yeah- the deal here is that for each file that includes this, it whines. Ugly,
>but your point gets across.

:-)

>What I've done so far is to push this out to the <machine/globals.h> file-
>and to move CURTHD out there too because that's where it'll need to be anyway.
>I'm test compiling the changes now so I can put back a new mutex.h that gives
>you what you want but doesn't pork the alpha kernel compiles.
>
>The ultimate problem is partially that proc.h is included in the wrong place
>throughout most of the kernel- it's included *after* buf/bio, but any SMP
>aware Unix system is likely going to need something either from proc.h, or
>some glue layer (call to assembler, most likely) that will yield the current
>thread ID, and places like buffer structures, etc., always have locks defined.

Well, my take on this is that the main problem is that curproc is two
entirely different things for SMP vs UP.  That clearly makes all KLD's
toast unless compiled for the right thing.  That needs fixed.

In general "#ifdef SMP" should be minimized and in particular no
KLD's should need to know about it.

I think a function to get the current thread/proc should not require
<sys/proc.h> to be included, most places just need to pass a reference,
they don't need to even know how the entrails of a proccess is 
arranged, so obviously they should not need <sys/proc.h> #included.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?13423.972326495>