Johnny Billquist | 1 Jun 2010 23:09
Picon

Where is the pcb for swapper set up?

I'm reading through code so that my eyes are bleeding.
Right now I suspect that swapper (lwp0) is the thread that might be 
running at iplsched, but I cannot find where the pcb for lwp0 is being 
set up.
It is pointed at by pcb0, but I can't find where it is created.
Anyone who can help?

Neither have I figured out what code that lwp is running. I'm probably 
tired, but I figured someone might be able to give me some hints instead 
of me trying to just bully my way through the code right now...

	Johnny

Matt Thomas | 2 Jun 2010 00:21

Re: Where is the pcb for swapper set up?


On Jun 1, 2010, at 2:09 PM, Johnny Billquist wrote:

> I'm reading through code so that my eyes are bleeding.
> Right now I suspect that swapper (lwp0) is the thread that might be running at iplsched, but I cannot find
where the pcb for lwp0 is being set up.
> It is pointed at by pcb0, but I can't find where it is created.
> Anyone who can help?

It isn't nor needs to be.  The first context switch will do a svpctx and that will
initialize it.

pcencuotas | 12 Jun 2010 14:50
Picon

Computadora Completa en cuotas

ENVIOS AL INTERIOR POR CORREO ARGENTINO EN 24HS - TODAS LAS TARJETAS DE 
CREDITO
CREDITOS PERSONALES CUOTAS FIJAS Y EN PESOS - FACTURA A O B
CONSULTE POR IMPORTANTES DESCUENTOS EN EFECTIVO
Local en la zona de Flores, a pocas cuadras de Av. Nazca y Av. Avellaneda
EMail: pcencuotas <at> gmail.com 
CEL: 15-5147-0940

-Modelo: ATHLON FIRE
-Procesador: AMD ATHLON II X2 DUAL CORE 245 2,9GHz BOX
-Motherboard: MSI K96PGMV-2 chipset nVidia nForce 430
-Memoria: 1GB DDR2 800 Kingston
-Placa de video: nVIDIA GeForce 6150GS 256MB
-Disco rígido: 160 GB SATA2
-Medio optico: ReGrabadora  de DVD LG 20X
-Placa de red: 10/100 on board
-Placa de sonido: 8 canales
-Puertos: 2USB frontales + 4USB traseros
-Gabinete: KIT CIRKUIT PLANET 1272
-Teclado multimedia, Mouse optico, Parlantes y Diskettera 3 ½.
-Garantia 12 meses
-Sistema operativo instalado y funcionando FULL, todos los programa y 
utilidades
-PRECIO EFECTIVO $1259

PAGANDO CON TARJETA CABAL 12 CUOTAS SIN INTERES
TODAS LAS TARJETAS MASTERCARD 3, 6 y 9 CUOTAS SIN INTERES
TARJETA VISA BANCO HIPOTECARIO 12 CUOTAS SIN INTERES

-Modelo: ATHLON POWER
(Continue reading)

Johnny Billquist | 14 Jun 2010 08:01
Picon

My long fight with missed interrupts...

Finally! I've found the problem with my lost interrupts.
It turns out to be a vax-specific problem, and one related to spin mutexes.
More specific, the mutex_spin_enter function is not truly reentrant.
What can happen (and is happening sometimes) is that mutex_spin_enter is 
called for a mutex. Between the check wether any other spin mutexes are 
being held and the decrement of the counter, an interrupt from the clock 
happens, which raises the IPL even higher than the spin mutex requires.
This interrupt also calls mutex_spin_enter, and at this point, it don't 
look like any other mutex is being held, so the IPL of the clock 
interrupt is saved as the old ipl level. The clock interrupt runs 
through, restores the IPL to what it was before, and the interrupted 
routine continues, at the right IPL level. However, at mute_spin_exit, 
the routine will now restore the IPL that was before mutex_spin_enter, 
but the value saved is the one from when the interrupt occured, meaning 
that in the end, we will actually raise the IPL at mutex_spin_exit, and 
will not recover properly from this situation for quite a while.
I don't know under which circumstances it eventually gets recovered, but 
it do happen at some point. But the system is somewhat catatonic for 
quite a while.

Here is a fix for this bug. It should be incorporated into the source 
tree asap, I'd say. If anyone want to improve on it, feel free. I've 
tested it for a while on a 8650 now, and it works fine there.

The fix is maybe crude. I raise the IPL to IPL_HIGH for maybe longer 
than needed while acquiring a spin mutex, and raise it again at 
releasing the mutex. Feel free to improve the code if anyone feel like it...

	Johnny
(Continue reading)

der Mouse | 14 Jun 2010 08:09

Re: My long fight with missed interrupts...

> Finally!  I've found the problem with my lost interrupts.
> It turns out to be [...]

Congratulations.  Problems like that are always, um, "interesting" to
find, and I can only imagine how much hair you pulled out while looking
for it.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Johnny Billquist | 14 Jun 2010 08:24
Picon

Re: My long fight with missed interrupts...

der Mouse wrote:
>> Finally!  I've found the problem with my lost interrupts.
>> It turns out to be [...]
> 
> Congratulations.  Problems like that are always, um, "interesting" to
> find, and I can only imagine how much hair you pulled out while looking
> for it.

Thanks.
Yeah. When an error occur a while (like 20 ms) after an event which 
requires an interrupt to fire under very specific circumstances are not 
the most enjoyable to try to find.
Nu wonder I had such a hard time figuring out where, and under which 
conditions it happened...

But atleast I understand exactly what happens now, and why this could 
appear in so many seemingly different places without any obvious 
explanation why. I've been looking for the normal "s = splxxx(); ...; 
splx(s);" stuff, as well as interrupt routines, system calls, process 
creations, softints, and I don't know what more.

Well, the good thing is I know a lot more about the internals now. I'll 
probably forget half of it again within a few weeks... But anyway. Now 
the machine is running properly, which is nice (and I can have ntpd 
running again).

	Johnny

Dave McGuire | 15 Jun 2010 06:00

Re: My long fight with missed interrupts...

On 6/14/10 2:01 AM, Johnny Billquist wrote:
> Finally! I've found the problem with my lost interrupts.

   Wow, what an obscure pain-in-the-butt problem.  Nice catch!!

           -Dave

--

-- 
Dave McGuire
Port Charlotte, FL

Lukas Kaminski | 18 Jun 2010 22:46
Picon

Re: Building wsfb driver for VAX

Hello,

thanks, the patch you send was very helpful.
what i forgot to tell you is that i'm using NetBSD-5.1-RC , so your
patch didn't apply cleanly, but i've merged the changes. i had to apply
similar patches to other Makefiles (diff file attached) and to define
XINPUT in xsrc/xfree/xc/programs/Xserver/hw/xfree86/common/xf86Xinput.h
(there must be a better way...). The build proceeds now to xf86Globals.c
where it stops with the attached error. I think there are more changes
to do...

Am Fr 18.06.2010 00:28 schrieb Michael <macallan <at> netbsd.org>:

> Hello,
>
> I have no experience whatsoever with VAX hardware so I probably can't
> tell you much.
> What you need to do is:
> build.sh -x
> NetBSD/vax should already default to Xorg.
> There will be files missing in the set lists but you can copy that
> from - say - shark ( just leave the chips driver out ) but that won't
> keep the actual build from completing.
> The wsfb driver depends on a graphical console and a bunch of ioctl()s
> to determine things like geometry and colour depth - I have no idea
> which console driver you're using, it may not support all that's
> needed ( should be more or less trivial to add as long as you have
> graphics )
> You'll need to apply the attached patch to build an Xserver, if it
> still fails you need to tell me where and how exactly it fails.
(Continue reading)

Michael | 18 Jun 2010 23:20
Picon

Re: Building wsfb driver for VAX


Hello,

On Jun 18, 2010, at 4:46 PM, Lukas Kaminski wrote:

> thanks, the patch you send was very helpful.
> what i forgot to tell you is that i'm using NetBSD-5.1-RC , so your
> patch didn't apply cleanly, but i've merged the changes. i had to  
> apply
> similar patches to other Makefiles (diff file attached) and to define
> XINPUT in xsrc/xfree/xc/programs/Xserver/hw/xfree86/common/ 
> xf86Xinput.h
> (there must be a better way...). The build proceeds now to  
> xf86Globals.c
> where it stops with the attached error. I think there are more changes
> to do...

You're building XFree86 which hasn't been touched for years. I'm not  
sure why this happens but you need to setenv X11FLAVOUR Xorg ( it  
should be the default on everything except a few )

have fun
Michael

pcencuotas | 30 Jun 2010 13:18
Picon

Computadora Completa en cuotas

ENVIOS AL INTERIOR POR CORREO ARGENTINO EN 24HS - TODAS LAS TARJETAS DE 
CREDITO
CREDITOS PERSONALES CUOTAS FIJAS Y EN PESOS - FACTURA A O B
CONSULTE POR IMPORTANTES DESCUENTOS EN EFECTIVO
Local en la zona de Flores, a pocas cuadras de Av. Nazca y Av. Avellaneda
EMail: pcencuotas <at> gmail.com 
CEL: 15-5147-0940

-Modelo: ATHLON FIRE
-Procesador: AMD ATHLON II X2 DUAL CORE 245 2,9GHz BOX
-Motherboard: MSI K96PGMV-2 chipset nVidia nForce 430
-Memoria: 1GB DDR2 800 Kingston
-Placa de video: nVIDIA GeForce 6150GS 256MB
-Disco rígido: 160 GB SATA2
-Medio optico: ReGrabadora  de DVD LG 20X
-Placa de red: 10/100 on board
-Placa de sonido: 8 canales
-Puertos: 2USB frontales + 4USB traseros
-Gabinete: KIT CIRKUIT PLANET 1272
-Teclado multimedia, Mouse optico, Parlantes y Diskettera 3 ½.
-Garantia 12 meses
-Sistema operativo instalado y funcionando FULL, todos los programa y 
utilidades
-PRECIO EFECTIVO $1259

PAGANDO CON TARJETA CABAL 12 CUOTAS SIN INTERES
TODAS LAS TARJETAS MASTERCARD 3, 6 y 9 CUOTAS SIN INTERES
TARJETA VISA BANCO HIPOTECARIO 12 CUOTAS SIN INTERES

-Modelo: ATHLON POWER
(Continue reading)


Gmane