*BSD News Article 80015


Return to BSD News archive

#! rnews 1652 bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!howland.erols.net!vixen.cso.uiuc.edu!news.stealth.net!news.ibm.net.il!news.biu.ac.il!news.huji.ac.il!vms.huji.ac.il!yehavi
From: yehavi@vms.huji.ac.il (Yehavi Bourvine (58-4279))
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: INN under BSDi-2.1, can I use MMAP for active file?
Date: 6 Oct 96 11:00:05 GMT
Organization: The Hebrew University of Jerusalem
Lines: 21
Message-ID: <1996Oct6.110005@hujicc>
References: <1996Sep30.174304@hujicc> <52phpb$8a0@olympus.nwnet.net> <VIXIE.96Sep30195917@wisdom.vix.com> <5367v6$87c@news.abs.net>
NNTP-Posting-Host: vms.huji.ac.il

In article <5367v6$87c@news.abs.net>, howardl@u1.abs.net (Howard Leadmon) writes:
> Paul A Vixie <vixie@vix.com> wrote:
> : I have been using MMAP for active and DBZ on BSD/OS with no trouble.
> : -- 
> : Paul Vixie
> : La Honda, CA			"Illegitimibus non carborundum."
> : <paul@vix.com>
> : pacbell!vixie!paul
> 
> 
> On BSDi 2.1 or on FreeBSD??  I though the MMAP function was broken 
> under BSDi 2.x..

I played a little with it. MMAP is broken in that it does not update the file
automatically. You have to change one of the functions in ICD.C to call Msync()
explicitly. I've done it, the file still did not updated, so I checked the
return code of Msync() and found it fails.  I had to replace the second
paramter of it to be the file size instead of zero, and since then it is ok.
Ah, in order to reduce the I/O load on the disk (and gain something from the
MMAP calls...) I changed the Articles/Sync ratio from 10 to 100.
                                                 __Yehavi: