Tracking physical pages issued
Posted: Thu Jan 02, 2003 4:43 am
Okay, I am having a little problem with my zero fill page allocation code, so while I mull it over I am looking at wider memory management issues.
Here is a question:
I have a free page stack which lists all the free pages left after unpageable memory (kernel/free page stack itself). Pages are taken from this currently for the page table/page directory entries as needed and for page faults on zero-fill pages (for the malloc code.)
What do people think is the best way of keeping track of all this. I was thinking of using a linked list attached to the process structure, but I get the feeling this might be a little overhead heavy for this task. And it needs to be fast too.
Maybe using a struct with say 32 entries, and then chaining these together which might be a good compromise.
I guess I will need to keep a track of physical-virtual mappings for pages issued.
Also, if these are attached to individual processes, it will be hard to track so maybe I should have a global structure like the free page stack containing a list of (process, virtual, physical) but this could be memory usage heavy.
What do you think?
Here is a question:
I have a free page stack which lists all the free pages left after unpageable memory (kernel/free page stack itself). Pages are taken from this currently for the page table/page directory entries as needed and for page faults on zero-fill pages (for the malloc code.)
What do people think is the best way of keeping track of all this. I was thinking of using a linked list attached to the process structure, but I get the feeling this might be a little overhead heavy for this task. And it needs to be fast too.
Maybe using a struct with say 32 entries, and then chaining these together which might be a good compromise.
I guess I will need to keep a track of physical-virtual mappings for pages issued.
Also, if these are attached to individual processes, it will be hard to track so maybe I should have a global structure like the free page stack containing a list of (process, virtual, physical) but this could be memory usage heavy.
What do you think?