lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 1 Oct 2013 20:59:29 -0700
From:	Vijay Subramanian <subramanian.vijay@...il.com>
To:	Stephen Hemminger <stephen@...workplumber.org>,
	Eric Dumazet <eric.dumazet@...il.com>,
	David Laight <David.Laight@...lab.com>,
	Dave Taht <dave.taht@...ferbloat.net>,
	"Mythili Suryanarayana Prabhu (mysuryan)" <mysuryan@...co.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v1 net-next] net: pkt_sched: PIE AQM scheme

Hi,

Thanks for all the reviews. It is much appreciated.

>> +
>> +typedef u32 pie_time_t;
>> +typedef s32 pie_tdiff_t;
>> +#define PIE_SHIFT 10
>> +#define MS2PIETIME(a) ((a * NSEC_PER_MSEC) >> PIE_SHIFT)
>> +#define PIE_TIME_PER_SEC  ((NSEC_PER_SEC >> PIE_SHIFT))
>> +
>
> I would prefer that all packet schedulers use the same set of clock
> routines (psched), rather than inventing own wrapper for high resolution
> clock.
>
>> +static inline pie_time_t pie_get_time(void)
>> +{
>> +       u64 ns = ktime_to_ns(ktime_get());
>> +       return ns >> PIE_SHIFT;
>> +}
>> +
>> +static inline u32 pie_time_to_ms(pie_time_t val)
>> +{
>> +       u64 valms = ((u64) val << PIE_SHIFT);
>> +
>> +       do_div(valms, NSEC_PER_MSEC);
>> +       return (u32) valms;
>> +}
>
> Psched has all this.
>

I did have a version that used only psched. I believe it uses a 64
nsec clock. It turned out that the algorithm (ar at least the
implementation) was having issue at that high granularity
so I used a lower resolution clock built on top of psched. Is there a
way to build a use psched at a lower resolution?

Also, pkt_sched.h contains just a couple of functions , mainly
psched_get_time()? Are there functions that convert psched-ticks to ms
or us?
Or that compare psched-ticks such as time_after() or time_before()?
Your comment seems to suggest there are.

If someone can provide any pointers, it will be appreciated. Hope I am
not missing anything obvious.


>
> Please fix and resubmit. This is just a first pass review, there are
> probably more detailed issues that others will see.
>

I will address the issues that Eric, you and DavidL pointed out so far
and send a V2 shortly.

Thanks to all reviewers,
Vijay
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ