From owner-svn-src-stable-10@freebsd.org Sun Jul 31 10:37:10 2016 Return-Path: Delivered-To: svn-src-stable-10@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 5087CBA9350; Sun, 31 Jul 2016 10:37:10 +0000 (UTC) (envelope-from ache@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 2BDD71E50; Sun, 31 Jul 2016 10:37:10 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6VAb9WS009035; Sun, 31 Jul 2016 10:37:09 GMT (envelope-from ache@FreeBSD.org) Received: (from ache@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6VAb9Sh009033; Sun, 31 Jul 2016 10:37:09 GMT (envelope-from ache@FreeBSD.org) Message-Id: <201607311037.u6VAb9Sh009033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ache set sender to ache@FreeBSD.org using -f From: "Andrey A. Chernov" Date: Sun, 31 Jul 2016 10:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303582 - in stable/10/usr.bin/calendar/calendars: ru_RU.KOI8-R ru_RU.UTF-8 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2016 10:37:10 -0000 Author: ache Date: Sun Jul 31 10:37:09 2016 New Revision: 303582 URL: https://svnweb.freebsd.org/changeset/base/303582 Log: Direct commit of adapted r303581. Fix date. Modified: stable/10/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military stable/10/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military Modified: stable/10/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military ============================================================================== --- stable/10/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military Sun Jul 31 10:15:04 2016 (r303581) +++ stable/10/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.military Sun Jul 31 10:37:09 2016 (r303582) @@ -20,7 +20,7 @@ LANG=ru_RU.KOI8-R 8 сен День Бородинского сражения русской армии под командованием М.И. Кутузова с французской армией (1812 год) 11 сен День победы русской эскадры под командованием Ф.Ф. Ушакова над турецкой эскадрой у мыса Тендра (1790 год) 21 сен День победы русских полков во главе с великим князем Дмитрием Донским над монголо-татарскими войсками в Куликовской битве (1380 год) - 7 ноя День освобождения Москвы силами народного ополчения под руководством Кузьмы Минина и Дмитрия Пожарского от польских интервентов (1612 год) + 4 ноя День освобождения Москвы силами народного ополчения под руководством Кузьмы Минина и Дмитрия Пожарского от польских интервентов (1612 год) 1 дек День победы русской эскадры под командованием П.С. Нахимова над турецкой эскадрой у мыса Синоп (1853 год) 5 дек День начала контрнаступления советских войск против немецко-фашистских войск в битве под Москвой (1941 год) 24 дек День взятия турецкой крепости Измаил русскими войсками под командованием А.В. Суворова (1790 год) Modified: stable/10/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military ============================================================================== --- stable/10/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military Sun Jul 31 10:15:04 2016 (r303581) +++ stable/10/usr.bin/calendar/calendars/ru_RU.UTF-8/calendar.military Sun Jul 31 10:37:09 2016 (r303582) @@ -20,7 +20,7 @@ LANG=ru_RU.UTF-8 8 я│п╣п╫ п■п╣п╫я▄ п▒п╬я─п╬п╢п╦п╫я│п╨п╬пЁп╬ я│я─п╟п╤п╣п╫п╦я▐ я─я┐я│я│п╨п╬п╧ п╟я─п╪п╦п╦ п©п╬п╢ п╨п╬п╪п╟п╫п╢п╬п╡п╟п╫п╦п╣п╪ п°.п≤. п я┐я┌я┐п╥п╬п╡п╟ я│ я└я─п╟п╫я├я┐п╥я│п╨п╬п╧ п╟я─п╪п╦п╣п╧ (1812 пЁп╬п╢) 11 я│п╣п╫ п■п╣п╫я▄ п©п╬п╠п╣п╢я▀ я─я┐я│я│п╨п╬п╧ я█я│п╨п╟п╢я─я▀ п©п╬п╢ п╨п╬п╪п╟п╫п╢п╬п╡п╟п╫п╦п╣п╪ п╓.п╓. пёя┬п╟п╨п╬п╡п╟ п╫п╟п╢ я┌я┐я─п╣я├п╨п╬п╧ я█я│п╨п╟п╢я─п╬п╧ я┐ п╪я▀я│п╟ п╒п╣п╫п╢я─п╟ (1790 пЁп╬п╢) 21 я│п╣п╫ п■п╣п╫я▄ п©п╬п╠п╣п╢я▀ я─я┐я│я│п╨п╦я┘ п©п╬п╩п╨п╬п╡ п╡п╬ пЁп╩п╟п╡п╣ я│ п╡п╣п╩п╦п╨п╦п╪ п╨п╫я▐п╥п╣п╪ п■п╪п╦я┌я─п╦п╣п╪ п■п╬п╫я│п╨п╦п╪ п╫п╟п╢ п╪п╬п╫пЁп╬п╩п╬-я┌п╟я┌п╟я─я│п╨п╦п╪п╦ п╡п╬п╧я│п╨п╟п╪п╦ п╡ п я┐п╩п╦п╨п╬п╡я│п╨п╬п╧ п╠п╦я┌п╡п╣ (1380 пЁп╬п╢) - 7 п╫п╬я▐ п■п╣п╫я▄ п╬я│п╡п╬п╠п╬п╤п╢п╣п╫п╦я▐ п°п╬я│п╨п╡я▀ я│п╦п╩п╟п╪п╦ п╫п╟я─п╬п╢п╫п╬пЁп╬ п╬п©п╬п╩я┤п╣п╫п╦я▐ п©п╬п╢ я─я┐п╨п╬п╡п╬п╢я│я┌п╡п╬п╪ п я┐п╥я▄п╪я▀ п°п╦п╫п╦п╫п╟ п╦ п■п╪п╦я┌я─п╦я▐ п÷п╬п╤п╟я─я│п╨п╬пЁп╬ п╬я┌ п©п╬п╩я▄я│п╨п╦я┘ п╦п╫я┌п╣я─п╡п╣п╫я┌п╬п╡ (1612 пЁп╬п╢) + 4 п╫п╬я▐ п■п╣п╫я▄ п╬я│п╡п╬п╠п╬п╤п╢п╣п╫п╦я▐ п°п╬я│п╨п╡я▀ я│п╦п╩п╟п╪п╦ п╫п╟я─п╬п╢п╫п╬пЁп╬ п╬п©п╬п╩я┤п╣п╫п╦я▐ п©п╬п╢ я─я┐п╨п╬п╡п╬п╢я│я┌п╡п╬п╪ п я┐п╥я▄п╪я▀ п°п╦п╫п╦п╫п╟ п╦ п■п╪п╦я┌я─п╦я▐ п÷п╬п╤п╟я─я│п╨п╬пЁп╬ п╬я┌ п©п╬п╩я▄я│п╨п╦я┘ п╦п╫я┌п╣я─п╡п╣п╫я┌п╬п╡ (1612 пЁп╬п╢) 1 п╢п╣п╨ п■п╣п╫я▄ п©п╬п╠п╣п╢я▀ я─я┐я│я│п╨п╬п╧ я█я│п╨п╟п╢я─я▀ п©п╬п╢ п╨п╬п╪п╟п╫п╢п╬п╡п╟п╫п╦п╣п╪ п÷.п║. п²п╟я┘п╦п╪п╬п╡п╟ п╫п╟п╢ я┌я┐я─п╣я├п╨п╬п╧ я█я│п╨п╟п╢я─п╬п╧ я┐ п╪я▀я│п╟ п║п╦п╫п╬п© (1853 пЁп╬п╢) 5 п╢п╣п╨ п■п╣п╫я▄ п╫п╟я┤п╟п╩п╟ п╨п╬п╫я┌я─п╫п╟я│я┌я┐п©п╩п╣п╫п╦я▐ я│п╬п╡п╣я┌я│п╨п╦я┘ п╡п╬п╧я│п╨ п©я─п╬я┌п╦п╡ п╫п╣п╪п╣я├п╨п╬-я└п╟я┬п╦я│я┌я│п╨п╦я┘ п╡п╬п╧я│п╨ п╡ п╠п╦я┌п╡п╣ п©п╬п╢ п°п╬я│п╨п╡п╬п╧ (1941 пЁп╬п╢) 24 п╢п╣п╨ п■п╣п╫я▄ п╡п╥я▐я┌п╦я▐ я┌я┐я─п╣я├п╨п╬п╧ п╨я─п╣п©п╬я│я┌п╦ п≤п╥п╪п╟п╦п╩ я─я┐я│я│п╨п╦п╪п╦ п╡п╬п╧я│п╨п╟п╪п╦ п©п╬п╢ п╨п╬п╪п╟п╫п╢п╬п╡п╟п╫п╦п╣п╪ п░.п▓. п║я┐п╡п╬я─п╬п╡п╟ (1790 пЁп╬п╢) From owner-svn-src-stable-10@freebsd.org Sun Jul 31 15:15:28 2016 Return-Path: Delivered-To: svn-src-stable-10@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 C7887BA98D9; Sun, 31 Jul 2016 15:15:28 +0000 (UTC) (envelope-from kib@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 97361161B; Sun, 31 Jul 2016 15:15:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6VFFRD8016085; Sun, 31 Jul 2016 15:15:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6VFFRvo016084; Sun, 31 Jul 2016 15:15:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607311515.u6VFFRvo016084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 31 Jul 2016 15:15:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303591 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2016 15:15:28 -0000 Author: kib Date: Sun Jul 31 15:15:27 2016 New Revision: 303591 URL: https://svnweb.freebsd.org/changeset/base/303591 Log: MFC r303424: Fix typo in comment. Modified: stable/10/sys/sys/proc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Sun Jul 31 15:13:51 2016 (r303590) +++ stable/10/sys/sys/proc.h Sun Jul 31 15:15:27 2016 (r303591) @@ -701,7 +701,7 @@ struct proc { #define SW_TYPE_MASK 0xff /* First 8 bits are switch type */ #define SWT_NONE 0 /* Unspecified switch. */ #define SWT_PREEMPT 1 /* Switching due to preemption. */ -#define SWT_OWEPREEMPT 2 /* Switching due to opepreempt. */ +#define SWT_OWEPREEMPT 2 /* Switching due to owepreempt. */ #define SWT_TURNSTILE 3 /* Turnstile contention. */ #define SWT_SLEEPQ 4 /* Sleepq wait. */ #define SWT_SLEEPQTIMO 5 /* Sleepq timeout wait. */ From owner-svn-src-stable-10@freebsd.org Mon Aug 1 06:35:36 2016 Return-Path: Delivered-To: svn-src-stable-10@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 6BEADBAD30D; Mon, 1 Aug 2016 06:35:36 +0000 (UTC) (envelope-from kib@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 4751D1334; Mon, 1 Aug 2016 06:35:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u716ZZBD059353; Mon, 1 Aug 2016 06:35:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u716ZZbI059351; Mon, 1 Aug 2016 06:35:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201608010635.u716ZZbI059351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Aug 2016 06:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303607 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 06:35:36 -0000 Author: kib Date: Mon Aug 1 06:35:35 2016 New Revision: 303607 URL: https://svnweb.freebsd.org/changeset/base/303607 Log: MFC r302614: Revive the check, disabled in r197963. MFC r302999: On first exec after vfork(), call signotify() to handle pending reenabled signals. Modified: stable/10/sys/kern/kern_exec.c stable/10/sys/kern/subr_trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_exec.c ============================================================================== --- stable/10/sys/kern/kern_exec.c Mon Aug 1 06:34:55 2016 (r303606) +++ stable/10/sys/kern/kern_exec.c Mon Aug 1 06:35:35 2016 (r303607) @@ -751,6 +751,8 @@ interpret: if (p->p_flag & P_PPWAIT) { p->p_flag &= ~(P_PPWAIT | P_PPTRACE); cv_broadcast(&p->p_pwait); + /* STOPs are no longer ignored, arrange for AST */ + signotify(td); } /* Modified: stable/10/sys/kern/subr_trap.c ============================================================================== --- stable/10/sys/kern/subr_trap.c Mon Aug 1 06:34:55 2016 (r303606) +++ stable/10/sys/kern/subr_trap.c Mon Aug 1 06:35:35 2016 (r303607) @@ -108,17 +108,29 @@ userret(struct thread *td, struct trapfr td->td_name); KASSERT((p->p_flag & P_WEXIT) == 0, ("Exiting process returns to usermode")); -#if 0 #ifdef DIAGNOSTIC - /* Check that we called signotify() enough. */ - PROC_LOCK(p); - thread_lock(td); - if (SIGPENDING(td) && ((td->td_flags & TDF_NEEDSIGCHK) == 0 || - (td->td_flags & TDF_ASTPENDING) == 0)) - printf("failed to set signal flags properly for ast()\n"); - thread_unlock(td); - PROC_UNLOCK(p); -#endif + /* + * Check that we called signotify() enough. For + * multi-threaded processes, where signal distribution might + * change due to other threads changing sigmask, the check is + * racy and cannot be performed reliably. + * If current process is vfork child, indicated by P_PPWAIT, then + * issignal() ignores stops, so we block the check to avoid + * classifying pending signals. + */ + if (p->p_numthreads == 1) { + PROC_LOCK(p); + thread_lock(td); + if ((p->p_flag & P_PPWAIT) == 0) { + KASSERT(!SIGPENDING(td) || (td->td_flags & + (TDF_NEEDSIGCHK | TDF_ASTPENDING)) == + (TDF_NEEDSIGCHK | TDF_ASTPENDING), + ("failed to set signal flags for ast p %p " + "td %p fl %x", p, td, td->td_flags)); + } + thread_unlock(td); + PROC_UNLOCK(p); + } #endif #ifdef KTRACE KTRUSERRET(td); @@ -268,6 +280,29 @@ ast(struct trapframe *framep) #endif } +#ifdef DIAGNOSTIC + if (p->p_numthreads == 1 && (flags & TDF_NEEDSIGCHK) == 0) { + PROC_LOCK(p); + thread_lock(td); + /* + * Note that TDF_NEEDSIGCHK should be re-read from + * td_flags, since signal might have been delivered + * after we cleared td_flags above. This is one of + * the reason for looping check for AST condition. + * See comment in userret() about P_PPWAIT. + */ + if ((p->p_flag & P_PPWAIT) == 0) { + KASSERT(!SIGPENDING(td) || (td->td_flags & + (TDF_NEEDSIGCHK | TDF_ASTPENDING)) == + (TDF_NEEDSIGCHK | TDF_ASTPENDING), + ("failed2 to set signal flags for ast p %p td %p " + "fl %x %x", p, td, flags, td->td_flags)); + } + thread_unlock(td); + PROC_UNLOCK(p); + } +#endif + /* * Check for signals. Unlocked reads of p_pendingcnt or * p_siglist might cause process-directed signal to be handled From owner-svn-src-stable-10@freebsd.org Mon Aug 1 06:59:37 2016 Return-Path: Delivered-To: svn-src-stable-10@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 D5A0ABABA0A; Mon, 1 Aug 2016 06:59:37 +0000 (UTC) (envelope-from ngie@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 B31881206; Mon, 1 Aug 2016 06:59:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u716xavg067160; Mon, 1 Aug 2016 06:59:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u716xaIK067151; Mon, 1 Aug 2016 06:59:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201608010659.u716xaIK067151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Aug 2016 06:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303609 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 06:59:37 -0000 Author: ngie Date: Mon Aug 1 06:59:35 2016 New Revision: 303609 URL: https://svnweb.freebsd.org/changeset/base/303609 Log: MFC r288071: - arm64 change was omitted due to lack of architecture support - ia64 change was added as the architecture was removed from ^/head Sponsored by: EMC / Isilon Storage Division r288071 (by emaste): Move kbd.c to main sys/conf/files list It is (optionally) used on all architectures. Modified: stable/10/sys/conf/files stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.arm stable/10/sys/conf/files.i386 stable/10/sys/conf/files.ia64 stable/10/sys/conf/files.mips stable/10/sys/conf/files.pc98 stable/10/sys/conf/files.powerpc stable/10/sys/conf/files.sparc64 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files Mon Aug 1 06:59:35 2016 (r303609) @@ -1782,6 +1782,7 @@ dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard +dev/kbd/kbd.c optional atkbd | pckbd | sc | ukbd | vt dev/kbdmux/kbdmux.c optional kbdmux dev/ksyms/ksyms.c optional ksyms dev/le/am7990.c optional le Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.amd64 Mon Aug 1 06:59:35 2016 (r303609) @@ -281,7 +281,6 @@ dev/hyperv/vmbus/vmbus.c optional hyp dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv -dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev dev/nfe/if_nfe.c optional nfe pci Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.arm Mon Aug 1 06:59:35 2016 (r303609) @@ -66,7 +66,6 @@ crypto/blowfish/bf_enc.c optional crypto crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/fb/fb.c optional sc dev/hwpmc/hwpmc_arm.c optional hwpmc -dev/kbd/kbd.c optional sc | vt dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.i386 Mon Aug 1 06:59:35 2016 (r303609) @@ -274,7 +274,6 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci dev/ipmi/ipmi_linux.c optional ipmi compat_linux -dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/le/if_le_isa.c optional le isa dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev Modified: stable/10/sys/conf/files.ia64 ============================================================================== --- stable/10/sys/conf/files.ia64 Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.ia64 Mon Aug 1 06:59:35 2016 (r303609) @@ -52,7 +52,6 @@ dev/fb/fb.c optional fb | vga dev/fb/vga.c optional vga dev/hwpmc/hwpmc_ia64.c optional hwpmc dev/io/iodev.c optional io -dev/kbd/kbd.c optional atkbd | sc | ukbd dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc Modified: stable/10/sys/conf/files.mips ============================================================================== --- stable/10/sys/conf/files.mips Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.mips Mon Aug 1 06:59:35 2016 (r303609) @@ -68,7 +68,6 @@ dev/cfe/cfe_env.c optional cfe_env # syscons support dev/fb/fb.c optional sc -dev/kbd/kbd.c optional sc dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc Modified: stable/10/sys/conf/files.pc98 ============================================================================== --- stable/10/sys/conf/files.pc98 Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.pc98 Mon Aug 1 06:59:35 2016 (r303609) @@ -126,7 +126,6 @@ dev/hwpmc/hwpmc_ppro.c optional hwpmc dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc dev/io/iodev.c optional io -dev/kbd/kbd.c optional pckbd | sc | ukbd dev/le/if_le_cbus.c optional le isa dev/lindev/full.c optional lindev dev/lindev/lindev.c optional lindev Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.powerpc Mon Aug 1 06:59:35 2016 (r303609) @@ -39,7 +39,6 @@ dev/iicbus/adt746x.c optional ad dev/iicbus/ds1631.c optional ds1631 powermac dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac -dev/kbd/kbd.c optional sc | vt dev/nand/nfc_fsl.c optional nand mpc85xx # ofw can be either aim or fdt: fdt case handled in files. aim only powerpc specific. dev/ofw/openfirm.c optional aim Modified: stable/10/sys/conf/files.sparc64 ============================================================================== --- stable/10/sys/conf/files.sparc64 Mon Aug 1 06:56:32 2016 (r303608) +++ stable/10/sys/conf/files.sparc64 Mon Aug 1 06:59:35 2016 (r303609) @@ -40,7 +40,6 @@ dev/fb/fb.c optional sc dev/fb/gallant12x22.c optional sc dev/fb/machfb.c optional machfb sc dev/hwpmc/hwpmc_sparc64.c optional hwpmc -dev/kbd/kbd.c optional atkbd | sc | ukbd | vt dev/le/if_le_lebuffer.c optional le sbus dev/le/if_le_ledma.c optional le sbus dev/le/lebuffer_sbus.c optional le sbus From owner-svn-src-stable-10@freebsd.org Mon Aug 1 16:16:49 2016 Return-Path: Delivered-To: svn-src-stable-10@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 E9D23BAA0D3; Mon, 1 Aug 2016 16:16:49 +0000 (UTC) (envelope-from emaste@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 AA01B13E6; Mon, 1 Aug 2016 16:16:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u71GGmDt079171; Mon, 1 Aug 2016 16:16:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u71GGmh9079170; Mon, 1 Aug 2016 16:16:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201608011616.u71GGmh9079170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 1 Aug 2016 16:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303618 - stable/10/contrib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 16:16:50 -0000 Author: emaste Date: Mon Aug 1 16:16:48 2016 New Revision: 303618 URL: https://svnweb.freebsd.org/changeset/base/303618 Log: MFC r303400: libcxxrt: fix demangling of wchar_t 'wchar_t' is 7 characters long, not 6. r303297 fixed this (in head) in libelftc, but not the second copy of this file that we have in libcxxrt. PR: 208661 Modified: stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c ============================================================================== --- stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Mon Aug 1 16:03:20 2016 (r303617) +++ stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Mon Aug 1 16:16:48 2016 (r303618) @@ -2842,7 +2842,7 @@ again: case 'w': /* wchar_t */ - if (!cpp_demangle_push_str(ddata, "wchar_t", 6)) + if (!cpp_demangle_push_str(ddata, "wchar_t", 7)) goto clean; ++ddata->cur; goto rtn; From owner-svn-src-stable-10@freebsd.org Mon Aug 1 19:53:19 2016 Return-Path: Delivered-To: svn-src-stable-10@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 D65C0BABBB8; Mon, 1 Aug 2016 19:53:19 +0000 (UTC) (envelope-from emaste@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 A1C2C1985; Mon, 1 Aug 2016 19:53:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u71JrIHP062439; Mon, 1 Aug 2016 19:53:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u71JrIvm062438; Mon, 1 Aug 2016 19:53:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201608011953.u71JrIvm062438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 1 Aug 2016 19:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303633 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 19:53:19 -0000 Author: emaste Date: Mon Aug 1 19:53:18 2016 New Revision: 303633 URL: https://svnweb.freebsd.org/changeset/base/303633 Log: MFC r303338: vt: lock Giant around kbd calls in CONS_GETINFO Note that keyboards are stored in an array and are not freed (just "unregistered" by clearing some fields) so a race would be limited to obtaining stale information about an unregistered keyboard. Reported by: CTurt Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon Aug 1 19:50:28 2016 (r303632) +++ stable/10/sys/dev/vt/vt_core.c Mon Aug 1 19:53:18 2016 (r303633) @@ -2183,9 +2183,11 @@ skip_thunk: return (EINVAL); if (vw == vd->vd_curwindow) { + mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); if (kbd != NULL) vt_save_kbd_state(vw, kbd); + mtx_unlock(&Giant); } vi->m_num = vd->vd_curwindow->vw_number + 1; From owner-svn-src-stable-10@freebsd.org Tue Aug 2 15:44:50 2016 Return-Path: Delivered-To: svn-src-stable-10@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 54E97BACFF5; Tue, 2 Aug 2016 15:44:50 +0000 (UTC) (envelope-from sbruno@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 275B61385; Tue, 2 Aug 2016 15:44:50 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u72Finp7003016; Tue, 2 Aug 2016 15:44:49 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u72FinBE003015; Tue, 2 Aug 2016 15:44:49 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201608021544.u72FinBE003015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 2 Aug 2016 15:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303665 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 15:44:50 -0000 Author: sbruno Date: Tue Aug 2 15:44:49 2016 New Revision: 303665 URL: https://svnweb.freebsd.org/changeset/base/303665 Log: MFC r303638 Unbreak NETMAP usage with em(4) broken in r293331. Modified: stable/10/sys/dev/e1000/if_em.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Tue Aug 2 15:43:18 2016 (r303664) +++ stable/10/sys/dev/e1000/if_em.c Tue Aug 2 15:44:49 2016 (r303665) @@ -4437,6 +4437,7 @@ em_setup_receive_ring(struct rx_ring *rx addr = PNMB(na, slot + si, &paddr); netmap_load_map(na, rxr->rxtag, rxbuf->map, addr); + rxbuf->paddr = paddr; em_setup_rxdesc(&rxr->rx_base[j], rxbuf); continue; } From owner-svn-src-stable-10@freebsd.org Tue Aug 2 21:17:35 2016 Return-Path: Delivered-To: svn-src-stable-10@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 9E714BAD269; Tue, 2 Aug 2016 21:17:35 +0000 (UTC) (envelope-from markj@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 71142181E; Tue, 2 Aug 2016 21:17:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u72LHYBZ025880; Tue, 2 Aug 2016 21:17:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u72LHYII025879; Tue, 2 Aug 2016 21:17:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608022117.u72LHYII025879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Aug 2016 21:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303680 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 21:17:35 -0000 Author: markj Date: Tue Aug 2 21:17:34 2016 New Revision: 303680 URL: https://svnweb.freebsd.org/changeset/base/303680 Log: MFC r301710: Fix an infinite loop in setnetgrent(3) with NIS netgroups. Modified: stable/10/lib/libc/gen/getnetgrent.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/getnetgrent.c ============================================================================== --- stable/10/lib/libc/gen/getnetgrent.c Tue Aug 2 20:56:00 2016 (r303679) +++ stable/10/lib/libc/gen/getnetgrent.c Tue Aug 2 21:17:34 2016 (r303680) @@ -559,6 +559,10 @@ read_for_group(const char *group) continue; } } + if (strlen(result) == 0) { + free(result); + return (NULL); + } snprintf(line, LINSIZ, "%s %s", group, result); free(result); } From owner-svn-src-stable-10@freebsd.org Tue Aug 2 22:33:31 2016 Return-Path: Delivered-To: svn-src-stable-10@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 2DF9BBABA63; Tue, 2 Aug 2016 22:33:31 +0000 (UTC) (envelope-from mr@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 EFE8E1572; Tue, 2 Aug 2016 22:33:30 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u72MXU96055073; Tue, 2 Aug 2016 22:33:30 GMT (envelope-from mr@FreeBSD.org) Received: (from mr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u72MXT6c055066; Tue, 2 Aug 2016 22:33:29 GMT (envelope-from mr@FreeBSD.org) Message-Id: <201608022233.u72MXT6c055066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mr set sender to mr@FreeBSD.org using -f From: Michael Reifenberger Date: Tue, 2 Aug 2016 22:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303684 - stable/10/usr.bin/systat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 22:33:31 -0000 Author: mr Date: Tue Aug 2 22:33:29 2016 New Revision: 303684 URL: https://svnweb.freebsd.org/changeset/base/303684 Log: MFC r288306 Add support to systat to display zfs arc cache status/info Added: stable/10/usr.bin/systat/zarc.c - copied unchanged from r288306, head/usr.bin/systat/zarc.c Modified: stable/10/usr.bin/systat/Makefile stable/10/usr.bin/systat/cmdtab.c stable/10/usr.bin/systat/extern.h stable/10/usr.bin/systat/main.c stable/10/usr.bin/systat/systat.1 stable/10/usr.bin/systat/systat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/systat/Makefile ============================================================================== --- stable/10/usr.bin/systat/Makefile Tue Aug 2 21:55:23 2016 (r303683) +++ stable/10/usr.bin/systat/Makefile Tue Aug 2 22:33:29 2016 (r303684) @@ -6,7 +6,7 @@ PROG= systat SRCS= cmds.c cmdtab.c devs.c fetch.c iostat.c keyboard.c main.c \ netcmds.c netstat.c pigs.c swap.c icmp.c \ - mode.c ip.c sctp.c tcp.c \ + mode.c ip.c sctp.c tcp.c zarc.c \ vmstat.c convtbl.c ifcmds.c ifstat.c .if ${MK_INET6_SUPPORT} != "no" Modified: stable/10/usr.bin/systat/cmdtab.c ============================================================================== --- stable/10/usr.bin/systat/cmdtab.c Tue Aug 2 21:55:23 2016 (r303683) +++ stable/10/usr.bin/systat/cmdtab.c Tue Aug 2 22:33:29 2016 (r303684) @@ -78,6 +78,9 @@ struct cmdtab cmdtab[] = { { "ifstat", showifstat, fetchifstat, labelifstat, initifstat, openifstat, closeifstat, cmdifstat, 0, CF_LOADAV }, + { "zarc", showzarc, fetchzarc, labelzarc, + initzarc, openzarc, closezarc, 0, + resetzarc, CF_ZFSARC }, { NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0 } }; struct cmdtab *curcmd = &cmdtab[0]; Modified: stable/10/usr.bin/systat/extern.h ============================================================================== --- stable/10/usr.bin/systat/extern.h Tue Aug 2 21:55:23 2016 (r303683) +++ stable/10/usr.bin/systat/extern.h Tue Aug 2 22:33:29 2016 (r303684) @@ -173,4 +173,5 @@ char *sysctl_dynread(const char *, size_ void reset ## name(void); \ void show ## name(void) +SYSTAT_CMD( zarc ); SYSTAT_CMD ( sctp ); Modified: stable/10/usr.bin/systat/main.c ============================================================================== --- stable/10/usr.bin/systat/main.c Tue Aug 2 21:55:23 2016 (r303683) +++ stable/10/usr.bin/systat/main.c Tue Aug 2 22:33:29 2016 (r303684) @@ -188,6 +188,11 @@ labels(void) "/0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10"); mvaddstr(1, 5, "Load Average"); } + if (curcmd->c_flags & CF_ZFSARC) { + mvaddstr(0, 20, + " Total MFU MRU Anon Hdr L2Hdr Other"); + mvaddstr(1, 5, "ZFS ARC "); + } (*curcmd->c_label)(); #ifdef notdef mvprintw(21, 25, "CPU usage on %s", hostname); @@ -221,8 +226,33 @@ display(void) if (j > 50) wprintw(wload, " %4.1f", avenrun[0]); } + if (curcmd->c_flags & CF_ZFSARC) { + uint64_t arc[7] = {}; + size_t size = sizeof(arc[0]); + if (sysctlbyname("kstat.zfs.misc.arcstats.size", + &arc[0], &size, NULL, 0) == 0 ) { + GETSYSCTL("vfs.zfs.mfu_size", arc[1]); + GETSYSCTL("vfs.zfs.mru_size", arc[2]); + GETSYSCTL("vfs.zfs.anon_size", arc[3]); + GETSYSCTL("kstat.zfs.misc.arcstats.hdr_size", arc[4]); + GETSYSCTL("kstat.zfs.misc.arcstats.l2_hdr_size", arc[5]); + GETSYSCTL("kstat.zfs.misc.arcstats.other_size", arc[6]); + wmove(wload, 0, 0); wclrtoeol(wload); + for (i = 0 ; i < sizeof(arc) / sizeof(arc[0]) ; i++) { + if (arc[i] > 10llu * 1024 * 1024 * 1024 ) { + wprintw(wload, "%7lluG", arc[i] >> 30); + } + else if (arc[i] > 10 * 1024 * 1024 ) { + wprintw(wload, "%7lluM", arc[i] >> 20); + } + else { + wprintw(wload, "%7lluK", arc[i] >> 10); + } + } + } + } (*curcmd->c_refresh)(); - if (curcmd->c_flags & CF_LOADAV) + if (curcmd->c_flags & (CF_LOADAV |CF_ZFSARC)) wrefresh(wload); wrefresh(wnd); move(CMDLINE, col); Modified: stable/10/usr.bin/systat/systat.1 ============================================================================== --- stable/10/usr.bin/systat/systat.1 Tue Aug 2 21:55:23 2016 (r303683) +++ stable/10/usr.bin/systat/systat.1 Tue Aug 2 22:33:29 2016 (r303684) @@ -98,8 +98,9 @@ to be one of: .Ic sctp , .Ic swap , .Ic tcp , +.Ic vmstat , or -.Ic vmstat . +.Ic zarc , These displays can also be requested interactively (without the .Dq Fl ) and are described in @@ -430,6 +431,8 @@ Display statistics averaged over the ref .It Cm zero Reset running statistics to zero. .El +.It Ic zarc +display arc cache usage and hit/miss statistics. .It Ic netstat Display, in the lower window, network connections. By default, Modified: stable/10/usr.bin/systat/systat.h ============================================================================== --- stable/10/usr.bin/systat/systat.h Tue Aug 2 21:55:23 2016 (r303683) +++ stable/10/usr.bin/systat/systat.h Tue Aug 2 22:33:29 2016 (r303684) @@ -54,6 +54,7 @@ extern int use_kvm; #define CF_INIT 0x1 /* been initialized */ #define CF_LOADAV 0x2 /* display w/ load average */ +#define CF_ZFSARC 0x4 /* display w/ ZFS cache usage */ #define TCP 0x1 #define UDP 0x2 Copied: stable/10/usr.bin/systat/zarc.c (from r288306, head/usr.bin/systat/zarc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/systat/zarc.c Tue Aug 2 22:33:29 2016 (r303684, copy of r288306, head/usr.bin/systat/zarc.c) @@ -0,0 +1,221 @@ +/*- + * Copyright (c) 2014 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include + +#include "systat.h" +#include "extern.h" + +struct zfield{ + uint64_t arcstats; + uint64_t arcstats_demand_data; + uint64_t arcstats_demand_metadata; + uint64_t arcstats_prefetch_data; + uint64_t arcstats_prefetch_metadata; + uint64_t zfetchstats; + uint64_t arcstats_l2; + uint64_t vdev_cache_stats; +}; + +static struct zarcstats { + struct zfield hits; + struct zfield misses; +} curstat, initstat, oldstat; + +static void +getinfo(struct zarcstats *ls); + +WINDOW * +openzarc(void) +{ + return (subwin(stdscr, LINES-3-1, 0, MAINWIN_ROW, 0)); +} + +void +closezarc(WINDOW *w) +{ + if (w == NULL) + return; + wclear(w); + wrefresh(w); + delwin(w); +} + +void +labelzarc(void) +{ + wmove(wnd, 0, 0); wclrtoeol(wnd); + mvwprintw(wnd, 0, 31+1, "%4.4s %7.7s %7.7s %12.12s %12.12s", + "rate", "hits", "misses", "total hits", "total misses"); +#define L(row, str) mvwprintw(wnd, row, 5, str); \ + mvwprintw(wnd, row, 31, ":"); \ + mvwprintw(wnd, row, 31+4, "%%") + L(1, "arcstats"); + L(2, "arcstats.demand_data"); + L(3, "arcstats.demand_metadata"); + L(4, "arcstats.prefetch_data"); + L(5, "arcstats.prefetch_metadata"); + L(6, "zfetchstats"); + L(7, "arcstats.l2"); + L(8, "vdev_cache_stats"); +#undef L +} + +static int calc(uint64_t hits, uint64_t misses) +{ + if( hits ) + return 100 * hits / ( hits + misses ); + else + return 0; +} + +static void +domode(struct zarcstats *delta, struct zarcstats *rate) +{ +#define DO(stat) \ + delta->hits.stat = (curstat.hits.stat - oldstat.hits.stat); \ + delta->misses.stat = (curstat.misses.stat - oldstat.misses.stat); \ + rate->hits.stat = calc(delta->hits.stat, delta->misses.stat) + DO(arcstats); + DO(arcstats_demand_data); + DO(arcstats_demand_metadata); + DO(arcstats_prefetch_data); + DO(arcstats_prefetch_metadata); + DO(zfetchstats); + DO(arcstats_l2); + DO(vdev_cache_stats); + DO(arcstats); + DO(arcstats_demand_data); + DO(arcstats_demand_metadata); + DO(arcstats_prefetch_data); + DO(arcstats_prefetch_metadata); + DO(zfetchstats); + DO(arcstats_l2); + DO(vdev_cache_stats); +#undef DO +} + +void +showzarc(void) +{ + struct zarcstats delta, rate; + + memset(&delta, 0, sizeof delta); + memset(&rate, 0, sizeof rate); + + domode(&delta, &rate); + +#define DO(stat, row, col, fmt) \ + mvwprintw(wnd, row, col, fmt, stat) +#define R(row, stat) DO(rate.hits.stat, row, 31+1, "%3lu") +#define H(row, stat) DO(delta.hits.stat, row, 31+1+5, "%7lu"); \ + DO(curstat.hits.stat, row, 31+1+5+8+8, "%12lu") +#define M(row, stat) DO(delta.misses.stat, row, 31+1+5+8, "%7lu"); \ + DO(curstat.misses.stat, row, 31+1+5+8+8+13, "%12lu") +#define E(row, stat) R(row, stat); H(row, stat); M(row, stat); + E(1, arcstats); + E(2, arcstats_demand_data); + E(3, arcstats_demand_metadata); + E(4, arcstats_prefetch_data); + E(5, arcstats_prefetch_metadata); + E(6, zfetchstats); + E(7, arcstats_l2); + E(8, vdev_cache_stats); +#undef DO +#undef E +#undef M +#undef H +#undef R +} + +int +initzarc(void) +{ + getinfo(&initstat); + curstat = oldstat = initstat; + return 1; +} + +void +resetzarc(void) +{ + initzarc(); +} + +static void +getinfo(struct zarcstats *ls) +{ + size_t size = sizeof( ls->hits.arcstats ); + if ( sysctlbyname("kstat.zfs.misc.arcstats.hits", + &ls->hits.arcstats, &size, NULL, 0 ) != 0 ) + return; + GETSYSCTL("kstat.zfs.misc.arcstats.misses", + ls->misses.arcstats); + GETSYSCTL("kstat.zfs.misc.arcstats.demand_data_hits", + ls->hits.arcstats_demand_data); + GETSYSCTL("kstat.zfs.misc.arcstats.demand_data_misses", + ls->misses.arcstats_demand_data); + GETSYSCTL("kstat.zfs.misc.arcstats.demand_metadata_hits", + ls->hits.arcstats_demand_metadata); + GETSYSCTL("kstat.zfs.misc.arcstats.demand_metadata_misses", + ls->misses.arcstats_demand_metadata); + GETSYSCTL("kstat.zfs.misc.arcstats.prefetch_data_hits", + ls->hits.arcstats_prefetch_data); + GETSYSCTL("kstat.zfs.misc.arcstats.prefetch_data_misses", + ls->misses.arcstats_prefetch_data); + GETSYSCTL("kstat.zfs.misc.arcstats.prefetch_metadata_hits", + ls->hits.arcstats_prefetch_metadata); + GETSYSCTL("kstat.zfs.misc.arcstats.prefetch_metadata_misses", + ls->misses.arcstats_prefetch_metadata); + GETSYSCTL("kstat.zfs.misc.zfetchstats.hits", + ls->hits.zfetchstats); + GETSYSCTL("kstat.zfs.misc.zfetchstats.misses", + ls->misses.zfetchstats); + GETSYSCTL("kstat.zfs.misc.arcstats.l2_hits", + ls->hits.arcstats_l2); + GETSYSCTL("kstat.zfs.misc.arcstats.l2_misses", + ls->misses.arcstats_l2); + GETSYSCTL("kstat.zfs.misc.vdev_cache_stats.hits", + ls->hits.vdev_cache_stats); + GETSYSCTL("kstat.zfs.misc.vdev_cache_stats.misses", + ls->misses.vdev_cache_stats); +} + +void +fetchzarc(void) +{ + oldstat = curstat; + getinfo(&curstat); +} From owner-svn-src-stable-10@freebsd.org Wed Aug 3 01:19:12 2016 Return-Path: Delivered-To: svn-src-stable-10@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 1BC5BBA5DEC; Wed, 3 Aug 2016 01:19:12 +0000 (UTC) (envelope-from ngie@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 E792D1BEB; Wed, 3 Aug 2016 01:19:11 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u731JBGr014930; Wed, 3 Aug 2016 01:19:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u731JApj014926; Wed, 3 Aug 2016 01:19:10 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201608030119.u731JApj014926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 3 Aug 2016 01:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303692 - stable/10/sys/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2016 01:19:12 -0000 Author: ngie Date: Wed Aug 3 01:19:10 2016 New Revision: 303692 URL: https://svnweb.freebsd.org/changeset/base/303692 Log: MFstable/11 r303691: MFC r302550,r302551,r302552,r302553: r302550: Deobfuscate cleanup path in clnt_dg_create(..) Similar to r300836 and r301800, cl and cu will always be non-NULL as they're allocated using the mem_alloc routines, which always use `malloc(..., M_WAITOK)`. Deobfuscating the cleanup path fixes a leak where if cl was NULL and cu was not, cu would not be free'd, and also removes a duplicate test for cl not being NULL. CID: 1007033, 1007344 r302551: Deobfuscate cleanup path in clnt_vc_create(..) Similar to r300836, r301800, and r302550, cl and ct will always be non-NULL as they're allocated using the mem_alloc routines, which always use `malloc(..., M_WAITOK)`. CID: 1007342 r302552: Convert `svc_xprt_alloc(..)` and `svc_xprt_free(..)`'s prototypes to ANSI C style prototypes r302553: Don't test for xpt not being NULL before calling svc_xprt_free(..) svc_xprt_alloc(..) will always return initialized memory as it uses mem_alloc(..) under the covers, which uses malloc(.., M_WAITOK, ..). CID: 1007341 Modified: stable/10/sys/rpc/clnt_dg.c stable/10/sys/rpc/clnt_vc.c stable/10/sys/rpc/svc.c stable/10/sys/rpc/svc_dg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/rpc/clnt_dg.c ============================================================================== --- stable/10/sys/rpc/clnt_dg.c Wed Aug 3 01:06:51 2016 (r303691) +++ stable/10/sys/rpc/clnt_dg.c Wed Aug 3 01:19:10 2016 (r303692) @@ -313,11 +313,9 @@ recheck_socket: cl->cl_netid = NULL; return (cl); err2: - if (cl) { - mem_free(cl, sizeof (CLIENT)); - if (cu) - mem_free(cu, sizeof (*cu)); - } + mem_free(cl, sizeof (CLIENT)); + mem_free(cu, sizeof (*cu)); + return (NULL); } Modified: stable/10/sys/rpc/clnt_vc.c ============================================================================== --- stable/10/sys/rpc/clnt_vc.c Wed Aug 3 01:06:51 2016 (r303691) +++ stable/10/sys/rpc/clnt_vc.c Wed Aug 3 01:19:10 2016 (r303692) @@ -270,12 +270,10 @@ clnt_vc_create( return (cl); err: - if (ct) { - mtx_destroy(&ct->ct_lock); - mem_free(ct, sizeof (struct ct_data)); - } - if (cl) - mem_free(cl, sizeof (CLIENT)); + mtx_destroy(&ct->ct_lock); + mem_free(ct, sizeof (struct ct_data)); + mem_free(cl, sizeof (CLIENT)); + return ((CLIENT *)NULL); } Modified: stable/10/sys/rpc/svc.c ============================================================================== --- stable/10/sys/rpc/svc.c Wed Aug 3 01:06:51 2016 (r303691) +++ stable/10/sys/rpc/svc.c Wed Aug 3 01:19:10 2016 (r303692) @@ -841,7 +841,7 @@ svcerr_progvers(struct svc_req *rqstp, r * parameters. */ SVCXPRT * -svc_xprt_alloc() +svc_xprt_alloc(void) { SVCXPRT *xprt; SVCXPRT_EXT *ext; @@ -858,8 +858,7 @@ svc_xprt_alloc() * Free a server transport structure. */ void -svc_xprt_free(xprt) - SVCXPRT *xprt; +svc_xprt_free(SVCXPRT *xprt) { mem_free(xprt->xp_p3, sizeof(SVCXPRT_EXT)); Modified: stable/10/sys/rpc/svc_dg.c ============================================================================== --- stable/10/sys/rpc/svc_dg.c Wed Aug 3 01:06:51 2016 (r303691) +++ stable/10/sys/rpc/svc_dg.c Wed Aug 3 01:19:10 2016 (r303692) @@ -142,9 +142,8 @@ svc_dg_create(SVCPOOL *pool, struct sock return (xprt); freedata: (void) printf(svc_dg_str, __no_mem_str); - if (xprt) { - svc_xprt_free(xprt); - } + svc_xprt_free(xprt); + return (NULL); } From owner-svn-src-stable-10@freebsd.org Wed Aug 3 01:25:46 2016 Return-Path: Delivered-To: svn-src-stable-10@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 1ADE1BAC0D4; Wed, 3 Aug 2016 01:25:46 +0000 (UTC) (envelope-from ngie@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 DDEA1131A; Wed, 3 Aug 2016 01:25:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u731PjhJ018645; Wed, 3 Aug 2016 01:25:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u731PjpA018644; Wed, 3 Aug 2016 01:25:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201608030125.u731PjpA018644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 3 Aug 2016 01:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303694 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2016 01:25:46 -0000 Author: ngie Date: Wed Aug 3 01:25:44 2016 New Revision: 303694 URL: https://svnweb.freebsd.org/changeset/base/303694 Log: MFC r302330: Remove ftp(1) related files when MK_FTP == no Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 3 01:22:11 2016 (r303693) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Aug 3 01:25:44 2016 (r303694) @@ -873,6 +873,20 @@ OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz .endif +.if ${MK_FTP} == no +OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=usr/bin/ftp +OLD_FILES+=usr/bin/gate-ftp +OLD_FILES+=usr/bin/pftp +OLD_FILES+=usr/libexec/ftpd +OLD_FILES+=usr/share/man/man1/ftp.1.gz +OLD_FILES+=usr/share/man/man1/gate-ftp.1.gz +OLD_FILES+=usr/share/man/man1/pftp.1.gz +OLD_FILES+=usr/share/man/man5/ftpchroot.5.gz +OLD_FILES+=usr/share/man/man8/ftpd.8.gz +.endif + .if ${MK_GNUCXX} == no OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/include/c++/4.2/algorithm From owner-svn-src-stable-10@freebsd.org Wed Aug 3 10:23:43 2016 Return-Path: Delivered-To: svn-src-stable-10@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 D38DDBAD160; Wed, 3 Aug 2016 10:23:43 +0000 (UTC) (envelope-from kib@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 82B231CE0; Wed, 3 Aug 2016 10:23:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u73ANgiL019090; Wed, 3 Aug 2016 10:23:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u73ANgdF019087; Wed, 3 Aug 2016 10:23:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201608031023.u73ANgdF019087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Aug 2016 10:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303709 - stable/10/lib/libthr/thread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2016 10:23:43 -0000 Author: kib Date: Wed Aug 3 10:23:42 2016 New Revision: 303709 URL: https://svnweb.freebsd.org/changeset/base/303709 Log: MFC r303393: Remove empty initializer for the once facility. Modified: stable/10/lib/libthr/thread/thr_init.c stable/10/lib/libthr/thread/thr_once.c stable/10/lib/libthr/thread/thr_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_init.c ============================================================================== --- stable/10/lib/libthr/thread/thr_init.c Wed Aug 3 10:18:52 2016 (r303708) +++ stable/10/lib/libthr/thread/thr_init.c Wed Aug 3 10:23:42 2016 (r303709) @@ -438,7 +438,6 @@ init_private(void) _thr_urwlock_init(&_thr_atfork_lock); _thr_umutex_init(&_thr_event_lock); _thr_umutex_init(&_suspend_all_lock); - _thr_once_init(); _thr_spinlock_init(); _thr_list_init(); _thr_wake_addr_init(); Modified: stable/10/lib/libthr/thread/thr_once.c ============================================================================== --- stable/10/lib/libthr/thread/thr_once.c Wed Aug 3 10:18:52 2016 (r303708) +++ stable/10/lib/libthr/thread/thr_once.c Wed Aug 3 10:23:42 2016 (r303709) @@ -92,8 +92,3 @@ _pthread_once(pthread_once_t *once_contr _thr_umtx_wake(&once_control->state, INT_MAX, 0); return (0); } - -void -_thr_once_init() -{ -} Modified: stable/10/lib/libthr/thread/thr_private.h ============================================================================== --- stable/10/lib/libthr/thread/thr_private.h Wed Aug 3 10:18:52 2016 (r303708) +++ stable/10/lib/libthr/thread/thr_private.h Wed Aug 3 10:23:42 2016 (r303709) @@ -773,7 +773,6 @@ void _thr_link(struct pthread *, struct void _thr_unlink(struct pthread *, struct pthread *) __hidden; void _thr_assert_lock_level(void) __hidden __dead2; void _thr_ast(struct pthread *) __hidden; -void _thr_once_init(void) __hidden; void _thr_report_creation(struct pthread *curthread, struct pthread *newthread) __hidden; void _thr_report_death(struct pthread *curthread) __hidden; From owner-svn-src-stable-10@freebsd.org Fri Aug 5 17:13:27 2016 Return-Path: Delivered-To: svn-src-stable-10@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 7F741BB0EA8; Fri, 5 Aug 2016 17:13:27 +0000 (UTC) (envelope-from jhb@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 36E901BA6; Fri, 5 Aug 2016 17:13:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u75HDQYw060413; Fri, 5 Aug 2016 17:13:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u75HDQe8060409; Fri, 5 Aug 2016 17:13:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201608051713.u75HDQe8060409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Aug 2016 17:13:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303776 - in stable/10/sys: amd64/include i386/include x86/x86 x86/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2016 17:13:27 -0000 Author: jhb Date: Fri Aug 5 17:13:25 2016 New Revision: 303776 URL: https://svnweb.freebsd.org/changeset/base/303776 Log: MFC 302181,302635: Disable MSI-X migration on older Xen hypervisors. 302181: Add a tunable to disable migration of MSI-X interrupts. The new 'machdep.disable_msix_migration' tunable can be set to 1 to disable migration of MSI-X interrupts. Xen versions prior to 4.6.0 do not properly handle updates to MSI-X table entries after the initial write. In particular, the operation to unmask a table entry after updating it during migration is not propagated to the "real" table for passthrough devices causing the interrupt to remain masked. At least some systems in EC2 are affected by this bug when using SRIOV. The tunable can be set in loader.conf as a workaround. 302635: xen: automatically disable MSI-X interrupt migration If the hypervisor version is smaller than 4.6.0. Xen commits 74fd00 and 70a3cb are required on the hypervisor side for this to be fixed, and those are only included in 4.6.0, so stay on the safe side and disable MSI-X interrupt migration on anything older than 4.6.0. It should not cause major performance degradation unless a lot of MSI-X interrupts are allocated. Modified: stable/10/sys/amd64/include/intr_machdep.h stable/10/sys/i386/include/intr_machdep.h stable/10/sys/x86/x86/msi.c stable/10/sys/x86/xen/hvm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/intr_machdep.h ============================================================================== --- stable/10/sys/amd64/include/intr_machdep.h Fri Aug 5 16:53:24 2016 (r303775) +++ stable/10/sys/amd64/include/intr_machdep.h Fri Aug 5 17:13:25 2016 (r303776) @@ -144,6 +144,8 @@ struct nmi_pcpu { extern struct mtx icu_lock; extern int elcr_found; +extern int msix_disable_migration; + #ifndef DEV_ATPIC void atpic_reset(void); #endif Modified: stable/10/sys/i386/include/intr_machdep.h ============================================================================== --- stable/10/sys/i386/include/intr_machdep.h Fri Aug 5 16:53:24 2016 (r303775) +++ stable/10/sys/i386/include/intr_machdep.h Fri Aug 5 17:13:25 2016 (r303776) @@ -141,6 +141,8 @@ struct trapframe; extern struct mtx icu_lock; extern int elcr_found; +extern int msix_disable_migration; + #ifndef DEV_ATPIC void atpic_reset(void); #endif Modified: stable/10/sys/x86/x86/msi.c ============================================================================== --- stable/10/sys/x86/x86/msi.c Fri Aug 5 16:53:24 2016 (r303775) +++ stable/10/sys/x86/x86/msi.c Fri Aug 5 17:13:25 2016 (r303776) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -134,6 +135,20 @@ struct pic msi_pic = { msi_enable_source msi_source_pending, NULL, NULL, msi_config_intr, msi_assign_cpu }; +/** + * Xen hypervisors prior to 4.6.0 do not properly handle updates to + * enabled MSI-X table entries. Allow migration of MSI-X interrupts + * to be disabled via a tunable. Values have the following meaning: + * + * -1: automatic detection by FreeBSD + * 0: enable migration + * 1: disable migration + */ +int msix_disable_migration = -1; +SYSCTL_INT(_machdep, OID_AUTO, disable_msix_migration, CTLFLAG_RDTUN, + &msix_disable_migration, 0, + "Disable migration of MSI-X interrupts between CPUs"); + static int msi_enabled; static int msi_last_irq; static struct mtx msi_lock; @@ -212,6 +227,9 @@ msi_assign_cpu(struct intsrc *isrc, u_in if (msi->msi_first != msi) return (EINVAL); + if (msix_disable_migration && msi->msi_msix) + return (EINVAL); + /* Store information to free existing irq. */ old_vector = msi->msi_vector; old_id = msi->msi_cpu; @@ -284,6 +302,11 @@ msi_init(void) return; } + if (msix_disable_migration == -1) { + /* The default is to allow migration of MSI-X interrupts. */ + msix_disable_migration = 0; + } + msi_enabled = 1; intr_register_pic(&msi_pic); mtx_init(&msi_lock, "msi", NULL, MTX_DEF); Modified: stable/10/sys/x86/xen/hvm.c ============================================================================== --- stable/10/sys/x86/xen/hvm.c Fri Aug 5 16:53:24 2016 (r303775) +++ stable/10/sys/x86/xen/hvm.c Fri Aug 5 17:13:25 2016 (r303776) @@ -385,9 +385,29 @@ xen_hvm_init_hypercall_stubs(void) return (ENXIO); if (hypercall_stubs == NULL) { + int major, minor; + do_cpuid(base + 1, regs); - printf("XEN: Hypervisor version %d.%d detected.\n", - regs[0] >> 16, regs[0] & 0xffff); + + major = regs[0] >> 16; + minor = regs[0] & 0xffff; + printf("XEN: Hypervisor version %d.%d detected.\n", major, + minor); + + if (((major < 4) || (major == 4 && minor <= 5)) && + msix_disable_migration == -1) { + /* + * Xen hypervisors prior to 4.6.0 do not properly + * handle updates to enabled MSI-X table entries, + * so disable MSI-X interrupt migration in that + * case. + */ + if (bootverbose) + printf( +"Disabling MSI-X interrupt migration due to Xen hypervisor bug.\n" +"Set machdep.msix_disable_migration=0 to forcefully enable it.\n"); + msix_disable_migration = 1; + } } /* From owner-svn-src-stable-10@freebsd.org Sat Aug 6 08:23:37 2016 Return-Path: Delivered-To: svn-src-stable-10@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 39C10BB070F; Sat, 6 Aug 2016 08:23:37 +0000 (UTC) (envelope-from kib@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 0C219150C; Sat, 6 Aug 2016 08:23:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u768Naj4000309; Sat, 6 Aug 2016 08:23:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u768NabA000308; Sat, 6 Aug 2016 08:23:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201608060823.u768NabA000308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Aug 2016 08:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303790 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2016 08:23:37 -0000 Author: kib Date: Sat Aug 6 08:23:36 2016 New Revision: 303790 URL: https://svnweb.freebsd.org/changeset/base/303790 Log: MFC r303702: Remove mention of Giant from the fork_return() description. Modified: stable/10/sys/kern/kern_fork.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_fork.c ============================================================================== --- stable/10/sys/kern/kern_fork.c Sat Aug 6 08:20:58 2016 (r303789) +++ stable/10/sys/kern/kern_fork.c Sat Aug 6 08:23:36 2016 (r303790) @@ -1044,9 +1044,9 @@ fork_exit(void (*callout)(void *, struct /* * Simplified back end of syscall(), used when returning from fork() - * directly into user mode. Giant is not held on entry, and must not - * be held on return. This function is passed in to fork_exit() as the - * first parameter and is called when returning to a new userland process. + * directly into user mode. This function is passed in to fork_exit() + * as the first parameter and is called when returning to a new + * userland process. */ void fork_return(struct thread *td, struct trapframe *frame) From owner-svn-src-stable-10@freebsd.org Sat Aug 6 23:53:35 2016 Return-Path: Delivered-To: svn-src-stable-10@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 3DE3FBB0C3B; Sat, 6 Aug 2016 23:53:35 +0000 (UTC) (envelope-from jhb@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 E74AE19F0; Sat, 6 Aug 2016 23:53:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u76NrYLr044832; Sat, 6 Aug 2016 23:53:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u76NrY6k044831; Sat, 6 Aug 2016 23:53:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201608062353.u76NrY6k044831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Aug 2016 23:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r303808 - in stable: 10/sys/dev/fb 9/sys/dev/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2016 23:53:35 -0000 Author: jhb Date: Sat Aug 6 23:53:33 2016 New Revision: 303808 URL: https://svnweb.freebsd.org/changeset/base/303808 Log: MFC 303076,303225: Use MTX_SYSINIT for the VESA lock. 303076: vesa: fix panic on suspend Fix the following panic seen when migrating a FreeBSD guest on Xen: panic: mtx_lock() of destroyed mutex @ /usr/src/sys/dev/fb/vesa.c:541 cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe001d2fa4f0 vpanic() at vpanic+0x182/frame 0xfffffe001d2fa570 kassert_panic() at kassert_panic+0x126/frame 0xfffffe001d2fa5e0 __mtx_lock_flags() at __mtx_lock_flags+0x15b/frame 0xfffffe001d2fa630 vesa_bios_save_restore() at vesa_bios_save_restore+0x78/frame 0xfffffe001d2fa680 vga_suspend() at vga_suspend+0xa3/frame 0xfffffe001d2fa6b0 isavga_suspend() at isavga_suspend+0x1d/frame 0xfffffe001d2fa6d0 bus_generic_suspend_child() at bus_generic_suspend_child+0x44/frame [...] This is caused because vga_sub_configure (which is called if the VGA adapter is attached after VESA tried to initialize), points to vesa_configure, which doesn't initialize the VESA mutex. In order to fix it, make sure vga_sub_configure points to vesa_load, so that all the needed vesa components are properly initialized. 303225: Use MTX_SYSINIT for the VESA lock. vesa_init_done isn't a reliable guard for the mutex init. If vesa_configure() doesn't find valid VESA info it will not set vesa_init_done, but the lock will remain initialized. Revert r303076 and use MTX_SYSINIT to deterministically init the lock. PR: 209203 Modified: stable/10/sys/dev/fb/vesa.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/fb/vesa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/fb/vesa.c ============================================================================== --- stable/10/sys/dev/fb/vesa.c Sat Aug 6 23:52:09 2016 (r303807) +++ stable/10/sys/dev/fb/vesa.c Sat Aug 6 23:53:33 2016 (r303808) @@ -79,6 +79,7 @@ struct adp_state { typedef struct adp_state adp_state_t; static struct mtx vesa_lock; +MTX_SYSINIT(vesa_lock, &vesa_lock, "VESA lock", MTX_DEF); static int vesa_state; static void *vesa_state_buf; @@ -1915,8 +1916,6 @@ vesa_load(void) if (vesa_init_done) return (0); - mtx_init(&vesa_lock, "VESA lock", NULL, MTX_DEF); - /* locate a VGA adapter */ vesa_adp = NULL; error = vesa_configure(0); @@ -1955,7 +1954,6 @@ vesa_unload(void) } vesa_bios_uninit(); - mtx_destroy(&vesa_lock); return (error); }