[Intel-gfx] [PATCH] Revert "drm/i915: mark all device info struct with __initconst"

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Jan 29 10:34:05 UTC 2018


On 29/01/2018 09:00, Chris Wilson wrote:
> Quoting Lionel Landwerlin (2018-01-29 08:33:46)
>> This reverts commit 5b54eddd3920e9f6f1a6d972454baf350cbae77e.
>>
>>   Conflicts:
>>          drivers/gpu/drm/i915/i915_pci.c
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104805
>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> 
> Mea culpa, completely didn't realise post-module init loading was a
> thing.
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> It's still on the low hanging fruit list for reducing our bloat. Ideas?
> i915_pcidata.ko? How far could we go with that, make all gen specific
> code a separate section and unload them after init?

There is one maybe easy win with DMI_MATCH business. It modpost was 
taught to handle string relocs, one could remove the hardcoded string 
storage of 4x79 bytes for every DMI_MATCH entry. We have one large-ish 
table which is not __initconst in intel_no_lvds, but I haven't looked at 
the rest of the kernel - if all other users are mostly __initconst then 
the saving wouldn't be that universally interesting.

One larger code re-org could be to move all genX prefixed functions into 
separate .kos and load them dynamically. But it is very difficult to 
estimate the saving given how much re-use we have. And the extraction 
would probably be quite messy.

Regards,

Tvrtko


More information about the Intel-gfx mailing list