From 6c7d45e4631784d0e077e806521a736da6b0266e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 7 Apr 2013 18:18:44 +0200 Subject: IRC. --- open_issues/pfinet_timers.mdwn | 102 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) (limited to 'open_issues/pfinet_timers.mdwn') diff --git a/open_issues/pfinet_timers.mdwn b/open_issues/pfinet_timers.mdwn index 387ad4fe..5db192e3 100644 --- a/open_issues/pfinet_timers.mdwn +++ b/open_issues/pfinet_timers.mdwn @@ -15,3 +15,105 @@ License|/fdl]]."]]"""]] now that there is a pthread_hurd_cond_timedwait_np function available, we could replace the ulgy timers in pfinet + + +# IRC, freenode, #hurd, 2013-04-02 + + youpi: also, i think i know why fakeroot is slow on the hurd + well, pfinet actually + tcp flow control? + i think it's because of our timer resolution + ah + and i think i spotted a small mistake in the timer emulation code + btw + it's so obvious i even doubt it's actually true :) + see timer_emul.c:timer_function + the code checks for timers->expires < jiffies + shouldn't it be "<=" + ? + well it'd be equivalent + if ==, then wait becomes 0 in the else + see the second scheck + the one performed right before running the callback + ah, the while? + yes + I'd say <= could do it yes + ok + i have hurd packages ready to be tested + although I'm unsure it'd make a difference + do you notice some? + just waiting for my current glibc to finish building + and i'll test right after + i think it would actually + in which case? + the timer resolution is 10ms + it's huge + well, i hope it fixes fakeroot slowness :) + so timers below that would trigger immediately? + or equal + taht's the problem + for 10ms, timers that have expired must wait for the next tick to + fire + I include "equal" in below + actually :) + then yes :) + soryy i never know when equal is implicit + because they boil down to expires = jiffies + in french it's implicit + but anyway here equal is not really important + right + why ? + it's the fact that 1ms would be rounded up to 10ms, not down to 0ms + well, doing that seems reasonable + or rather, rounded down to 0ms, but waited for 10ms because of the + < + we do want timers not to fire before the time event + I'm however wondering which part of the code would have timer below + 10ms + well, a select with low timeout from a client perhaps ? + but then we have to round up + as you say we don't want to fire before some time + well yes + that's fine + all that being said, linux has been having 10ms clock for a long + time + but when the timer fires, i.e. when expires == jiffie, we do want + it to fire + highres timers are only relativeley recent + not at jiffie + 1 + braunr: ah, right, so we don't wait for 20ms instead of 10ms + yes + ok, so it's not a miracle fix, but could bring 2times fix + well, pfinet eats 40% of my processor when this problem occurs + which i'm seeing right now + yes, I've seen that too + so it may be a visible win + build finished :) let's see + Mmm, thinking again + indeed + when expires become jiffies + we mach_msg (0) + but don't do anything + and then restart + so just eaten cpu for nothing + is there a small package that builds fast and uses fakeroot a lot + ? + something like a package which has a lot of data to install at make + install + or i can rebuild glibc with -nc + ok, I've checked in linux + libarchive's testsuite used to intermittently failing under + fakeroot + it's definitely <= which is meant + it looks better + but still not 100% cpu + at any rate, as long as it doesn't seem to break anything, please + push the fix + it definitely makes sense + (and I don't see why it could break anything) + ok + i'll look into this timer problem a bit more, there may be other + code involved + yes, schedule_timeout could need a review + actually, fakeroot rm -rf * is a good test + and it's still damn slow -- cgit v1.2.3