Re: providing memory objects to users

2002-06-15 Thread Neal H. Walfield
Marcus Brinkmann <[EMAIL PROTECTED]> writes: > On Fri, Jun 14, 2002 at 10:59:02AM +0200, Neal H. Walfield wrote: > > > error_t > > > pager_write_page (struct user_pager_info *upi, vm_offset_t page, > > > vm_address_t buf) > > > { > > > assert (upi->memobj_pages[page / vm_page_

Re: providing memory objects to users

2002-06-14 Thread Marcus Brinkmann
On Fri, Jun 14, 2002 at 10:59:02AM +0200, Neal H. Walfield wrote: > > error_t > > pager_write_page (struct user_pager_info *upi, vm_offset_t page, > > vm_address_t buf) > > { > > assert (upi->memobj_pages[page / vm_page_size] == (vm_address_t) NULL); > > upi->memobj_pages[pag

Re: providing memory objects to users

2002-06-14 Thread Neal H. Walfield
> Can you please verify with me that the following code matches what you > described here: > > > You do not even have to do this. Just hold a reference to the regions > > returned by pager_write_page; it is up to you to vm_deallocate them. > > error_t > pager_write_page (struct user_pager_info

Re: providing memory objects to users

2002-06-13 Thread Marcus Brinkmann
On Wed, Jun 12, 2002 at 04:47:08PM +0200, Neal H. Walfield wrote: > You can use the default pager as your backing store. Ah, that's cool, thanks for the tip how to do it. I don't mind the delay in page out performance right now. I can try the default pager approach again later, but it's only a

Re: providing memory objects to users

2002-06-13 Thread Roland McGrath
Note that there is no reason we can't, as a temporary measure, have a privileged translator on /servers/defpager that accepts default_pager_* calls and relays them to the real default pager. It could then allow unprivileged users to do object_create, and only privileged users to do the swap-contr

Re: providing memory objects to users

2002-06-13 Thread Roland McGrath
> My intuition tells me that the default pager should really be sitting in > the file system, e.g. /servers/default-pager, and accept requests for > default_pager_object_create et al. there. Certainly so. We have long planned this to be the case for a new default pager implementation. But we ar

Re: providing memory objects to users

2002-06-13 Thread Neal H. Walfield
> I am confused as to why using default_pager_object_create is not working. > That's what tmpfs does. Sure, but only if you are root. The major flaw with the current design is that you need to have the device master port to actually be able to talk to the default pager (not only awkward, but als

Re: providing memory objects to users

2002-06-12 Thread Thomas Bushnell, BSG
Roland McGrath <[EMAIL PROTECTED]> writes: > I am confused as to why using default_pager_object_create is not working. > That's what tmpfs does. Me too; I think it should work... ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/

Re: providing memory objects to users

2002-06-12 Thread Roland McGrath
I am confused as to why using default_pager_object_create is not working. That's what tmpfs does. ___ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd

Re: providing memory objects to users

2002-06-12 Thread Thomas Bushnell, BSG
Marcus Brinkmann <[EMAIL PROTECTED]> writes: > Ok ;) I do this in my current version, and it seems to work fine. I will > check in the code right now, but I have one more question. When using > libpager, I must provide my own backing store, right? At any time, it can > happen that pager_write

Re: providing memory objects to users

2002-06-12 Thread Marcus Brinkmann
On Wed, Jun 12, 2002 at 10:32:21AM -0700, Thomas Bushnell, BSG wrote: > Map a big region, start modifying pages. Eventually you will trigger > pageout. The kernel will now proceed to start paging things out: all > at once. Ok, I see. How about throtteling the creation of new service threads in

Re: providing memory objects to users

2002-06-12 Thread Thomas Bushnell, BSG
Marcus Brinkmann <[EMAIL PROTECTED]> writes: > On Wed, Jun 12, 2002 at 10:32:21AM -0700, Thomas Bushnell, BSG wrote: > > Map a big region, start modifying pages. Eventually you will trigger > > pageout. The kernel will now proceed to start paging things out: all > > at once. > > Ok, I see. Ho

Re: providing memory objects to users

2002-06-12 Thread Thomas Bushnell, BSG
Marcus Brinkmann <[EMAIL PROTECTED]> writes: > BTW, Thomas, while we are chatting about pagers. I remember Roland > told me the thread explosion in the server is a known problem with > the Mach virtual memory management. Can you briefly wrap up an > example for a typical behaviour that can caus

Re: providing memory objects to users

2002-06-12 Thread Neal H. Walfield
> Ok ;) I do this in my current version, and it seems to work fine. I will > check in the code right now, but I have one more question. When using > libpager, I must provide my own backing store, right? At any time, it can > happen that pager_write_page is called with my pages, and then they a

Re: providing memory objects to users

2002-06-12 Thread Marcus Brinkmann
On Tue, Jun 11, 2002 at 08:21:59PM -0700, Thomas Bushnell, BSG wrote: > Using libpager is a reasonable thing to do, in my opinion. > > But you must use it properly! :) Ok ;) I do this in my current version, and it seems to work fine. I will check in the code right now, but I have one more ques

Re: providing memory objects to users

2002-06-12 Thread Marcus Brinkmann
On Wed, Jun 12, 2002 at 12:41:51PM +0200, Marcus Brinkmann wrote: > I include the backtrace of the three interesting threads below. Someday I will forget my own head. I include them now, but in my current version everything works, so I am not looking back. To refresh memory, the backtrace is th

Re: providing memory objects to users

2002-06-12 Thread Marcus Brinkmann
On Tue, Jun 11, 2002 at 08:21:59PM -0700, Thomas Bushnell, BSG wrote: > pager_read_page provides a newly-allocated page to the caller, but the > caller completely consumes that page. Once you return, you must > regard the page as deallocated. Why? Ah, ok. I will do it more like libdiskfs then

Re: providing memory objects to users

2002-06-11 Thread Thomas Bushnell, BSG
Marcus Brinkmann <[EMAIL PROTECTED]> writes: > First I tried to use libpager. This worked out ok, but what I did was > probably wrong. I allocated anonymous pages in pager_read_page, and > filled those with the display information. The information could then > be read by the client, allright.

providing memory objects to users

2002-06-11 Thread Marcus Brinkmann
Hi, I tried today to get the mmap()ed interface to the console clients working, but with limited success only. First I tried to use libpager. This worked out ok, but what I did was probably wrong. I allocated anonymous pages in pager_read_page, and filled those with the display information. T