Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-10 Thread Stefan Farfeleder
On Wed, Oct 09, 2002 at 04:07:45PM -0700, Terry Lambert wrote: Stefan Farfeleder wrote: Is it just a warning or does it pose a real problem? I think the problem with the current code is that knote_{en,de}queue can be executed in parallel (on another CPU, spl*() can't prevent that, can

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-10 Thread Terry Lambert
Stefan Farfeleder wrote: Imagine this scenario where CPU 0 inserts a knote kn1 (the marker) in knote_scan and CPU 1 kn2 in kqueue_enqueue: CPU 0 | CPU 1 +--- kn1-kn_tqe.tqe_next = NULL;|

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-09 Thread Stefan Farfeleder
On Tue, Oct 08, 2002 at 09:26:29PM -0700, Don Lewis wrote: On 8 Oct, Stefan Farfeleder wrote: On Mon, Oct 07, 2002 at 03:48:45AM -0700, Terry Lambert wrote: Following the advice from the spl* man page I turned the spl* calls to a mutex and was surprised to see it working. My SMP

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-09 Thread Terry Lambert
Stefan Farfeleder wrote: Is it just a warning or does it pose a real problem? I think the problem with the current code is that knote_{en,de}queue can be executed in parallel (on another CPU, spl*() can't prevent that, can it?) with kqueue_scan and that kq-kq_head thus can be corrupted. Or

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-09 Thread Don Lewis
On 10 Oct, Stefan Farfeleder wrote: On Tue, Oct 08, 2002 at 09:26:29PM -0700, Don Lewis wrote: On 8 Oct, Stefan Farfeleder wrote: However, WITNESS complains (only once) about this: lock order reversal 1st 0xc662140c kqueue mutex (kqueue mutex) @

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-08 Thread Stefan Farfeleder
On Mon, Oct 07, 2002 at 03:48:45AM -0700, Terry Lambert wrote: *** OK, it's very hard to believe you didn't break into the *** debugger and manually call pnaic to get this to happen. You're right, this is exactly what I did. I can't personally repeat the problem, so you're elected to do

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-08 Thread Don Lewis
On 8 Oct, Stefan Farfeleder wrote: On Mon, Oct 07, 2002 at 03:48:45AM -0700, Terry Lambert wrote: Following the advice from the spl* man page I turned the spl* calls to a mutex and was surprised to see it working. My SMP -current survived a 'make -j16 buildworld' with make using kqueue()

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-07 Thread Stefan Farfeleder
On Sun, Oct 06, 2002 at 11:14:26PM -0700, Terry Lambert wrote: Stefan: Did the patch fix it, or not? Sorry for the long delay. No, it did not. But I now have a rather interesting core dump. I inserted a KASSERT, so that the code looks like this: TAILQ_INSERT_TAIL(kq-kq_head, marker,

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-07 Thread Terry Lambert
Stefan Farfeleder wrote: On Sun, Oct 06, 2002 at 11:14:26PM -0700, Terry Lambert wrote: Stefan: Did the patch fix it, or not? Sorry for the long delay. No, it did not. But I now have a rather interesting core dump. I inserted a KASSERT, so that the code looks like this:

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-07 Thread Julian Elischer
On Mon, 7 Oct 2002, Terry Lambert wrote: Stefan Farfeleder wrote: I'm confused why marker - if it was removed by TAILQ_REMOVE - hasn't kn_tqe.tqe_next and kn_tqe.tqe_prev set to (void *)-1. because that only happens if the debug code in queue.h is enabled, which it is not.. OK,

Re: [PATCH] Re: Junior Kernel Hacker page updated...

2002-10-06 Thread Terry Lambert
Terry Lambert wrote: Stefan Farfeleder wrote: (kgdb) l *kqueue_scan+0x242 0xc01a1212 is in kqueue_scan (/freebsd/current/src/sys/kern/kern_event.c:716). 713 TAILQ_INSERT_TAIL(kq-kq_head, marker, kn_tqe); 714 while (count) { 715 kn =

Re: Junior Kernel Hacker page updated...

2002-10-05 Thread Stefan Farfeleder
On Fri, Oct 04, 2002 at 04:33:17PM -0400, John Baldwin wrote: I wrote: Fatal trap 12: page fault while in kernel mode cpuid = 0; lapic.id = fault virtual address = 0x8 fault code = supervisor read, page not present instruction pointer = 0x8:0xc01a1212

[PATCH] Re: Junior Kernel Hacker page updated...

2002-10-05 Thread Terry Lambert
Stefan Farfeleder wrote: (kgdb) l *kqueue_scan+0x242 0xc01a1212 is in kqueue_scan (/freebsd/current/src/sys/kern/kern_event.c:716). 713 TAILQ_INSERT_TAIL(kq-kq_head, marker, kn_tqe); 714 while (count) { 715 kn = TAILQ_FIRST(kq-kq_head);

Re: Junior Kernel Hacker page updated...

2002-10-04 Thread Stefan Farfeleder
On Thu, Oct 03, 2002 at 04:41:46PM +0200, Poul-Henning Kamp wrote: Hi Stefan, I tried this patch and it paniced my (almost-) current machine with a pagefault in the kqueue code: Bravo! I can see that there is some amount of #ifdef stuff in your patch, The #ifdefs are already in the

Re: Junior Kernel Hacker page updated...

2002-10-04 Thread Juli Mallett
* De: Stefan Farfeleder [EMAIL PROTECTED] [ Data: 2002-10-04 ] [ Subjecte: Re: Junior Kernel Hacker page updated... ] On Thu, Oct 03, 2002 at 04:41:46PM +0200, Poul-Henning Kamp wrote: Hi Stefan, I tried this patch and it paniced my (almost-) current machine with a pagefault

Re: Junior Kernel Hacker page updated...

2002-10-04 Thread John Baldwin
On 04-Oct-2002 Juli Mallett wrote: * De: Stefan Farfeleder [EMAIL PROTECTED] [ Data: 2002-10-04 ] [ Subjecte: Re: Junior Kernel Hacker page updated... ] On Thu, Oct 03, 2002 at 04:41:46PM +0200, Poul-Henning Kamp wrote: Hi Stefan, I tried this patch and it paniced my (almost

Re: Junior Kernel Hacker page updated...

2002-10-04 Thread Poul-Henning Kamp
In message [EMAIL PROTECTED], Stefan Farfeleder writes: I have committed your patch, but left it #undef'ed until we get the kernel straightened out. On behalf of the FreeBSD project I have to warn you that if you persist in doing work of this kind over and over again, you will eventually be

Re: Junior Kernel Hacker page updated...

2002-10-04 Thread Juli Mallett
* De: Poul-Henning Kamp [EMAIL PROTECTED] [ Data: 2002-10-04 ] [ Subjecte: Re: Junior Kernel Hacker page updated... ] In message [EMAIL PROTECTED], Stefan Farfeleder writes: I have committed your patch, but left it #undef'ed until we get the kernel straightened out. On behalf

Re: Junior Kernel Hacker page updated...

2002-10-03 Thread Peter S. Housel
On Wed, 2002-10-02 at 14:40, Stefan Farfeleder wrote: On Sat, Sep 14, 2002 at 12:17:53PM +0200, Poul-Henning Kamp wrote: This is just to note that I have updated the JKH page with a lot of new stuff, so if your coding-pencil itches: http://people.freebsd.org/~phk/TODO/ |Make -j

Re: Junior Kernel Hacker page updated...

2002-10-03 Thread Poul-Henning Kamp
Hi Stefan, I tried this patch and it paniced my (almost-) current machine with a pagefault in the kqueue code: Bravo! I can see that there is some amount of #ifdef stuff in your patch, in light of that, would it be possible to make an #ifdef'ed version of your patch which we could commit ?

Re: Junior Kernel Hacker page updated...

2002-10-02 Thread Stefan Farfeleder
On Sat, Sep 14, 2002 at 12:17:53PM +0200, Poul-Henning Kamp wrote: This is just to note that I have updated the JKH page with a lot of new stuff, so if your coding-pencil itches: http://people.freebsd.org/~phk/TODO/ |Make -j improvement | |make(1) with -j option uses a select loop

Re: Junior Kernel Hacker page updated...

2002-10-02 Thread Don Lewis
On 2 Oct, Stefan Farfeleder wrote: /freebsd/current/src/sys/vm/uma_core.c:1307: could sleep with filedesc structure locked from /freebsd/current/src/sys/kern/kern_event.c:959 at me and freezes badly at some point (no breaking into ddb possible). This is totally repeatable. Is anybody

Re: Junior Kernel Hacker page updated...

2002-10-02 Thread Don Lewis
On 2 Oct, Don Lewis wrote: On 2 Oct, Stefan Farfeleder wrote: /freebsd/current/src/sys/vm/uma_core.c:1307: could sleep with filedesc structure locked from /freebsd/current/src/sys/kern/kern_event.c:959 at me and freezes badly at some point (no breaking into ddb possible). This is