On Wed, 18.06.14 07:51, Tollef Fog Heen (tfh...@err.no) wrote: > > ]] Lennart Poettering > > (trimming Ccs) > > > I am invoking fallocate() in advance, because we write those files with > > mmap() and that of course would normally triggered SIGBUS already on the > > most boring of reasons, such as disk full/quota full or so. Hence, > > before we do anything like that, we invoke fallocate() to ensure that > > the space is actually available... As far as I can see, that pretty much > > in line with what fallocate() is supposed to be useful for, the man page > > says this explicitly: > > OOI, why not use write + read-only mmap for reading? In testing > performance for another project, that's significantly faster than rw > mmap.
Well, non-mmap stuff might indeed be quicker, but this isn't really optimized to the last bit of speed but more to keep the code simple. And the code is quite simple now, as we can use the same codepaths to locate things for appending and for finding them... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel