From owner-mint@fishpool.com Tue Sep 9 20:16:51 2003 Date: Tue, 9 Sep 2003 20:12:46 +0200 (CEST) From: Standa Opichal X-X-Sender: stop@mail.idoox.com To: mint@fishpool.com Subject: Re: [MiNT] possible fork() speedup In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Delivered-To: mint@fishpool.com Delivered-To: mint@lists.fishpool.fi X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: opichals@seznam.cz Precedence: bulk List-help: List-unsubscribe: List-ID: X-List-ID: Hi! Replying to myself because my proposal is not that easy to implement as I thought before. It would need to extend the fcookie structure with an additional copy-on-write flag which may require all the .xfs to be updated. I'm not sure about the binary compatibility issues, but I think it might be done. Or is it something that man should not touch in FreeMiNT? Anyway what is the reason to keep the fcookie root[NDRIVES] in each process structure and not only in the kernel one? regards STan On Mon, 8 Sep 2003, Standa Opichal wrote: > Hi All! > > Petr Stehlik has just noticed that there is the > dupcookie()/releasecookie() called frequently on the ARAnyM HOSTFS even > while gcc'ing something on non-HOSTFS drive. > > The problem is that the root and curdir arrays (in currproc->p_cwd) are > copied on each fork() call. This requires to employ all mounted and ever > cd'ed drive driver by the touple call. > > What do you think about a possibility to add a long field that would > hold the copy-on-write flags for all the curdir[] entries (the root[] is > not modified anywhere) and check it whenever the entry is to be changed > and copy/leave-untouched accordingly. There is AFAICS now after only a > brief investigation only one place where the curdir[] entry is beeing > changed (sys/dosdir.c:414). > > Any comments? > > regards > > STan > > =================== > > struct cwd > { > .... > > /* DOS emulation > */ > > .... > fcookie root[NDRIVES]; /* root directories */ > fcookie curdir[NDRIVES];/* current directory */ > }; > > > >