Whamcloud - gitweb
optional highmem buffers in obdecho/test_brw
authoreeb <eeb>
Wed, 21 Aug 2002 22:17:39 +0000 (22:17 +0000)
committereeb <eeb>
Wed, 21 Aug 2002 22:17:39 +0000 (22:17 +0000)
lustre/obdclass/class_obd.c
lustre/obdecho/echo.c

index 7c31246..4c67ad4 100644 (file)
@@ -53,6 +53,8 @@ unsigned long obd_fail_loc = 0;
 unsigned long obd_timeout = 100;
 char obd_recovery_upcall[128] = "/usr/lib/lustre/ha_assist";
 
+int  obdclass_highmem = 0;
+
 extern struct obd_type *class_nm_to_type(char *nm);
 
 /*  opening /dev/obd */
@@ -519,7 +521,7 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp,
                 off = data->ioc_offset;
 
                 for (j = 0, pgp = pga; j < pages; j++, off += PAGE_SIZE, pgp++){
-                        pgp->pg = alloc_pages(GFP_KERNEL, 0);
+                        pgp->pg = alloc_pages(obdclass_highmem ? GFP_HIGHUSER : GFP_KERNEL, 0);
                         if (!pgp->pg) {
                                 CERROR("no memory for brw pages\n");
                                 GOTO(brw_cleanup, err = -ENOMEM);
index eb31dac..a63f67e 100644 (file)
@@ -11,8 +11,8 @@
  * by Peter Braam <braam@clusterfs.com>
  */
 
-static char rcsid[] __attribute ((unused)) = "$Id: echo.c,v 1.24 2002/08/19 23:45:00 adilger Exp $";
-#define OBDECHO_VERSION "$Revision: 1.24 $"
+static char rcsid[] __attribute ((unused)) = "$Id: echo.c,v 1.25 2002/08/21 22:17:39 eeb Exp $";
+#define OBDECHO_VERSION "$Revision: 1.25 $"
 
 #define EXPORT_SYMTAB
 
@@ -43,6 +43,8 @@ static long echo_pages = 0;
 static atomic_t echo_page_rws;
 static atomic_t echo_getattrs;
 
+int obdecho_highmem = 0;
+
 #define ECHO_PROC_STAT "sys/obdecho"
 
 int
@@ -153,7 +155,7 @@ int echo_preprw(int cmd, struct lustre_handle *conn, int objcount,
                 int j;
 
                 for (j = 0 ; j < obj->ioo_bufcnt ; j++, nb++, r++) {
-                        r->page = alloc_pages(GFP_KERNEL, 0);
+                        r->page = alloc_pages(obdecho_highmem ? GFP_HIGHUSER : GFP_KERNEL, 0);
                         if (!r->page) {
                                 CERROR("can't get page %d/%d for id "LPU64"\n",
                                        j, obj->ioo_bufcnt, obj->ioo_id);