[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Patch for mmap problem in KConfigBackEnd, Bug #72586
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2004-01-15 20:56:44
Message-ID: 20040115205644.GB17313 () ugly ! local
[Download RAW message or body]

On Thu, Jan 15, 2004 at 02:20:16PM +0100, Dr. Juergen Pfennig wrote:
> The problem occurs with mmap() and files that are accessed via smb (or
> nfs) and are not accessible due to ownership and protection on the
> server side.
>
uhg, good one.

> About the current implementation in kconfigbackend.cpp: mmap() is used always  
> to read conf files. Interrestingly the author was aware of a SIGBUS problem 
> and tried to recover from the SIGBUS. BUT THIS DOES NOT WORK. Maybe it never 
> worked?
>
sure it never worked, it just cannot. the only way to recover is using
longjmp.

> If the read succeeds for a large file, mmap is used as before. mmap is
> not trivial for the kernel, maybe this patch also gives a little speed
> improvement.
>
somebody wants to do some measurements? i'd like to know, starting from
which file size mmap is indeed an improvement (don't forget to include
the malloc/free for the non-mmap case). possibly it's not worth the
whole trouble at all, given that config files don't tend to be "large".

greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic