On Wed, 05 Apr 2000, Avi Schwartz wrote:
Lenz, I need your insight here. I am having problems running Corel WordPerfect Office 2000 on my laptop (the applications crash upon launching them) but no problem at all on my desktop machine. Now the kick is that the laptop uses Reiserfs while the desktop is still ext2. Tonight I met One of Corel's senior developers, Gavriel State, in the Corel Linux Roadshow 2000, an he suspects that there might be my problem. According to Gavriel, they use memory mapping extensively to launch their WPO2K applications and if Reiserfs has some incompatibility in this area it might cause my problems. Do you know if there is any problem with Reiserfs' memory mapping? BTW, I have no clue as to what memory mapping means.
Well, I don't know much about reiserfs (except that, from what I've heard, it's closer to being ready for prime time than either of the two lead alternatives) but I can tell you the last one. Memory mapping is a variation on virtual memory. Normal virtual memory starts with the real memory occupied and the swap space vacant - and, further, no correspondence between address space and swap space. Such correspondences are created when pages are swapped out, and can be destroyed when pages are swapped in. With memory mapping, a particular file is declared to be part of the swap space for a particular task. It is assigned a correspondence to particular pages in the task's address space - and the correspondence is permanent until the mapping is broken. And the swap space is defined as being occupied.
From there, in use it acts just like virtual memory. Most likely the next thing you do is look at the file's headers - which you do by means of memory access, NOT file i/o. Since the first page of the file isn't in RAM, you get a page fault, and the virtual memory manager goes and fetches it for you. The process is invisible to the application; the OS handles it. Similarly, any other pages the application actually needs are brought in, and pages that haven't been referenced in a while may be swapped out. Except that, so long as they are in the defined address space of the file, they go to the file, not to normal swap space.
Eventually, the mapping is broken: you close the file. At this point it is necessary to write out any dirty pages in real RAM, and possibly account for changes in file size (in both directions). The memory-mapping routines take care of this, not the application. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/