Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 2009 22:17:24 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188348 - head/sys/vm
Message-ID:  <200902082217.n18MHOdt036521@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sun Feb  8 22:17:24 2009
New Revision: 188348
URL: http://svn.freebsd.org/changeset/base/188348

Log:
  Eliminate OBJ_NEEDGIANT.  After r188331, OBJ_NEEDGIANT's only use is by a
  redundant assertion in vm_fault().
  
  Reviewed by:	kib

Modified:
  head/sys/vm/vm_fault.c
  head/sys/vm/vm_object.c
  head/sys/vm/vm_object.h
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Sun Feb  8 22:13:57 2009	(r188347)
+++ head/sys/vm/vm_fault.c	Sun Feb  8 22:17:24 2009	(r188348)
@@ -567,9 +567,6 @@ vnode_lock:
 vnode_locked:
 			KASSERT(fs.vp == NULL || !fs.map->system_map,
 			    ("vm_fault: vnode-backed object mapped by system map"));
-			KASSERT((fs.first_object->flags & OBJ_NEEDGIANT) == 0 ||
-			    !fs.map->system_map,
-			    ("vm_fault: Object requiring giant mapped by system map"));
 
 			/*
 			 * now we find out if any other pages should be paged

Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c	Sun Feb  8 22:13:57 2009	(r188347)
+++ head/sys/vm/vm_object.c	Sun Feb  8 22:17:24 2009	(r188348)
@@ -1273,11 +1273,9 @@ vm_object_shadow(
 		source->shadow_count++;
 		source->generation++;
 #if VM_NRESERVLEVEL > 0
-		result->flags |= source->flags & (OBJ_NEEDGIANT | OBJ_COLORED);
+		result->flags |= source->flags & OBJ_COLORED;
 		result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) &
 		    ((1 << (VM_NFREEORDER - 1)) - 1);
-#else
-		result->flags |= source->flags & OBJ_NEEDGIANT;
 #endif
 		VM_OBJECT_UNLOCK(source);
 	}
@@ -1349,7 +1347,6 @@ vm_object_split(vm_map_entry_t entry)
 			orig_object->backing_object_offset + entry->offset;
 		new_object->backing_object = source;
 	}
-	new_object->flags |= orig_object->flags & OBJ_NEEDGIANT;
 retry:
 	if ((m = TAILQ_FIRST(&orig_object->memq)) != NULL) {
 		if (m->pindex < offidxstart) {

Modified: head/sys/vm/vm_object.h
==============================================================================
--- head/sys/vm/vm_object.h	Sun Feb  8 22:13:57 2009	(r188347)
+++ head/sys/vm/vm_object.h	Sun Feb  8 22:17:24 2009	(r188348)
@@ -147,7 +147,6 @@ struct vm_object {
 #define	OBJ_COLORED	0x1000		/* pg_color is defined */
 #define	OBJ_ONEMAPPING	0x2000		/* One USE (a single, non-forked) mapping flag */
 #define	OBJ_DISCONNECTWNT 0x4000	/* disconnect from vnode wanted */
-#define	OBJ_NEEDGIANT	0x8000		/* object requires Giant */
 
 #define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT)
 #define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT))

Modified: head/sys/vm/vnode_pager.c
==============================================================================
--- head/sys/vm/vnode_pager.c	Sun Feb  8 22:13:57 2009	(r188347)
+++ head/sys/vm/vnode_pager.c	Sun Feb  8 22:17:24 2009	(r188348)
@@ -223,8 +223,6 @@ retry:
 		object->un_pager.vnp.vnp_size = size;
 
 		object->handle = handle;
-		if (VFS_NEEDSGIANT(vp->v_mount))
-			vm_object_set_flag(object, OBJ_NEEDGIANT);
 		VI_LOCK(vp);
 		if (vp->v_object != NULL) {
 			/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902082217.n18MHOdt036521>