|
From: Phillip S. <ps...@cf...> - 2001-10-22 21:12:55
|
At 08:59 PM 10/22/2001 +0200, you wrote: >Hi, > >before we can implement a file cache like NT, we must solve some other >problems: >1) There isn't a working system working set. The functions from mm/wset.c >can only > handle working sets from other process's. They need a pointer to a > process structure, > but the kernel hasn't a process structure. Some functions from device > drivers and Sure it does, the SYSTEM process. > ntoskrnl.exe are pageable. But gcc and ld can't split code to > different code sections > and mark some as non or pageable. I'm pretty sure gcc does let you specify that a given block of code should be placed into a named section instead of .text. Anyone know how? Some #pragma I'm sure. >2) The working set doesn't include all the memory of a process. Memory, >that is > used in section views or memory mapped file, isn't included in the > working set. You mean in our code? Yea... that should be fixed. If mapped views are not part of the working set, then the only memory that is is private pages. Pages from the executable image(s) should be part of the working set, and paged out when not needed. >3) It exist no working set manager. There is only an implemention for >trimming of > working sets, that will start when MmAllocPage() can't grab a free > page. But when > memory is write to the pagefile, than the kernel needs some free pages. Right. Whenever a process requests that pages be added to its working set ( due to a page fault for instance ), and its working set size is already at its maximum size, pages are supposed to be removed from the working set, and the max working set size increased slightly. Also a background thread is supposed to walk over the working sets, and reduce their maximum size slowly to try and squeeze pages out of the working set. This way the mm tries to keep plenty of pages on the standby list, so if they are faulted back in, they are still in memory, but if the free list runs out, pages can be taken from the standby list from oldest to newest. >4) The access to the pagefile dosn't work. Some functions are commented >out and > there are some bugs in allocation of free space in a pageing file. Agreed. >5) The pte's and ppte's can't handle swap entries for a pageing file. > >For implementation of the cache manager and some of the functions above, >I have moved the code, which will access the cache segments, from vfatfs to >some Cc-functions. Currently I work at point 4 and 5 and will correct some >things >in the page out and access violation functions for virtual memory. I assume you then plan to fix issues 1, 2, and 3, and then correctly implement the NT CC? Good for you! At some point, vfatfs is also going to need a total rewrite so it can be made asynchronous. Having a synchronous filesystem also will prevent a correctly working memory manager. >Sorry for my bad english. Not bad at all. >- Hartmut > ==================================================== = To remove yourself from this mailing list, go to = = http://www.reactos.com/home/mailing.html = ==================================================== |