Search Linux Wireless

Re: [RFC v2] mac80211: implement eBDP algorithm to fight bufferbloat

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

 



On Fri, Feb 25, 2011 at 10:21 AM, Nathaniel Smith <njs@xxxxxxxxx> wrote:
> static u64 _ktime_diff_to_now_and_unstash(ktime_t then, int * enqueued) {
>
> Â Â Â Âtimespec ts_then = ktime_to_timespec(then);
> Â Â Â Âtimespec ts_now = ktime_to_timespec(ktime_get());
> Â Â Â Â*enqueued = ts_then.tv_sec >> LATENCY_BITS;
> Â Â Â Âts_then.tv_sec &= (1 << LATENCY_BITS) - 1;
> Â Â Â Âts_now.tv_sec &= (1 << LATENCY_BITS) - 1;
> Â Â Â Âif (ts_now.tv_sec < ts_then.tv_sec)
> Â Â Â Â Â Â Â Âts_now.tv_sec += (1 << LATENCY_BITS);
> Â Â Â Â timespec_sub(ts_now, ts_then);
> }

Err, plus the 'return timespec_to_ns(...)' on the last line, that I
was trying to add when my computer suddenly decided I wanted to send
the message. How embarrassing.

Anyway, not sure this is a *good* idea, but it should work. Hopefully
we don't actually need to measure latencies > 256 seconds in this
context...

-- Nathaniel
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux