From owner-svn-src-head@freebsd.org Fri Dec 30 06:26:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E880C97B29; Fri, 30 Dec 2016 06:26:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1447F1F5B; Fri, 30 Dec 2016 06:26:19 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBU6QIV0030142; Fri, 30 Dec 2016 06:26:18 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBU6QIuS030139; Fri, 30 Dec 2016 06:26:18 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201612300626.uBU6QIuS030139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 30 Dec 2016 06:26:18 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2016 06:26:19 -0000 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(); } }