From owner-svn-src-head@freebsd.org Tue Feb 21 21:09:22 2017 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 6F706CE80D5; Tue, 21 Feb 2017 21:09:22 +0000 (UTC) (envelope-from avg@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 3C3201D6D; Tue, 21 Feb 2017 21:09:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1LL9LKo077635; Tue, 21 Feb 2017 21:09:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1LL9Lr5077634; Tue, 21 Feb 2017 21:09:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201702212109.v1LL9Lr5077634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 21 Feb 2017 21:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314058 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Tue, 21 Feb 2017 21:09:22 -0000 Author: avg Date: Tue Feb 21 21:09:21 2017 New Revision: 314058 URL: https://svnweb.freebsd.org/changeset/base/314058 Log: zfs: lower priority of zio_write_issue threads by four The difference of one was insignificant because zio_write_issue threads ended up on the same run queues as other zio threads. See sys/priority.h and sys/runq.h for more details. Add a comment describing FreeBSD priority considerations and restore the illumos variant of the code for comparison. Obtained from: Panzura MFC after: 2 weeks Sponsored by: Panzura Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Feb 21 21:06:12 2017 (r314057) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Feb 21 21:09:21 2017 (r314058) @@ -922,9 +922,17 @@ spa_taskqs_init(spa_t *spa, zio_type_t t * The write issue taskq can be extremely CPU * intensive. Run it at slightly lower priority * than the other taskqs. + * FreeBSD notes: + * - numerically higher priorities are lower priorities; + * - if priorities divided by four (RQ_PPQ) are equal + * then a difference between them is insignificant. */ if (t == ZIO_TYPE_WRITE && q == ZIO_TASKQ_ISSUE) - pri++; +#ifdef illumos + pri--; +#else + pri += 4; +#endif tq = taskq_create_proc(name, value, pri, 50, INT_MAX, spa->spa_proc, flags);