FROMLIST: iommu/iova: Add a best-fit algorithm
Using the best-fit algorithm, instead of the first-fit algorithm, may reduce fragmentation when allocating IOVAs. Bug: 149544392 Link: https://lore.kernel.org/lkml/7239ddd532e94a4371289f3be23c66a3@codeaurora.org/ Change-Id: Icfbac0cc7be972a092915335508cbc73c47471cf Signed-off-by: Patrick Daly <pdaly@codeaurora.org> Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org> Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
This commit is contained in:

committed by
Chris Goldsworthy

parent
0d5de782bb
commit
c640e76a4e
@@ -95,6 +95,7 @@ struct iova_domain {
|
||||
flush-queues */
|
||||
atomic_t fq_timer_on; /* 1 when timer is active, 0
|
||||
when not */
|
||||
bool best_fit;
|
||||
};
|
||||
|
||||
static inline unsigned long iova_size(struct iova *iova)
|
||||
|
Reference in New Issue
Block a user