[PATCH] drm: micro optimise cache flushing

Jani Nikula jani.nikula at linux.intel.com
Thu Sep 20 03:02:03 PDT 2012


On Wed, 19 Sep 2012, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Wed, 19 Sep 2012 11:12:41 +1000, Dave Airlie <airlied at gmail.com> wrote:
>> From: Dave Airlie <airlied at redhat.com>
>> 
>> We hit this a lot with i915 and although we'd like to engineer things to hit
>> it a lot less, this commit at least makes it consume a few less cycles.
>> 
>> from something containing
>> movzwl 0x0(%rip),%r10d
>> to
>> add    %r8,%rdx
>> 
>> I only noticed it while using perf to profile something else.
>> 
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> I would have thought this is something the compiler should, with the
> appropriate hints, be smart enough to decide for itself as boot_cpu_data
> should be constant once defined. *shrug*

Since it's not obvious the compiler isn't smart enough, should the code
carry a comment so we don't forget?

BR,
Jani.


More information about the dri-devel mailing list