Re: first gap in the map
YAMAMOTO Takashi <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.performance |
|---|---|
| Message-ID | <[email protected]> |
> With current implemention, the only real entries are managed in > rbtree, and thus the gap after those entries can be searched by rbtree > walk, right? So, the gap between map start and the first entry needs > to be check specially. The code after /* Check slot before any entry > */ is the special check (it is necceary for kernel or its sub map). > > But for topdown case, the entry there isn't the first entry usually. > And since it should be the last resort in topdown case, the test > should be done after tree walk failed to find space. > > But currently `tree walk failed' doesn't mean there was really no > space in the tree (since the walk doesn't test all candidates). So, > fixing this would be a bit hard (possibilly, we want to put the first > gap in the tree also). i got your point. thanks for explanation. > Also, uvm_rb_space() doesn't need to handle the entry->next == > &map->header case specially. return (entry->next->strart - > entry->end); is enough. yea, i'm wondering if 'ownspace' is worth to cache.. YAMAMOTO Takashi