Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Effectively disable the AMAP_REFALL flag because it ...



details:   https://anonhg.NetBSD.org/src/rev/84f24bff9aa9
branches:  trunk
changeset: 976353:84f24bff9aa9
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Sep 20 23:03:01 2020 +0000

description:
Effectively disable the AMAP_REFALL flag because it is unsafe.
This flag tells the amap code that it does not need to allocate ppref
as part of adding or removing a reference, but that is only correct
if the range of the reference being added or removed is the same
as the range of all other references to the amap, and the point of
this flag is exactly to try to optimize the case where the range is
different and thus this flag would not be correct to use.
Fixes PR 55366.

diffstat:

 sys/uvm/uvm_amap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 53341b8268a7 -r 84f24bff9aa9 sys/uvm/uvm_amap.c
--- a/sys/uvm/uvm_amap.c        Sun Sep 20 21:18:45 2020 +0000
+++ b/sys/uvm/uvm_amap.c        Sun Sep 20 23:03:01 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_amap.c,v 1.123 2020/08/18 10:40:20 chs Exp $       */
+/*     $NetBSD: uvm_amap.c,v 1.124 2020/09/20 23:03:01 chs Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.123 2020/08/18 10:40:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.124 2020/09/20 23:03:01 chs Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -1593,7 +1593,7 @@
         * so that the ppref values match the current amap refcount.
         */
 
-       if (amap->am_ppref == NULL && !all && len != amap->am_nslot) {
+       if (amap->am_ppref == NULL) {
                amap_pp_establish(amap, offset);
        }
 #endif



Home | Main Index | Thread Index | Old Index