Mailinglist Archive: packet-writing (116 mails)
| < Previous | Next > |
Packet patch for 2.4.19
- From: Peter Osterlund <petero2@xxxxxxxxx>
- Date: Tue, 6 Aug 2002 21:06:45 +0000 (UTC)
- Message-id: <Pine.LNX.4.44.0208062241050.5217-100000@xxxxxxxxxxxxxx>
I have uploaded a new patch for kernel 2.4.19, available from the usual
place:
http://w1.894.telia.com/~u89404340/patches/packet/
Unfortunately, I still haven't found the source of the corruption problem,
but I made some other changes:
- Fixed lockup in pkt_make_request under memory pressure.
- Added Ben Fennema's udf speed up patch.
- Removed some dead code.
The lockup problem could make all processes trying to submit I/O to a
packet device get stuck in D state forever if the memory pressure was big
enough. This often caused total system lockup when kernel threads like
kswapd and bdflush stopped working.
For those interested, here is the diff for the lockup fix.
--- pktcdvd.c.orig Tue Aug 6 22:56:02 2002
+++ pktcdvd.c Tue Aug 6 21:33:06 2002
@@ -581,6 +581,7 @@ static void pkt_end_io_write_stacked(str
rbh->b_end_io(rbh, uptodate);
kmem_cache_free(bh_cachep, bh);
atomic_dec(&pd->bhcnt);
+ wake_up(&pd_bh_wait);
}
static int pkt_init_rq(struct pktcdvd_device *pd, struct request *rq)
@@ -1965,6 +1966,7 @@ static int pkt_make_request(request_queu
if (pending < 0)
pending = 0;
+ generic_unplug_device(q);
wait_event(pd_bh_wait, atomic_read(&pd->bhcnt) <= pending);
} while (1);
--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.telia.com/~u89404340
place:
http://w1.894.telia.com/~u89404340/patches/packet/
Unfortunately, I still haven't found the source of the corruption problem,
but I made some other changes:
- Fixed lockup in pkt_make_request under memory pressure.
- Added Ben Fennema's udf speed up patch.
- Removed some dead code.
The lockup problem could make all processes trying to submit I/O to a
packet device get stuck in D state forever if the memory pressure was big
enough. This often caused total system lockup when kernel threads like
kswapd and bdflush stopped working.
For those interested, here is the diff for the lockup fix.
--- pktcdvd.c.orig Tue Aug 6 22:56:02 2002
+++ pktcdvd.c Tue Aug 6 21:33:06 2002
@@ -581,6 +581,7 @@ static void pkt_end_io_write_stacked(str
rbh->b_end_io(rbh, uptodate);
kmem_cache_free(bh_cachep, bh);
atomic_dec(&pd->bhcnt);
+ wake_up(&pd_bh_wait);
}
static int pkt_init_rq(struct pktcdvd_device *pd, struct request *rq)
@@ -1965,6 +1966,7 @@ static int pkt_make_request(request_queu
if (pending < 0)
pending = 0;
+ generic_unplug_device(q);
wait_event(pd_bh_wait, atomic_read(&pd->bhcnt) <= pending);
} while (1);
--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.telia.com/~u89404340
| < Previous | Next > |