patch-1.3.81 linux/drivers/block/ll_rw_blk.c

Next file: linux/drivers/block/xd.c
Previous file: linux/arch/i386/defconfig
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.80/linux/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
@@ -306,7 +306,7 @@
 				return;
 			}
 			kstat.pgpgin++;
-			max_req = NR_REQUEST;	/* reads take precedence */
+			max_req = (major == MD_MAJOR) ? NR_REQUEST/2 : NR_REQUEST;	/* reads take precedence */
 			break;
 		case WRITEA:
 			rw_ahead = 1;
@@ -322,7 +322,7 @@
 			 * requests are only for reads.
 			 */
 			kstat.pgpgout++;
-			max_req = (NR_REQUEST * 2) / 3;
+			max_req =  (major == MD_MAJOR) ? NR_REQUEST/3 : (NR_REQUEST * 2) / 3;
 			break;
 		default:
 			printk("make_request: bad block dev cmd, must be R/W/RA/WA\n");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this