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

Chris Wilson chris at chris-wilson.co.uk
Mon Jan 29 10:44:48 UTC 2018


Quoting Tvrtko Ursulin (2018-01-29 10:34:05)
> 
> 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.

I was dreaming of some advanced LTO which could mark used sections at
runtime linking (would need to be more involved so that it's run after
init/probe) and unload the rest. Doing some manual splitting seems like
the easy-ish thing to do in the near term, but I'd like to keep a fat
i915.ko and retrieve data sections from it on probe (just for the
convenience of having only one module). Dream on :)
-Chris


More information about the Intel-gfx mailing list