Date: Tue, 11 Aug 2015 09:18:51 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286623 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201508110918.t7B9IpGA039354@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Tue Aug 11 09:18:51 2015 New Revision: 286623 URL: https://svnweb.freebsd.org/changeset/base/286623 Log: Remove extra lock, that IMO only creates potential problems now. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 11 09:00:27 2015 (r286622) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 11 09:18:51 2015 (r286623) @@ -4773,7 +4773,6 @@ arc_tempreserve_space(uint64_t reserve, return (0); } -static kmutex_t arc_lowmem_lock; #ifdef _KERNEL static eventhandler_tag arc_event_lowmem = NULL; @@ -4781,8 +4780,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); @@ -4793,12 +4790,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 @@ -4809,7 +4803,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; @@ -5049,7 +5042,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508110918.t7B9IpGA039354>