All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanley Chu <stanley.chu@mediatek.com>
To: <linux-scsi@vger.kernel.org>, <martin.petersen@oracle.com>,
	<avri.altman@wdc.com>, <alim.akhtar@samsung.com>,
	<pedrom.sousa@synopsys.com>, <sthumma@codeaurora.org>,
	<jejb@linux.ibm.com>, <bvanassche@acm.org>
Cc: <linux-mediatek@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>, <kernel-team@android.com>,
	<matthias.bgg@gmail.com>, <evgreen@chromium.org>,
	<beanhuo@micron.com>, <marc.w.gonzalez@free.fr>,
	<subhashj@codeaurora.org>, <vivek.gautam@codeaurora.org>,
	<kuohong.wang@mediatek.com>, <peter.wang@mediatek.com>,
	<chun-hung.wu@mediatek.com>, <andy.teng@mediatek.com>,
	Stanley Chu <stanley.chu@mediatek.com>
Subject: [PATCH v3 0/3] scsi: core: allow auto suspend override by low-level driver
Date: Mon, 16 Sep 2019 14:47:14 +0800	[thread overview]
Message-ID: <1568616437-16271-1-git-send-email-stanley.chu@mediatek.com> (raw)

Until now the scsi mid-layer forbids runtime suspend till userspace enables it. This is mainly to quarantine some disks with broken runtime power management or have high latencies executing suspend resume callbacks. If the userspace doesn't enable the runtime suspend the underlying hardware will be always on even when it is not doing any useful work and thus wasting power.

Some low-level drivers for the controllers can efficiently use runtime power management to reduce power consumption and improve battery life.

This patchset allows runtime suspend parameters override within the LLD itself instead of waiting for userspace to control the power management, and make UFS as the first user of this capability.

v2 => v3:
- Create a member indicating autosuspend delay for the same SCSI host in SCSI host template (Bart)
- Use separate variables to control different things, (Bart)
    (a) Whether or not runtime suspend is enabled at device creation time
    (b) The power management autosuspend delay

v1 => v2:
- Allow "zero" sdev->rpm_autosuspend_delay (Avri)
- Fix format of some lines (Avri)


Stanley Chu (3):
  scsi: core: allow auto suspend override by low-level driver
  scsi: ufs: override auto suspend tunables for ufs
  scsi: ufs-mediatek: enable auto suspend capability

 drivers/scsi/scsi_sysfs.c       |  3 ++-
 drivers/scsi/sd.c               |  4 ++++
 drivers/scsi/ufs/ufs-mediatek.c |  3 +++
 drivers/scsi/ufs/ufshcd.c       |  9 +++++++++
 drivers/scsi/ufs/ufshcd.h       | 10 ++++++++++
 include/scsi/scsi_device.h      |  2 +-
 include/scsi/scsi_host.h        |  3 +++
 7 files changed, 32 insertions(+), 2 deletions(-)

-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Stanley Chu <stanley.chu@mediatek.com>
To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
	avri.altman@wdc.com, alim.akhtar@samsung.com,
	pedrom.sousa@synopsys.com, sthumma@codeaurora.org,
	jejb@linux.ibm.com, bvanassche@acm.org
Cc: marc.w.gonzalez@free.fr, andy.teng@mediatek.com,
	chun-hung.wu@mediatek.com, kuohong.wang@mediatek.com,
	evgreen@chromium.org, subhashj@codeaurora.org,
	linux-mediatek@lists.infradead.org, peter.wang@mediatek.com,
	vivek.gautam@codeaurora.org, matthias.bgg@gmail.com,
	Stanley Chu <stanley.chu@mediatek.com>,
	kernel-team@android.com, linux-arm-kernel@lists.infradead.org,
	beanhuo@micron.com
Subject: [PATCH v3 0/3] scsi: core: allow auto suspend override by low-level driver
Date: Mon, 16 Sep 2019 14:47:14 +0800	[thread overview]
Message-ID: <1568616437-16271-1-git-send-email-stanley.chu@mediatek.com> (raw)

Until now the scsi mid-layer forbids runtime suspend till userspace enables it. This is mainly to quarantine some disks with broken runtime power management or have high latencies executing suspend resume callbacks. If the userspace doesn't enable the runtime suspend the underlying hardware will be always on even when it is not doing any useful work and thus wasting power.

Some low-level drivers for the controllers can efficiently use runtime power management to reduce power consumption and improve battery life.

This patchset allows runtime suspend parameters override within the LLD itself instead of waiting for userspace to control the power management, and make UFS as the first user of this capability.

v2 => v3:
- Create a member indicating autosuspend delay for the same SCSI host in SCSI host template (Bart)
- Use separate variables to control different things, (Bart)
    (a) Whether or not runtime suspend is enabled at device creation time
    (b) The power management autosuspend delay

v1 => v2:
- Allow "zero" sdev->rpm_autosuspend_delay (Avri)
- Fix format of some lines (Avri)


Stanley Chu (3):
  scsi: core: allow auto suspend override by low-level driver
  scsi: ufs: override auto suspend tunables for ufs
  scsi: ufs-mediatek: enable auto suspend capability

 drivers/scsi/scsi_sysfs.c       |  3 ++-
 drivers/scsi/sd.c               |  4 ++++
 drivers/scsi/ufs/ufs-mediatek.c |  3 +++
 drivers/scsi/ufs/ufshcd.c       |  9 +++++++++
 drivers/scsi/ufs/ufshcd.h       | 10 ++++++++++
 include/scsi/scsi_device.h      |  2 +-
 include/scsi/scsi_host.h        |  3 +++
 7 files changed, 32 insertions(+), 2 deletions(-)

-- 
2.18.0

WARNING: multiple messages have this Message-ID (diff)
From: Stanley Chu <stanley.chu@mediatek.com>
To: <linux-scsi@vger.kernel.org>, <martin.petersen@oracle.com>,
	<avri.altman@wdc.com>, <alim.akhtar@samsung.com>,
	<pedrom.sousa@synopsys.com>, <sthumma@codeaurora.org>,
	<jejb@linux.ibm.com>, <bvanassche@acm.org>
Cc: marc.w.gonzalez@free.fr, andy.teng@mediatek.com,
	chun-hung.wu@mediatek.com, kuohong.wang@mediatek.com,
	evgreen@chromium.org, subhashj@codeaurora.org,
	linux-mediatek@lists.infradead.org, peter.wang@mediatek.com,
	vivek.gautam@codeaurora.org, matthias.bgg@gmail.com,
	Stanley Chu <stanley.chu@mediatek.com>,
	kernel-team@android.com, linux-arm-kernel@lists.infradead.org,
	beanhuo@micron.com
Subject: [PATCH v3 0/3] scsi: core: allow auto suspend override by low-level driver
Date: Mon, 16 Sep 2019 14:47:14 +0800	[thread overview]
Message-ID: <1568616437-16271-1-git-send-email-stanley.chu@mediatek.com> (raw)

Until now the scsi mid-layer forbids runtime suspend till userspace enables it. This is mainly to quarantine some disks with broken runtime power management or have high latencies executing suspend resume callbacks. If the userspace doesn't enable the runtime suspend the underlying hardware will be always on even when it is not doing any useful work and thus wasting power.

Some low-level drivers for the controllers can efficiently use runtime power management to reduce power consumption and improve battery life.

This patchset allows runtime suspend parameters override within the LLD itself instead of waiting for userspace to control the power management, and make UFS as the first user of this capability.

v2 => v3:
- Create a member indicating autosuspend delay for the same SCSI host in SCSI host template (Bart)
- Use separate variables to control different things, (Bart)
    (a) Whether or not runtime suspend is enabled at device creation time
    (b) The power management autosuspend delay

v1 => v2:
- Allow "zero" sdev->rpm_autosuspend_delay (Avri)
- Fix format of some lines (Avri)


Stanley Chu (3):
  scsi: core: allow auto suspend override by low-level driver
  scsi: ufs: override auto suspend tunables for ufs
  scsi: ufs-mediatek: enable auto suspend capability

 drivers/scsi/scsi_sysfs.c       |  3 ++-
 drivers/scsi/sd.c               |  4 ++++
 drivers/scsi/ufs/ufs-mediatek.c |  3 +++
 drivers/scsi/ufs/ufshcd.c       |  9 +++++++++
 drivers/scsi/ufs/ufshcd.h       | 10 ++++++++++
 include/scsi/scsi_device.h      |  2 +-
 include/scsi/scsi_host.h        |  3 +++
 7 files changed, 32 insertions(+), 2 deletions(-)

-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2019-09-16  6:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  6:47 Stanley Chu [this message]
2019-09-16  6:47 ` [PATCH v3 0/3] scsi: core: allow auto suspend override by low-level driver Stanley Chu
2019-09-16  6:47 ` Stanley Chu
2019-09-16  6:47 ` [PATCH v3 1/3] " Stanley Chu
2019-09-16  6:47   ` Stanley Chu
2019-09-16  6:47   ` Stanley Chu
2019-09-16 15:16   ` Bart Van Assche
2019-09-16 15:16     ` Bart Van Assche
2019-09-16 15:16     ` Bart Van Assche
2019-09-16 15:55     ` Stanley Chu
2019-09-16 15:55       ` Stanley Chu
2019-09-16 15:55       ` Stanley Chu
2019-09-16  6:47 ` [PATCH v3 2/3] scsi: ufs: override auto suspend tunables for ufs Stanley Chu
2019-09-16  6:47   ` Stanley Chu
2019-09-16  6:47   ` Stanley Chu
2019-09-16 12:33   ` [EXT] " Bean Huo (beanhuo)
2019-09-16 12:33     ` Bean Huo (beanhuo)
2019-09-16 12:33     ` Bean Huo (beanhuo)
2019-09-16  6:47 ` [PATCH v3 3/3] scsi: ufs-mediatek: enable auto suspend capability Stanley Chu
2019-09-16  6:47   ` Stanley Chu
2019-09-16  6:47   ` Stanley Chu

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=1568616437-16271-1-git-send-email-stanley.chu@mediatek.com \
    --to=stanley.chu@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andy.teng@mediatek.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=chun-hung.wu@mediatek.com \
    --cc=evgreen@chromium.org \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-team@android.com \
    --cc=kuohong.wang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=pedrom.sousa@synopsys.com \
    --cc=peter.wang@mediatek.com \
    --cc=sthumma@codeaurora.org \
    --cc=subhashj@codeaurora.org \
    --cc=vivek.gautam@codeaurora.org \
    /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.