Re: [ckrm-tech] [RFC][PATCH 5/7] UBC: kernel memory accounting (core)

Kirill Korotaev
2006-08-18T10:52:08Z

Andi Kleen wrote:
>>I don't see any good way around that. For the page struct it is a
>>material issue, for the others its not a big deal providing we avoid
>>accounting dumb stuff like dentries.
>>
>>At the VM summit Linus suggested one option for user page allocation
>>tracking would be to track not per page but by block of pages (say the
>>2MB chunks) and hand those out per container. That would really need the
>>defrag work though.
>
>
> One could always use a second set of arrays, mirroring mem_map
which one do you prefer:
- having a pointer on the struct page?
kernels without resource accounting won't have this.

- having a mirroring mem_map?
on i686 it is easy, but not sure about sparse mem
or numa configurations.
advantage: run-time configurable on boot time.
disadvantage: much lower performance with accounting.

- address_space/anon_vma can be replaced with some kind of proxy object
with 2 pointers - address_space and ub. however I don't see how it is
better then a single ptr on page.

Thanks,
Kirill