bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] new interface: memory_object_get_proxy


From: Sergey Bugaev
Subject: Re: [PATCH] new interface: memory_object_get_proxy
Date: Mon, 1 Nov 2021 19:13:05 +0300

On Mon, Nov 1, 2021 at 6:44 PM Joan Lledó <jlledom@mailfence.com> wrote:
> > * "Anonymous" mappings (created with a null memory object)
>
> If they provide no object when calling vm_map, then the kernel uses the
> default pager, isn't it?

Conceptually, yes. But the way it's implemented, the object->pager
port stays null until it has to be paged out (due to lack of memory),
and only then is a pager port created and sent to the default pager.
So what I've been trying to do by calling vm_object_pager_create () is
to force this to happen sooner.

> Can't you send a reference to the default pager
> to memory_object_create_proxy()?

Yes, that's the plan. I'm not sure I _like_ having to involve the
default pager even when we don't actually need its paging
functionality, simply to make some VM operation representable; but
let's at least get *that* working, and then see if we maybe need a way
to avoid the default pager altogether.

> The RPC is to return a proxy, and proxies always need an original object
> to proxy, if there's no object, I'm not sure how this RPC should behave

We could make proxies reference either a memory object (as in, a pager
port — like now) or a vm_object; this way we wouldn't need to involve
the defpager.

But again, let's try to get the simple version working first. As I've
said, with vm_object_pager_create () it kind of works, except it
doesn't give me the actual data for whatever reason.

Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]