svn commit: r309709 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Thu Dec 8 10:29:43 UTC 2016


Author: kib
Date: Thu Dec  8 10:29:41 2016
New Revision: 309709
URL: https://svnweb.freebsd.org/changeset/base/309709

Log:
  Move map_generation snapshot value into struct faultstate.
  
  Reviewed by:	alc
  Tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Thu Dec  8 10:28:51 2016	(r309708)
+++ head/sys/vm/vm_fault.c	Thu Dec  8 10:29:41 2016	(r309709)
@@ -122,6 +122,7 @@ struct faultstate {
 	vm_pindex_t first_pindex;
 	vm_map_t map;
 	vm_map_entry_t entry;
+	int map_generation;
 	bool lookup_still_valid;
 	struct vnode *vp;
 };
@@ -339,7 +340,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t 
 	vm_pindex_t retry_pindex;
 	vm_prot_t prot, retry_prot;
 	int ahead, alloc_req, behind, cluster_offset, error, era, faultcount;
-	int locked, map_generation, nera, result, rv;
+	int locked, nera, result, rv;
 	u_char behavior;
 	boolean_t wired;	/* Passed by reference. */
 	bool dead, growstack, hardfault, is_first_object_locked;
@@ -373,7 +374,7 @@ RetryFault:;
 		return (result);
 	}
 
-	map_generation = fs.map->timestamp;
+	fs.map_generation = fs.map->timestamp;
 
 	if (fs.entry->eflags & MAP_ENTRY_NOFAULT) {
 		panic("vm_fault: fault on nofault entry, addr: %lx",
@@ -972,7 +973,7 @@ readrest:
 			goto RetryFault;
 		}
 		fs.lookup_still_valid = true;
-		if (fs.map->timestamp != map_generation) {
+		if (fs.map->timestamp != fs.map_generation) {
 			result = vm_map_lookup_locked(&fs.map, vaddr, fault_type,
 			    &fs.entry, &retry_object, &retry_pindex, &retry_prot, &wired);
 


More information about the svn-src-head mailing list