From kde-core-devel Thu Jan 15 20:56:44 2004 From: Oswald Buddenhagen Date: Thu, 15 Jan 2004 20:56:44 +0000 To: kde-core-devel Subject: Re: Patch for mmap problem in KConfigBackEnd, Bug #72586 Message-Id: <20040115205644.GB17313 () ugly ! local> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=107420272829189 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.