diff options
author | dillon <dillon@FreeBSD.org> | 1999-02-07 08:44:53 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-02-07 08:44:53 +0000 |
commit | 7a0029ee87f579bf3090db5b0fba045030753bbb (patch) | |
tree | 8a66ba39e9cacea664a6e0f9b4cf814b6bb73bd6 | |
parent | 9083305ced7f984a2036863222eec61929dd9381 (diff) | |
download | FreeBSD-src-7a0029ee87f579bf3090db5b0fba045030753bbb.zip FreeBSD-src-7a0029ee87f579bf3090db5b0fba045030753bbb.tar.gz |
When shadowing objects, adjust the page coloring of the shadowing object
such that pages in the combined/shadowed object are consistantly
colored.
Submitted by: "John S. Dyson" <dyson@iquest.net>
-rw-r--r-- | sys/vm/vm_object.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 455af83..9f6b3c6 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.143 1999/02/03 01:57:17 dillon Exp $ + * $Id: vm_object.c,v 1.144 1999/02/04 17:47:52 dillon Exp $ */ /* @@ -936,6 +936,10 @@ vm_object_shadow(object, offset, length) * Our caller changes his reference to point to the new object, * removing a reference to the source object. Net result: no change * of reference count. + * + * Try to optimize the result object's page color when shadowing + * in order to maintain page coloring consistancy in the combined + * shadowed object. */ result->backing_object = source; if (source) { @@ -943,6 +947,7 @@ vm_object_shadow(object, offset, length) vm_object_clear_flag(source, OBJ_ONEMAPPING); source->shadow_count++; source->generation++; + result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) & PQ_L2_MASK; } /* |