Source-Changes-HG archive

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

[src/trunk]: src/sys/miscfs/genfs genfs_putpages(): when building a cluster m...



details:   https://anonhg.NetBSD.org/src/rev/ede2a7e71bc8
branches:  trunk
changeset: 1010973:ede2a7e71bc8
user:      ad <ad%NetBSD.org@localhost>
date:      Sun Jun 14 00:25:22 2020 +0000

description:
genfs_putpages(): when building a cluster make use of pages in the in the
existing uvm_page_array.

diffstat:

 sys/miscfs/genfs/genfs_io.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r dab9f1b23742 -r ede2a7e71bc8 sys/miscfs/genfs/genfs_io.c
--- a/sys/miscfs/genfs/genfs_io.c       Sun Jun 14 00:20:17 2020 +0000
+++ b/sys/miscfs/genfs/genfs_io.c       Sun Jun 14 00:25:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs_io.c,v 1.97 2020/05/25 21:15:10 ad Exp $ */
+/*     $NetBSD: genfs_io.c,v 1.98 2020/06/14 00:25:22 ad Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.97 2020/05/25 21:15:10 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.98 2020/06/14 00:25:22 ad Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1208,6 +1208,11 @@
                         *      0
                         *      UVM_PAGE_ARRAY_FILL_DIRTY
                         *      UVM_PAGE_ARRAY_FILL_DIRTY|WRITEBACK
+                        *
+                        * XXX this is fragile but it'll work: the array
+                        * was earlier filled sparsely, but UFP_DIRTYONLY
+                        * implies dense.  see corresponding comment in
+                        * uvn_findpages().
                         */
 
                        npages = MAXPAGES - nback - 1;
@@ -1215,7 +1220,7 @@
                                npages = MIN(npages,
                                             (fshi - off - 1) >> PAGE_SHIFT);
                        uvn_findpages(uobj, off + PAGE_SIZE, &npages,
-                           &pgs[nback + 1], NULL,
+                           &pgs[nback + 1], &a,
                            UFP_NOWAIT|UFP_NOALLOC|UFP_DIRTYONLY);
                        npages += nback + 1;
                } else {



Home | Main Index | Thread Index | Old Index