All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Intel-gfx@lists.freedesktop.org,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Subject: Re: [RFC 00/15] Selectable platform support
Date: Fri, 09 Feb 2018 13:49:16 +0200	[thread overview]
Message-ID: <878tc28jsz.fsf@intel.com> (raw)
In-Reply-To: <151810246741.12980.8493340966397698584@jlahtine-desk.ger.corp.intel.com>

On Thu, 08 Feb 2018, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> Quoting Tvrtko Ursulin (2018-02-08 16:06:41)
>> 
>> On 08/02/2018 13:26, Chris Wilson wrote:
>> > Quoting Tvrtko Ursulin (2018-02-08 13:05:51)
>> >> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> >>
>> >> For Joonas basically. :)
>> >>
>> >> Rough goal - add Kconfig options to turn off supported platforms
>> >> and count on compiler DCE to make the driver smaller.
>> >>
>> >> Tested as so much that it boots and renders on Skylake with all
>> >> platforms/gens older than Gen8 turned off.
>> >>
>> >>     text    data     bss     dec     hex filename
>> >> 1502847   54223    2888 1559958  17cd96 i915.ko.original
>> >> 1375647   51939    2888 1430474  15d3ca i915.ko.gen8+
>> >>
>> >> So only ~124kiB saving. Or ~8.5%. Perhaps once GCC LTO support
>> >> lands it would be better than this?
>> > 
>> > Did you get to the point where the compiler was complaining about
>> > unused functions?
>> 
>> No, but on a random check it seems that it is removing some. For
>> instance i965_emit_bb_start and i830_emit_bb_start are not in my
>> build.
>> 
>> Doesn't mean I haven't made some other mistake which is preventing
>> more savings.
>> 
>> >> Starts with smaller patches to show the idea step by step on Gen2,
>> >> then proceeds in larger chunks, to finish with some invasive
>> >> Coccinelle works to enable the last few kilo-bytes of savings.
>> > 
>> > So, if we want to support this, how do we test it?
>> > 
>> > Do a per-platform build and check modinfo for pci ids?
>> > 
>> > Limit the CI builds to be per-platform and check they work?
>> 
>> Extensively. :) Which will probably be a problem. PCI ids is not
>> enough, I think it would actually need functional testing so a growth
>> of number of builds we would need to test.
>
> My original suggestion was to be able to "pre-select the PCI ID" and
> let the compiler do the magic with LTO to get rid of the dead
> code. You would test by comparing the "include all" and "one PCI ID"
> kernel operation on same system. I'm assuming that the feature would
> be a useful non-default to opt-in to similarly to a "targeted" initrd.

So I can imagine someone shipping a specific product with a specific
platform (or even PCI ID) could use this. Beyond that, who would use
this? Some rare enthusiasts?

Is there any way a general purpose distro could use it? I guess only by
building several drivers with different options (and names) that would
have different PCI ID matches.

The increased testing requirements are not to be taken lightly. We need
to have pretty good rationale for the CI team before just dropping this
on them to test.


BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-02-09 11:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 13:05 [RFC 00/15] Selectable platform support Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 01/15] drm/i915: Make I830 platform support optional Tvrtko Ursulin
2018-02-08 13:23   ` Chris Wilson
2018-02-09 11:26   ` Jani Nikula
2018-02-08 13:05 ` [RFC 02/15] drm/i915: Make I845G " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 03/15] drm/i915: Make I85X " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 04/15] drm/i915: Make I865G " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 05/15] drm/i915: Make GEN2 " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 06/15] drm/i915: Make Gen3 platforms " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 07/15] drm/i915: Make Gen4 " Tvrtko Ursulin
2018-02-08 13:05 ` [RFC 08/15] drm/i915: Make Ironlake/Gen5 " Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 09/15] drm/i915: Make Sandybridge/Gen6 " Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 10/15] drm/i915: Make Gen7/7.5 platform " Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 11/15] drm/i915: Use INTEL_GEN everywhere Tvrtko Ursulin
2018-02-09 10:14   ` Jani Nikula
2018-02-09 21:59     ` [PATCH] __gen__ Chris Wilson
2018-02-09 10:20   ` [RFC 11/15] drm/i915: Use INTEL_GEN everywhere Chris Wilson
2018-02-08 13:06 ` [RFC 12/15] drm/i915: Favour IS_GENx Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 13/15] drm/i915: IS_GEN range helpers Tvrtko Ursulin
2018-02-08 13:06 ` [RFC 14/15] drm/i915: Use new " Tvrtko Ursulin
2018-02-08 14:22   ` Ville Syrjälä
2018-02-08 14:34     ` Tvrtko Ursulin
2018-02-08 14:46       ` Chris Wilson
2018-02-08 15:13         ` Mika Kuoppala
2018-02-08 15:53           ` Ville Syrjälä
2018-02-09 11:18             ` Jani Nikula
2018-02-09 14:48               ` Ville Syrjälä
2018-02-09 15:01                 ` Chris Wilson
2018-02-09 15:12                 ` Ville Syrjälä
2018-02-10 22:51                   ` Chris Wilson
2018-02-08 13:06 ` [RFC 15/15] drm/i915: Replace some negative Gen checks Tvrtko Ursulin
2018-02-09 10:18   ` Jani Nikula
2018-02-09 10:19   ` Chris Wilson
2018-02-08 13:26 ` [RFC 00/15] Selectable platform support Chris Wilson
2018-02-08 14:06   ` Tvrtko Ursulin
2018-02-08 15:07     ` Joonas Lahtinen
2018-02-09 11:49       ` Jani Nikula [this message]
2018-02-09 12:02         ` Chris Wilson
2018-02-08 15:28 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-02-09 10:48 ` [RFC 00/15] " Tvrtko Ursulin
2018-02-09 10:50   ` Chris Wilson
2018-02-09 11:01     ` Tvrtko Ursulin
2018-02-09 11:19       ` Chris Wilson
2018-02-09 21:14         ` Chris Wilson
2018-02-09 11:32   ` Jani Nikula
2018-02-09 22:23 ` ✗ Fi.CI.BAT: failure for Selectable platform support (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tc28jsz.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=tursulin@ursulin.net \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.