xfs
[Top] [All Lists]

SLAB_PAGE_IO and highmem

To: linux-xfs@xxxxxxxxxxx
Subject: SLAB_PAGE_IO and highmem
From: Andi Kleen <ak@xxxxxxx>
Date: Mon, 21 May 2001 10:31:57 +0200
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
SLAB_PAGE_IO has __GFP_HIGHMEM set. Some functions in fs/pagebuf/*.c
directly use it to allocate from a slab cache and 
afterwards access it directly without ever calling kmap.  This works by
chance when there was no highmem page allocated, but not otherwise.
Here is a patch.

-Andi

--- include/linux/slab.h-o      Fri May 18 18:32:49 2001
+++ include/linux/slab.h        Mon May 21 10:38:27 2001
@@ -21,7 +21,7 @@
 #define        SLAB_KERNEL             GFP_KERNEL
 #define        SLAB_NFS                GFP_NFS
 #define        SLAB_DMA                GFP_DMA
-#define SLAB_PAGE_IO           GFP_PAGE_IO
+#define SLAB_PAGE_IO           (GFP_PAGE_IO & ~(__GFP_HIGH))
 
 #define SLAB_LEVEL_MASK                
(__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_PAGE_IO)
 #define        SLAB_NO_GROW            0x00001000UL    /* don't grow a cache */


<Prev in Thread] Current Thread [Next in Thread>
  • SLAB_PAGE_IO and highmem, Andi Kleen <=