[lkml]   [2005]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: Processes stuck on D state on Dual Opteron
On Monday April 11, wrote:
> Neil, have you had a look at the traces? Do they mean much to you?

Just looked.
bio_alloc_bioset seems implicated, as does sync_page_io.

sync_page_io used to use a 'struct bio' on the stack, but Jens Axboe
change it to use bio_alloc (don't know why..) and I should have
checked the change better.

sync_page_io can be called on the write out path, so it should use
GFP_NOIO rather than GFP_KERNEL.

See if this helps.... Actually this patch is against 2.6.12-rc2-mm1
which uses md_super_write instead of sync_page_io (which is now only
used for read). So if you are using a non-mm kernel (which seems to
be the case) you'll need to apply the patch by hand.


Avoid deadlock in sync_page_io by using GFP_NOIO sync_page_io can be called on the write-out path.
Ditto for md_super_write

Signed-off-by: Neil Brown <>

### Diffstat output
./drivers/md/md.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~ 2005-04-08 11:25:26.000000000 +1000
+++ ./drivers/md/md.c 2005-04-12 09:42:29.000000000 +1000
@@ -351,7 +351,7 @@ void md_super_write(mddev_t *mddev, mdk_
* if zero is reached.
* If an error occurred, call md_error
- struct bio *bio = bio_alloc(GFP_KERNEL, 1);
+ struct bio *bio = bio_alloc(GFP_NOIO, 1);

bio->bi_bdev = rdev->bdev;
bio->bi_sector = sector;
@@ -374,7 +374,7 @@ static int bi_complete(struct bio *bio,
int sync_page_io(struct block_device *bdev, sector_t sector, int size,
struct page *page, int rw)
- struct bio *bio = bio_alloc(GFP_KERNEL, 1);
+ struct bio *bio = bio_alloc(GFP_NOIO, 1);
struct completion event;
int ret;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-04-12 01:52    [W:0.160 / U:58.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site