In dmar_gas_lowermatch, skip searching a subtree if all its addresses are greater than lowaddr.
In dmar_gas_uppermatch, skip searching a subtree if all its gaps-between-alloctions are too small. Reviewed by: kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D23391
This commit is contained in:
parent
5cc422a222
commit
5a9447a324
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357389
@ -370,6 +370,8 @@ dmar_gas_lowermatch(struct dmar_gas_match_args *a, struct dmar_map_entry *entry)
|
||||
}
|
||||
if (entry->free_down < a->size + a->offset + DMAR_PAGE_SIZE)
|
||||
return (ENOMEM);
|
||||
if (entry->first >= a->common->lowaddr)
|
||||
return (ENOMEM);
|
||||
child = RB_LEFT(entry, rb_entry);
|
||||
if (child != NULL && 0 == dmar_gas_lowermatch(a, child))
|
||||
return (0);
|
||||
@ -390,6 +392,8 @@ dmar_gas_uppermatch(struct dmar_gas_match_args *a, struct dmar_map_entry *entry)
|
||||
{
|
||||
struct dmar_map_entry *child;
|
||||
|
||||
if (entry->free_down < a->size + a->offset + DMAR_PAGE_SIZE)
|
||||
return (ENOMEM);
|
||||
if (entry->last < a->common->highaddr)
|
||||
return (ENOMEM);
|
||||
child = RB_LEFT(entry, rb_entry);
|
||||
|
Loading…
Reference in New Issue
Block a user