+ /*
+ * We'll retry here but it may be possible that we get
+ * into a retry "spin" inside the kernel and not allow
+ * threads, which need to run in order for the retry
+ * loop to end, to run. An example is an open of a
+ * terminal which is getting revoked and we spin here
+ * without yielding becasue namei and VNOP_OPEN are
+ * successful but vnode_ref fails. The revoke needs
+ * threads with an iocount to run but if spin here we
+ * may possibly be blcoking other threads from running.
+ *
+ * We start yielding the CPU after some number of
+ * retries for increasing durations. Note that this is
+ * still a loop without an exit condition.
+ */
+ nretries += 1;
+ if (nretries > RETRY_NO_YIELD_COUNT) {
+ /* Every hz/100 secs is 10 msecs ... */
+ tsleep(&nretries, PVFS, "vn_open_auth_retry",
+ MIN((nretries * (hz/100)), hz));
+ }