Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 2016 06:26:18 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310805 - in head/sys: kern sys vm
Message-ID:  <201612300626.uBU6QIuS030139@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Fri Dec 30 06:26:17 2016
New Revision: 310805
URL: https://svnweb.freebsd.org/changeset/base/310805

Log:
  Remove cpu_spinwait after seq_consistent.
  
  It does not add any benefit as the read routine will do it as necessary.

Modified:
  head/sys/kern/kern_descrip.c
  head/sys/sys/seq.h
  head/sys/vm/vm_domain.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Fri Dec 30 03:08:46 2016	(r310804)
+++ head/sys/kern/kern_descrip.c	Fri Dec 30 06:26:17 2016	(r310805)
@@ -2556,10 +2556,8 @@ fget_unlocked(struct filedesc *fdp, int 
 		fde = &fdt->fdt_ofiles[fd];
 		haverights = *cap_rights_fde(fde);
 		fp = fde->fde_file;
-		if (!seq_consistent(fd_seq(fdt, fd), seq)) {
-			cpu_spinwait();
+		if (!seq_consistent(fd_seq(fdt, fd), seq))
 			continue;
-		}
 #else
 		fp = fdt->fdt_ofiles[fd].fde_file;
 #endif

Modified: head/sys/sys/seq.h
==============================================================================
--- head/sys/sys/seq.h	Fri Dec 30 03:08:46 2016	(r310804)
+++ head/sys/sys/seq.h	Fri Dec 30 06:26:17 2016	(r310805)
@@ -59,7 +59,6 @@ typedef uint32_t seq_t;
  * 		lobj = gobj;
  * 		if (seq_consistent(&gobj->seq, seq))
  * 			break;
- * 		cpu_spinwait();
  * 	}
  * 	foo(lobj);
  */		

Modified: head/sys/vm/vm_domain.c
==============================================================================
--- head/sys/vm/vm_domain.c	Fri Dec 30 03:08:46 2016	(r310804)
+++ head/sys/vm/vm_domain.c	Fri Dec 30 06:26:17 2016	(r310805)
@@ -140,7 +140,6 @@ vm_domain_policy_localcopy(struct vm_dom
 		*dst = *src;
 		if (seq_consistent(&src->seq, seq))
 			return;
-		cpu_spinwait();
 	}
 }
 
@@ -168,7 +167,6 @@ vm_domain_policy_copy(struct vm_domain_p
 			seq_write_end(&dst->seq);
 			return;
 		}
-		cpu_spinwait();
 	}
 }
 
@@ -330,7 +328,6 @@ vm_domain_iterator_set_policy(struct vm_
 			_vm_domain_iterator_set_policy(vi, &vt_lcl);
 			return;
 		}
-		cpu_spinwait();
 	}
 }
 



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