[systemd-devel] [PATCH 1/2] RFC: journald: Allow to cache the cg_get_root_path

Holger Hans Peter Freyther holger at freyther.de
Thu Jul 18 11:53:52 PDT 2013

On Thu, Jul 18, 2013 at 08:32:18PM +0200, Karol Lewandowski wrote:

> Agreed, this is why I have been naively thinking that caching wouldn't
> be that bad... However, sending all the required information in message
> itself is clearly the best solution to this problem.

It is nice to avoid the race for sure but unless I am not using perf
record/top correctly or perf itself is broken on ARM, the bottleneck
is really not the opening of files. For me glibc's _int_malloc remains
at the top. So even if we skip a log of reading of files the journald
will still create strings for KEY=VALUE.

So maybe we could put key/val separtaely into the iovec array and avoid
the extra strdup and then in the journal-file we can avoid the memchr
for '='? Anyway I have not looked at journal-file.c much yet...


More information about the systemd-devel mailing list