From owner-svn-src-all@freebsd.org Sat Oct 3 07:49:17 2015 Return-Path: Delivered-To: svn-src-all@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 3D768A0F7F2; Sat, 3 Oct 2015 07:49:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 13E421ECD; Sat, 3 Oct 2015 07:49:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t937nGtU073868; Sat, 3 Oct 2015 07:49:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t937nGqT073867; Sat, 3 Oct 2015 07:49:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201510030749.t937nGqT073867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 3 Oct 2015 07:49:16 +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: r288561 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Oct 2015 07:49:17 -0000 Author: mav Date: Sat Oct 3 07:49:16 2015 New Revision: 288561 URL: https://svnweb.freebsd.org/changeset/base/288561 Log: MFC r286623: Remove extra lock, that IMO only creates potential problems now. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 3 07:48:25 2015 (r288560) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Oct 3 07:49:16 2015 (r288561) @@ -4776,7 +4776,6 @@ arc_tempreserve_space(uint64_t reserve, return (0); } -static kmutex_t arc_lowmem_lock; #ifdef _KERNEL static eventhandler_tag arc_event_lowmem = NULL; @@ -4784,8 +4783,6 @@ static void arc_lowmem(void *arg __unused, int howto __unused) { - /* Serialize access via arc_lowmem_lock. */ - mutex_enter(&arc_lowmem_lock); mutex_enter(&arc_reclaim_thr_lock); needfree = 1; DTRACE_PROBE(arc__needfree); @@ -4796,12 +4793,9 @@ arc_lowmem(void *arg __unused, int howto * here from ARC itself and may hold ARC locks and thus risk a deadlock * with ARC reclaim thread. */ - if (curproc == pageproc) { - while (needfree) - msleep(&needfree, &arc_reclaim_thr_lock, 0, "zfs:lowmem", 0); - } + if (curproc == pageproc) + msleep(&needfree, &arc_reclaim_thr_lock, 0, "zfs:lowmem", 0); mutex_exit(&arc_reclaim_thr_lock); - mutex_exit(&arc_lowmem_lock); } #endif @@ -4812,7 +4806,6 @@ arc_init(void) mutex_init(&arc_reclaim_thr_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&arc_reclaim_thr_cv, NULL, CV_DEFAULT, NULL); - mutex_init(&arc_lowmem_lock, NULL, MUTEX_DEFAULT, NULL); /* Convert seconds to clock ticks */ arc_min_prefetch_lifespan = 1 * hz; @@ -5052,7 +5045,6 @@ arc_fini(void) ASSERT0(arc_loaned_bytes); - mutex_destroy(&arc_lowmem_lock); #ifdef _KERNEL if (arc_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, arc_event_lowmem);