Re: [PATCH 5/6] drm/i915: Split batch pool into size buckets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 19, 2015 at 05:35:35PM +0000, Tvrtko Ursulin wrote:
> >-	list_for_each_entry_safe(tmp, next,
> >-				 &pool->cache_list, batch_pool_list) {
> >+	n = fls(size >> PAGE_SHIFT) - 1;
> 
> Is this better in some way that size / PAGE_SIZE - 1? Or I went from
> trusting compiler smartness to little to too much? :)

The month has 31 days in it, we use >> PAGE_SHIFT, otherwise /
PAGE_SIZE. Note the fls() puts these into power-of-two buckets not pure
page-count buckets.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux