bulk_mode patch - version 2

Marek Kowal marek.kowal at portal.onet.pl
Wed Apr 16 18:56:36 CEST 2003


> Bulkmode _will_ be added to cvs.  Last week was not the time to do it as 
> 0.11.2 was about to be released and having 0.11.2 be stable is a prime
concern.

Great! Thank you!

> Just fopen().  What are your reasons for wanting mmap()?

The "master" process, which would invoke the bogofilter has the mail already
open with mmap(), so I thought that this would speed up things, as the file
would be mapped to the same part of the memory, resulting in very fast
operations. But at least in my case the issue is no longer important - I've
just learned that in Linux 2.4 kernel this is no longer important, since
both operations (mmap() and fopen() etc) would use the same "cache" memory,
so this will be fast anyway. Though I guess mmap() would still be a bit
faster, as it would not invoke additional copy overhead from cache to
process' memory. At least this is what I think, haven't checked it out.

Anyway, I do not know if this trick holds true for other OSes, and using
mmap() can be (and usually is) faster than using standard
fopen/fread/fwrite/fclose.

Cheers,
Marek.




More information about the bogofilter-dev mailing list