Re: [PATCH net-next 2/2] net:add socket option for low latencypolling
From: Eric Dumazet
Date: Tue Jun 11 2013 - 11:59:14 EST
On Tue, 2013-06-11 at 18:37 +0300, Eliezer Tamir wrote:
> On 11/06/2013 17:45, Eric Dumazet wrote:
> > On Tue, 2013-06-11 at 17:24 +0300, Eliezer Tamir wrote:
> >> adds a socket option for low latency polling.
> >> This allows overriding the global sysctl value with a per-socket one.
> >>
> >> Signed-off-by: Eliezer Tamir <eliezer.tamir@xxxxxxxxxxxxxxx>
> >> ---
> >>
> >>
> >> -static inline cycles_t ll_end_time(void)
> >> +static inline cycles_t ll_end_time(struct sock *sk)
> >> {
> >> - return TSC_MHZ * ACCESS_ONCE(sysctl_net_ll_poll) + get_cycles();
> >> + return TSC_MHZ * ACCESS_ONCE(sk->sk_ll_usec) + get_cycles();
> >> }
> >
> > Hmm, sk_ll_usec is an unsigned int.
>
> We changed it to an unsigned long in v7, I guess that was gratuitous.
> Re-reading your comments on v6 2/5 I realize a cast would have sufficed.
> Should I send a patch to revert it to an unsigned int?
One sysctl as unsigned long was not a big deal so I was ok with your
change ;)
unsigned int for sk_ll_usec is enough, but using a 32x32->64bit multiply
is probably safer.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/