Date: Sun, 17 Dec 1995 23:14:27 -0700 From: Matt Day <mday@artisoft.com> To: dyson@FreeBSD.ORG, terry@lambert.org Cc: current@FreeBSD.ORG, kato@eclogite.eps.nagoya-u.ac.jp, peter@jhome.DIALix.COM, winter@jurai.net Subject: Re: Page management in BSD Message-ID: <199512180614.XAA08133@sting.artisoft.com>
next in thread | raw e-mail | index | archive | help
John Dyson <dyson@freebsd.org> wrote: > > > I have been evaluating the possibility of the VM system properly > > > supporting ill constructed a.out formats (like those with 1K offset) > > > and it would not be too hard. It would break coherency -- but > > > would add maybe 25-50 lines of code (very simple.) Since it is > > > bad (not allowed) to modify a running binary anyway, the cost (in > > > functionality) is low. I definitely plan to add it for 2.2. But > > > if someone has a better (easier) solution -- PLEASE go for it!!! > > > > You should talk to Matt Day (mday@elbereth.org). He has been working > > on VOP_GETPAGE/VOP_PUTPAGE style linear address caching modification > > (ala SunOS/SVR4) if you think this will completely torpedo coherency. > > > > You would have to get the details from him; he was talking about > > rolling the changes back in. > > > I think that the SVR4 approach is not very good -- I hope he isn't > planning on faulting into kernel space either. There are some significant > re-dos happening in FreeBSD right now -- and the relationship of buffers and > I/O is in flux. But -- I definitely do not want to shoot down anything that > might be good .... Ask him to get into contact with me so that we can > coordinate the efforts. (Hopefully he isn't trying to do exactly what SVR4 > does :-)). Terry neglected to explain one very important thing: the work I'm doing is for a Win95 file system project where I'm forced to use Win95's memory management system if I want my disk cache memory pool to dynamically grow and shrink depending on available system memory. Unfortunately, there are only two Win95 memory management facilities that I can use to accomplish this goal: a simple memory allocation mechanism which is too limited and wasteful for my liking, and a mechanism by which I can install my own VM pager and get called by the Win95 VM system on page-in and page-out events. As I explored the possibility of using this paging mechanism to manage my disk cache memory pool, I realized that the SVR4 disk cache mechanism is better suited to this facility than the traditional Unix buffer cache mechanism. So, that's why I'm exploring the SVR4 way. I agree, just the SVR4 way will definitely not be good enough for what we want, and I had planned on tailoring the mechanism to best meet my exact needs anyway (for example, I don't have to worry about supporting complexities like memory-mapped files), so the end result could be quite different from both the SVR4 and the FreeBSD way. Anyway, the thought had occured to me that the VOP_GETPAGE/VOP_PUTPAGE code might be useful to the FreeBSD project, to help simplify the vnode pager (as the comment at the top of vnode_pager.c suggests). If this proves to be true, I'll certainly supply the necessary patches. As for the rest of my work, I suspect it will be too tailored to Win95 to be of any use to FreeBSD. When my project is completed, I think I'll be very interested in discussing and helping to work on the current FreeBSD VM/buffer cache mechanism; for example, I'd be very interested to know about the significant changes you mentioned. Thanks very much, Matt Day <mday@artisoft.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512180614.XAA08133>