[PATCH] loop 1/9 file use highmem

Hugh Dickins (hugh@veritas.com)
Tue, 10 Jun 2003 16:30:06 +0100 (BST)


Here's the first of nine small patches to the loop driver,
mostly to reduce its pressure on zone normal when there's highmem.

I don't pretend these fix every loop hang I see and you not,
nor have I completed reinvestigating those against latest kernel.
These patches just remove what I hope we'll agree is silliness,
setting a base for further work.

(Some could conceivably make some loads worse: making better use of
highmem for data could in theory expose kmap deadlocks, I've never seen,
or permit so much more data in transit that mempool exhaustion wins:
if so, we fix those issues, rather than depending on mistakes.)

Based on 2.5.70-mm7. Aggregate diffstat is:

drivers/block/loop.c | 71 +++++++++++++++++++++++++++------------------
fs/bio.c | 79 ---------------------------------------------------
include/linux/bio.h | 1
include/linux/loop.h | 1
4 files changed, 43 insertions(+), 109 deletions(-)

loop 1/9 file use highmem

When loop restricts underlying file's allocation mask to avoid
deadlock, it unintentionally masks out its highmem capability,
making failures at the underlying level much more likely.

--- 2.5.70-mm7/drivers/block/loop.c Mon Jun 9 10:14:55 2003
+++ loop1/drivers/block/loop.c Mon Jun 9 10:29:01 2003
@@ -714,7 +714,7 @@
goto out_putf;
}
lo->old_gfp_mask = inode->i_mapping->gfp_mask;
- inode->i_mapping->gfp_mask = GFP_NOIO;
+ inode->i_mapping->gfp_mask &= ~(__GFP_IO|__GFP_FS);

set_blocksize(bdev, lo_blocksize);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/