[haiku-development] Re: Implementing vm_page functions

  • From: Vivek Roy <vivekroyandroid@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 22 Jul 2017 00:23:24 +0530

In general, FreeBSD's VM is much closer to Haiku's than the one from Linux.
So it's probably the best way to look at FreeBSD's Linux compatibility
layer first. I don't think there is a counterpart for everything you
listed, but I also don't think that everything will actually be needed
either.



The functions I listed are the ones used in FreeBSD. mm.h which I am trying
to implement is from the linux compatibility layer of FreeBSD which
includes FreeBSD's own vm_page which has used the functions I mentioned.
Yes, Haiku's implementation is similar to FBSD's (page queue etc.).

I spoke to Pulkomandy in IRC he told me to make a list of things that I
feel needs to be added to Haiku's vm_page implementation so that we can
figure it out together, and so this list.

From what I found out, I think we can use VMCache's functions, Lock(),
Unlock() and AcquireRefLocked() for vm_page_lock, vm_page_unlock and
vm_page_reference, respectively. But VMCache requires a DoublyLinkedList
created for it which is not the case with FreeBSD's implementation.

Other related posts: