Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/external/cddl/osnet/dist/uts/common/fs/zfs Pull up follow...



details:   https://anonhg.NetBSD.org/src/rev/e0c8d8981f70
branches:  netbsd-9
changeset: 961482:e0c8d8981f70
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 22 10:07:58 2021 +0000

description:
Pull up following revision(s) (requested by hannken in ticket #1250):

        external/cddl/osnet/dist/uts/common/fs/zfs/arc.c: revision 1.20

Prevent blocking l2arc_feed_thread() forever, skip the
cv_timedwait() for negative or zero ticks.

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/arc.c |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r a929193ee3d0 -r e0c8d8981f70 external/cddl/osnet/dist/uts/common/fs/zfs/arc.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c  Wed Apr 21 18:13:02 2021 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c  Thu Apr 22 10:07:58 2021 +0000
@@ -7246,8 +7246,15 @@
 
        while (l2arc_thread_exit == 0) {
                CALLB_CPR_SAFE_BEGIN(&cpr);
+#ifdef __NetBSD__
+               clock_t now = ddi_get_lbolt();
+               if (next > now)
+                       (void) cv_timedwait(&l2arc_feed_thr_cv,
+                           &l2arc_feed_thr_lock, next - now);
+#else
                (void) cv_timedwait(&l2arc_feed_thr_cv, &l2arc_feed_thr_lock,
                    next - ddi_get_lbolt());
+#endif
                CALLB_CPR_SAFE_END(&cpr, &l2arc_feed_thr_lock);
                next = ddi_get_lbolt() + hz;
 



Home | Main Index | Thread Index | Old Index