Re: [PATCH] scsi: ufs: probe hba and add lus synchronously

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bart,

> Another solution could be to change the kernel Kconfigs to force
> DEVFREQ_GOV_SIMPLE_ONDEMAND (and possibly other devfreq-related options as
> well) to be builtin when SCSI_UFSHCD is enabled (builtin or module). Is
> that what you meant?

After diving more into this, I could not find a way in the Kconfig 
language to force a module to be builtin, so I'm not sure if the idea is 
implementable.

I had another idea. Instead of running the whole ufshcd_async_scan()
function synchronously (and potentially slow down boot time on Android
devices as you mentioned), we could only move devfreq initialization out
of the async routine, ie. this chunk of code:

drivers/ufs/core/ufshcd.c:8140

        if (ufshcd_is_clkscaling_supported(hba)) {
                memcpy(&hba->clk_scaling.saved_pwr_info.info,
                        &hba->pwr_info,
                        sizeof(struct ufs_pa_layer_attr)); 
                hba->clk_scaling.saved_pwr_info.is_valid = true;
                hba->clk_scaling.is_allowed = true;

                ret = ufshcd_devfreq_init(hba);
                if (ret)
                        goto out;

                hba->clk_scaling.is_enabled = true;
                ufshcd_init_clk_scaling_sysfs(hba);
        }

I tested this idea on the Qualcomm sa8540p-ride, and UFS clock scaling
seems to be working without issue. No error on boot and the
/sys/kernel/tracing/events/ufs/ufshcd_clk_scaling traces are similar with
and without the change when running fio to put UFS under load.

Do you think this could be an acceptable compromise for boot time? It
should not slow things down too much since the really time-consuming parts
(ie. UFS initialization) would still be in the async routine.

Best,

Adrien




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux