drm/i915: Trim partial view sg lists
Partial views are small but there can be many of them, and since the sg list space for them is allocated pessimistically, we can save some slab by trimming the unused tail entries. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180926080353.20867-1-tvrtko.ursulin@linux.intel.com
This commit is contained in:
@@ -2325,6 +2325,8 @@ static inline struct scatterlist *__sg_next(struct scatterlist *sg)
|
||||
(((__iter).curr += PAGE_SIZE) >= (__iter).max) ? \
|
||||
(__iter) = __sgt_iter(__sg_next((__iter).sgp), false), 0 : 0)
|
||||
|
||||
bool i915_sg_trim(struct sg_table *orig_st);
|
||||
|
||||
static inline unsigned int i915_sg_page_sizes(struct scatterlist *sg)
|
||||
{
|
||||
unsigned int page_sizes;
|
||||
|
Reference in New Issue
Block a user