[systemd-devel] [Patch] Fix systemd-readahead-collect on mips platform

Lennart Poettering lennart at poettering.net
Wed Mar 16 16:22:07 PDT 2011


On Wed, 16.03.11 11:46, fykcee1 at gmail.com (fykcee1 at gmail.com) wrote:

> Hi all,
> 
> Attachment is the patch fixing broken systemd-readahead-collect on
> mips. The patch is actually fixing the fanotify syscall on mips:
> 1. Adjust to correct syscall number.
> 2. Using directly fanotify syscall instead of
> "syscall(__NR_FANOTIFY_MARK)", which is broken on the test platform.

Hmm, what precisely is broken? the syscall() implementation in your
glibc? If so I'd very much prefer if glibc is fixed instead. We
generally prefer fixing bugs where they are instead of taping over them
in other software.

> BTW, I enabled systemd-readahead-collect.service,
> systemd-readahead-replay.service, they were both in default.target. I
> also link systemd-readahead-done.service to default.target, is that
> correct?

Yes, the belong into default.target. 

systemd-readahead-collect.service pulls in systemd-readahead-done.timer,
which triggers systemd-readahead-done.service after boot. You should not
pull in the latter service directly because then you end up with
stopping the collector right-away.

A simple "systemctl enable systemd-readahead-collect.service
systemd-readahead-replay.service" should be sufficient to enable
everything.

Note that in embedded use cases it might be a good idea to enable the
collector only once and then disable it for subsequent boots since the
data collected probably won't change much for all future boots. This is
different on normal desktop machines where new software is installed,
new hardware plugged in all the time and we hence need to collect
readahead data at every boot.

> It seems these services exit quickly, and wasn't observed a boot time
> speed-up. The size of /.readahead is around 30K.
> Any idea?

Yes, you appear to terminating the collector right after you are
starting it, so that it collects no data at all. ;-)

Note that the effect of readahead varies. The speedup might be minimal
if you start very little anyway. And if you have SSD the speedup will be
much smaller than on rotating media. (Though according to Kay's most
recent measurements actually still quite impressive)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list