[Intel-wired-lan] [PATCH] igb: Make driver init async

Alexander Duyck alexander.duyck at gmail.com
Mon Jan 21 22:50:08 UTC 2019


On Mon, Jan 21, 2019 at 12:36 AM Feng Tang <feng.tang at intel.com> wrote:
>
> When optimizing boot time for a platform with igb module, we found the
> igb driver probe will take about 45 ms, make the probe asynchronous
> will save quite some time as the init runs in parallel with other
> asynchronous drivers.
>
> In theory, this could be applied to some other drivers like igc or
> e1000, but we don't have HW to verify that.
>
> Signed-off-by: Feng Tang <feng.tang at intel.com>

I really don't like this patch. This seems like you are tuning for a
specific platform or system setup by making changes to the driver. Is
there any reason why you couldn't just pass the module parameter
"igb.async_probe" to accomplish the same thing? I suspect most people
won't care that much about the 45ms boot time difference, and if we
were to make this sort of change it should probably be more
generically applied to either PCI devices or network devices instead
of doing this one driver at a time.

> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> index 7137e7f..d477253 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -229,6 +229,7 @@ static struct pci_driver igb_driver = {
>         .id_table = igb_pci_tbl,
>         .probe    = igb_probe,
>         .remove   = igb_remove,
> +       .driver.probe_type = PROBE_PREFER_ASYNCHRONOUS,
>  #ifdef CONFIG_PM
>         .driver.pm = &igb_pm_ops,
>  #endif
> --
> 2.7.4
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan at osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan


More information about the Intel-wired-lan mailing list