Skip to contentSkip to conversation

page ownership

DISCUSSION Jan Beulich 2 participants 2 messages Mar 8, 2007

lore
Share & tools
lore
#0 lore raw

Is there a particular reason why page_set_owner(pg, NULL) is
- not used in free_domheap_pages()?
- only used on pages 1 ... ((1 << order) - 1) in __alloc_domheap_pages()?

Thanks, Jan

#1 lore raw
Quoted 2 lines · Jan Beulich

Is there a particular reason why page_set_owner(pg, NULL) is
- not used in free_domheap_pages()?

It's done in __alloc_domheap_pages() instead. Arguably moving it would be cleaner.

Quoted 1 line

- only used on pages 1 ... ((1 << order) - 1) in __alloc_domheap_pages()?

Page 0 is done outside the loop, and writes directly to _domain for no particularly good reason. I guess I implemented the first iteration outside the loop to special-case initialisation of the tlbflush cpumask. Which probably isn't a very worthwhile optimisation, to be honest.

I'll do a little cleanup here. It would certainly be sane to not have random domain pointers hanging around in freed pages.

-- Keir