Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/xen/xen Only attempt to handle as much data as we c...



details:   https://anonhg.NetBSD.org/src/rev/0629741a3a74
branches:  trunk
changeset: 777541:0629741a3a74
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Wed Feb 22 16:53:46 2012 +0000

description:
Only attempt to handle as much data as we can handle.
Per my testing, allows normal MAXPHYS on domU kernels.

diffstat:

 sys/arch/xen/xen/xbd_xenbus.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 6756f98fd9cf -r 0629741a3a74 sys/arch/xen/xen/xbd_xenbus.c
--- a/sys/arch/xen/xen/xbd_xenbus.c     Wed Feb 22 16:50:46 2012 +0000
+++ b/sys/arch/xen/xen/xbd_xenbus.c     Wed Feb 22 16:53:46 2012 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: xbd_xenbus.c,v 1.55 2012/02/22 16:50:46 jakllsch Exp $      */
+/*      $NetBSD: xbd_xenbus.c,v 1.56 2012/02/22 16:53:46 jakllsch Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.55 2012/02/22 16:50:46 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.56 2012/02/22 16:53:46 jakllsch Exp $");
 
 #include "opt_xen.h"
 
@@ -1017,7 +1017,11 @@
                bcount = bp->b_bcount;
                bp->b_resid = 0;
        }
-       for (seg = 0, bcount = bp->b_bcount; bcount > 0;) {
+       if (bcount > XBD_MAX_XFER) {
+               bp->b_resid += bcount - XBD_MAX_XFER;
+               bcount = XBD_MAX_XFER;
+       }
+       for (seg = 0; bcount > 0;) {
                pmap_extract_ma(pmap_kernel(), va, &ma);
                KASSERT((ma & (XEN_BSIZE - 1)) == 0);
                if (bcount > PAGE_SIZE - off)



Home | Main Index | Thread Index | Old Index