lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4403f748-b7c6-7996-f44d-4a2775d2ffa6@intel.com>
Date:   Mon, 5 Mar 2018 15:08:27 +0200
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Avri Altman <Avri.Altman@....com>,
        Vinayak Holikatti <vinholikatti@...il.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>
Cc:     Stanislav Nijnikov <Stanislav.Nijnikov@....com>,
        Jaegeuk Kim <jaegeuk@...nel.org>,
        Bart Van Assche <Bart.VanAssche@....com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Michal Potomski <michalx.potomski@...el.com>,
        Szymon Mielczarek <szymonx.mielczarek@...el.com>
Subject: Re: [PATCH 1/1] scsi: ufs: Add support for Auto-Hibernate Idle Timer

On 19/02/18 08:35, Adrian Hunter wrote:
> On 18/02/18 11:45, Avri Altman wrote:
>>
>>
>>> -----Original Message-----
>>> From: linux-scsi-owner@...r.kernel.org [mailto:linux-scsi-
>>> owner@...r.kernel.org] On Behalf Of Adrian Hunter
>>> Sent: Friday, February 16, 2018 2:01 PM
>>> To: Vinayak Holikatti <vinholikatti@...il.com>; Martin K. Petersen
>>> <martin.petersen@...cle.com>; James E.J. Bottomley
>>> <jejb@...ux.vnet.ibm.com>
>>> Cc: Stanislav Nijnikov <Stanislav.Nijnikov@....com>; Jaegeuk Kim
>>> <jaegeuk@...nel.org>; Bart Van Assche <Bart.VanAssche@....com>; linux-
>>> scsi@...r.kernel.org; linux-kernel@...r.kernel.org; Michal Potomski
>>> <michalx.potomski@...el.com>; Szymon Mielczarek
>>> <szymonx.mielczarek@...el.com>
>>> Subject: [PATCH 1/1] scsi: ufs: Add support for Auto-Hibernate Idle Timer
>>>
>>> UFS host controllers may support an autonomous power management
>>> feature called the Auto-Hibernate Idle Timer. The timer is set to the number
>>> of microseconds of idle time before the UFS host controller will
>>> autonomously put the link into Hibernate state. That will save power at the
>>> expense of increased latency. Any access to the host controller interface
>>> registers will automatically put the link out of Hibernate state. So once
>>> configured, the feature is transparent to the driver.
>>>
>>> Expose the Auto-Hibernate Idle Timer value via SysFS to allow users to
>>> choose between power efficiency or lower latency. Set a default value of
>>> 150 ms.
>>>
>>> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
>>> ---
>>>  Documentation/ABI/testing/sysfs-driver-ufs | 15 ++++++
>>>  drivers/scsi/ufs/ufs-sysfs.c               | 77 ++++++++++++++++++++++++++++++
>>>  drivers/scsi/ufs/ufshcd.c                  | 26 ++++++++++
>>>  drivers/scsi/ufs/ufshcd.h                  |  3 ++
>>>  drivers/scsi/ufs/ufshci.h                  |  7 +++
>>>  5 files changed, 128 insertions(+)
>>>
>>> diff --git a/Documentation/ABI/testing/sysfs-driver-ufs
>>> b/Documentation/ABI/testing/sysfs-driver-ufs
>>> index 07f1c2f8dbfc..c7f9441079eb 100644
>>> --- a/Documentation/ABI/testing/sysfs-driver-ufs
>>> +++ b/Documentation/ABI/testing/sysfs-driver-ufs
>>> @@ -1,3 +1,18 @@
>>> +What:		/sys/bus/*/drivers/ufshcd/*/auto_hibern8
>>> +Date:		February 2018
>>> +Contact:	linux-scsi@...r.kernel.org
>>> +Description:
>>> +		This file contains the auto-hibernate idle timer setting of a
>>> +		UFS host controller. A value of '-1' means auto-hibernate is
>>> not
>>> +		supported. A value of '0' means auto-hibernate is not
>>> enabled.
>>> +		Otherwise the value is the number of microseconds of idle
>>> time
>>> +		before the UFS host controller will autonomously put the link
>>> +		into hibernate state. That will save power at the expense of
>>> +		increased latency. Note that the hardware supports 10-bit
>>> values
>>> +		with a power-of-ten multiplier which allows a maximum
>>> value of
>>> +		102300000. Refer to the UFS Host Controller Interface
>>> +		specification for more details.
>>> +
>>>  What:
>>> 	/sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_type
>>>  Date:		February 2018
>>>  Contact:	Stanislav Nijnikov <stanislav.nijnikov@....com>
>>> diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c index
>>> cd7174d2d225..a0e38776dc92 100644

SNIP

>>> @@ -7843,6 +7863,12 @@ int ufshcd_init(struct ufs_hba *hba, void
>>> __iomem *mmio_base, unsigned int irq)
>>>  						UFS_SLEEP_PWR_MODE,
>>>  						UIC_LINK_HIBERN8_STATE);
>>>
>>> +	/* Set the default auto-hiberate idle timer value to 150 ms */
>> Your commit said you are setting an idle timer in microseconds,  Better use usec to avoid confusion? 
> 
> As the SysFS documentation says "Note that the hardware supports 10-bit
> values with a power-of-ten multiplier ... Refer to the UFS Host Controller
> Interface specification for more details.", so 150,000 us is still a value
> of 150 with a power-of-ten multiplier of 3.

Are there any other comments?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ