Re: 2.4.2-ac3: loop threads in D state

2001-02-27 Thread Nate Eldredge
Jens Axboe writes: > On Sun, Feb 25 2001, Nate Eldredge wrote: > > Nate Eldredge writes: > > > Kernel 2.4.2-ac3. > > > > > > FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND > > > 40 0 425 1 -1 -20 0 0 downDW< ? 0:00 (loop0

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Alexander Viro
On Mon, 26 Feb 2001, Jens Axboe wrote: > Ah ok, I see what you mean. Updated patch attached. Corresponding patch against 2.4.2 is on ftp.math.psu.edu/pub/viro/loop-S2.gz Cheers,

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Alexander Viro wrote: > > What's the worst that can happen? We do an extra up, but loop_thread > > will still quit once we hit zero lo_pending. And loop_clr_fd > > is still protected by lo_ctl_mutex. > > Well, for one thing you'll get some surprises next time you losetup > th

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Alexander Viro
On Mon, 26 Feb 2001, Jens Axboe wrote: > On Sun, Feb 25 2001, Alexander Viro wrote: > > Let me elaborate: the race is very narrow and takes deliberate efforts to > > hit. It _can_ be triggered, unfortunately. This extra up() will mess your > > life later on. > > What's the worst that can happe

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Alexander Viro wrote: > Let me elaborate: the race is very narrow and takes deliberate efforts to > hit. It _can_ be triggered, unfortunately. This extra up() will mess your > life later on. What's the worst that can happen? We do an extra up, but loop_thread will still quit

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Alexander Viro wrote: > > > if (atomic_dec_and_test(...)) > > > up(...); > > > not just > > > atomic_dec(...); > > > up(...); > > > > > > Otherwise you can end up with too early exit of loop_thread. Normally > > > it would not matter, but in pathological cases

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Alexander Viro
On Sun, 25 Feb 2001, Alexander Viro wrote: > > > On Mon, 26 Feb 2001, Jens Axboe wrote: > > > On Sun, Feb 25 2001, Alexander Viro wrote: > > > Erm... Jens, it really should be > > > if (atomic_dec_and_test(...)) > > > up(...); > > > not just > > > atomic_dec(...); > > > up(..

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Alexander Viro
On Mon, 26 Feb 2001, Jens Axboe wrote: > On Sun, Feb 25 2001, Alexander Viro wrote: > > Erm... Jens, it really should be > > if (atomic_dec_and_test(...)) > > up(...); > > not just > > atomic_dec(...); > > up(...); > > > > Otherwise you can end up with too early exit of

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Alexander Viro wrote: > Erm... Jens, it really should be > if (atomic_dec_and_test(...)) > up(...); > not just > atomic_dec(...); > up(...); > > Otherwise you can end up with too early exit of loop_thread. Normally > it would not matter, but in

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Alexander Viro
On Mon, 26 Feb 2001, Jens Axboe wrote: > On Sun, Feb 25 2001, Alexander Viro wrote: > > Jens, you have a race in lo_clr_fd() (loop-6). I've put the fixed > > variant on ftp.math.psu.edu/pub/viro/loop-S2.gz. Diff and you'll > > see - it's in the very beginning of the lo_clr_fd(). > > Oops yeah

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Alexander Viro wrote: > Jens, you have a race in lo_clr_fd() (loop-6). I've put the fixed > variant on ftp.math.psu.edu/pub/viro/loop-S2.gz. Diff and you'll > see - it's in the very beginning of the lo_clr_fd(). Oops yeah you are right. Here's a diff of my current loop stuff

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Alexander Viro
On Sun, 25 Feb 2001, Jens Axboe wrote: > On Sun, Feb 25 2001, Nate Eldredge wrote: > > Nate Eldredge writes: > > > Kernel 2.4.2-ac3. > > > > > > FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND > > > 40 0 425 1 -1 -20 0 0 downDW

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Jens Axboe
On Sun, Feb 25 2001, Nate Eldredge wrote: > Nate Eldredge writes: > > Kernel 2.4.2-ac3. > > > > FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND > > 40 0 425 1 -1 -20 0 0 downDW< ? 0:00 (loop0) > > It looks like this has been ad

Re: 2.4.2-ac3: loop threads in D state

2001-02-25 Thread Nate Eldredge
Nate Eldredge writes: > Kernel 2.4.2-ac3. > > FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND > 40 0 425 1 -1 -20 0 0 downDW< ? 0:00 (loop0) It looks like this has been addressed in the thread "242-ac3 loop bug". Jens Axboe po

2.4.2-ac3: loop threads in D state

2001-02-24 Thread Nate Eldredge
Kernel 2.4.2-ac3. FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND 40 0 425 1 -1 -20 0 0 downDW< ? 0:00 (loop0) >From a look at the source it seems that this may be normal behavior (though I'm not sure). However, it's still cosmeti