[darcs-users] soc progress 4

Trent W. Buck trentbuck at gmail.com
Thu Jun 18 04:20:13 UTC 2009


Petr Rockai <me at mornfall.net> writes:

> I have done some work despite study for exams [...]

I'm impressed that you can get any work done; I certainly never had time
for anything during an exam week.

> [...] an oddity in the behaviour of my CPU frequency scaling... it
> managed to get stuck at 800MHz from time to time, doubling the time
> needed to do a darcs whatsnew.

In case you're not already aware, you can manipulate frequency scaling
on Linux systems from within /sys/.  I use

    $ sudo aptitude install sysfsutils
    $ egrep -v '^[[:space:]]*($|#)' /etc/sysfs.conf
    devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand
    devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load = 1
    devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate = 500000

That is, I just hard-code the governor to ondemand.  You can temporarily
disable frequency scaling altogether with

    $ sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor <<<performance

and set it back with <<<ondemand or whatever.  Obviously if you have
multiple cpus, not just cpu0, you would map the described operations
over all of them.

Also note that several Debian packages will try to change the governor
and other settings *on the fly*, e.g. switching to the performance
governor when running off mains power.  From memory, these include

    laptop-mode, cpufreqd, powernowd, gnome-power-manager, kpowersave
    and possibly acpi-support.

I stopped them by simply purging those packages.  YMMV, good luck, etc.

>   * Make lcs an optional dependency (use -fdiff to get the Diff
>   module).

Thanks!  What are the implications of *not* using lcs?  Do you take a
performance hit, or what?  (Presumably there's a reason it's an optional
dependency rather than being removed altogether.)

>   * Use mmap instead of bytestring-mmap in readSegment (in Utils).
>   * Cut down build-depends (no longer need bytestring-mmap nor binary).

Thanks!

> ... and darcs-hs:
>
>   * Use the mmap package instead of bytestring-mmap.

Petr/Eric, can we get this into the 2.3 release?

Current Darcs head depends on hashed-storage, and hashed-storage (now)
depends on mmap, but not bytestring-mmap.  Therefore, getting this
change into 2.3 will mean that EVERYONE gets mmap support, rather than
only those people who have BOTH mmap and bytestring-mmap installed.

I guess since Darcs has an indirect mmap dependency (via
hashed-storage), it might as well be made a required (not optional)
dependency.  That reduces the dimensions of compile-time options by one,
which means less to go wrong.  Yay!



More information about the darcs-users mailing list