poll_table *wait;
        int retval, i, timed_out = 0;
        unsigned long slack = 0;
-       unsigned int ll_flag = POLL_LL;
+       unsigned int ll_flag = ll_get_flag();
        u64 ll_time = ll_end_time();
 
        rcu_read_lock();
                        break;
                }
 
-               if (can_ll && can_poll_ll(ll_time))
+               /* only if on, have sockets with POLL_LL and not out of time */
+               if (ll_flag && can_ll && can_poll_ll(ll_time))
                        continue;
 
                /*
        ktime_t expire, *to = NULL;
        int timed_out = 0, count = 0;
        unsigned long slack = 0;
-       unsigned int ll_flag = POLL_LL;
+       unsigned int ll_flag = ll_get_flag();
        u64 ll_time = ll_end_time();
 
        /* Optimise the no-wait case */
                if (count || timed_out)
                        break;
 
-               if (can_ll && can_poll_ll(ll_time))
+               /* only if on, have sockets with POLL_LL and not out of time */
+               if (ll_flag && can_ll && can_poll_ll(ll_time))
                        continue;
+
                /*
                 * If this is the first loop and we have a timeout
                 * given, then we convert to ktime_t and set the to
 
 #define LL_FLUSH_FAILED                -1
 #define LL_FLUSH_BUSY          -2
 
+static inline unsigned int ll_get_flag(void)
+{
+       return sysctl_net_ll_poll ? POLL_LL : 0;
+}
+
 /* a wrapper to make debug_smp_processor_id() happy
  * we can use sched_clock() because we don't care much about precision
  * we only care that the average is bounded
        return ((u64)ACCESS_ONCE(sk->sk_ll_usec) << 10) + ll_sched_clock();
 }
 
-/* in poll/select we use the global sysctl_net_ll_poll value */
+/* in poll/select we use the global sysctl_net_ll_poll value
+ * only call sched_clock() if enabled
+ */
 static inline u64 ll_end_time(void)
 {
-       return ((u64)ACCESS_ONCE(sysctl_net_ll_poll) << 10) + ll_sched_clock();
+       u64 end_time = ACCESS_ONCE(sysctl_net_ll_poll);
+
+       return end_time ? (end_time << 10) + ll_sched_clock() : 0;
 }
 
 static inline bool sk_valid_ll(struct sock *sk)
 }
 
 #else /* CONFIG_NET_LL_RX_POLL */
+static inline unsigned long ll_get_flag(void)
+{
+       return 0;
+}
 
 static inline u64 sk_ll_end_time(struct sock *sk)
 {