[PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1801875

[Impact]
On some Dell XPS models, we observed the power consumption raises higher
than long idle does during s2idle with sk hynix nvme.

C2:
Short idle: 4
Long idle: 1
S2I: 3.7
S5: 0.19

C3:
Short idle: 7.2
Long idle: 4.5
S2I: 6.22
S5: 0.18

C5:
Short idle: 6.5
Long idle: 1
S2I: 2.88
S5: 0.18

[Fix]
From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
APST feature to do the power management. To leverage its APST feature
during s2idle, we can't disable nvme device while suspending, too.
So, here is what we did on the driver, 1. prevent nvme from entering
D3, 2. prevent nvme from being disabled when suspending.

[Test]
Verified on different XPS machines with different sk hynix nvme disks,
it fixes the power consumption issue with no regression. And the power
consumption drops to 0.77W during s2idle.

[Regression Potential]
Low, the patches only applied to specific nvme module, and from our
test, the system is still stable.

[Misc]
This issue should be fixed by the firmware, and we're pushing sk hynix
to fix it. But before sk hynix find out how to solve it, we have to
preserve these commits in our kernel for a while.
BTW, the patches require pm_suspend_via_s2idle() function from below
commit which is still under reviewing.
https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html

AceLan Kao (2):
  pci: prevent sk hynix nvme from entering D3
  nvme: add quirk to not call disable function when suspending

 drivers/nvme/host/nvme.h | 5 +++++
 drivers/nvme/host/pci.c  | 8 +++++++-
 drivers/pci/quirks.c     | 1 +
 include/linux/pci_ids.h  | 2 ++
 4 files changed, 15 insertions(+), 1 deletion(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2][SRU][B][OEM-B] SAUCE: pci: prevent sk hynix nvme from entering D3

AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1801875

It leads to the power consumption raises to 2.2W during s2idle, while
it consumes less than 1W during long idle if put SK hynix nvme to D3
and then enter s2idle.
From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
APST feature to do the power management.
To leverage its APST feature during s2idle, we can't disable nvme
device while suspending, too.

BTW, prevent it from entering D3 will increase the power consumtion around
0.13W ~ 0.15W during short/long idle, and the power consumption during
s2idle becomes 0.77W.

Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/pci/quirks.c    | 1 +
 include/linux/pci_ids.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 3b8f64be2d96..fe4db619a24f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1186,6 +1186,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID,
    occur when mode detecting */
 DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
  PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SK_HYNIX, 0x1527, quirk_no_ata_d3);
 
 /* This was originally an Alpha specific thing, but it really fits here.
  * The i82375 PCI/EISA bridge appears as non-classified. Fix that.
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 98d90a3d7bb2..18c706ff1449 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -3067,4 +3067,6 @@
 
 #define PCI_VENDOR_ID_OCZ 0x1b85
 
+#define PCI_VENDOR_ID_SK_HYNIX         0x1c5c
+
 #endif /* _LINUX_PCI_IDS_H */
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2][SRU][B][OEM-B] SAUCE: nvme: add quirk to not call disable function when suspending

AceLan Kao
In reply to this post by AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1801875

Call nvme_dev_disable() function leads to the power consumption goes
up to 2.2 Watt during suspend-to-idle, and from SK hynix FE, they
suggest us to use its own APST feature to do the power management during
s2idle.
After D3 is diabled and nvme_dev_disable() is not called while
suspending, the power consumption drops to 0.77 Watt during s2idle.

Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/nvme/host/nvme.h | 5 +++++
 drivers/nvme/host/pci.c  | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index a9ec71cce3cc..c2f71cb23700 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -86,6 +86,11 @@ enum nvme_quirks {
  * Set MEDIUM priority on SQ creation
  */
  NVME_QUIRK_MEDIUM_PRIO_SQ = (1 << 7),
+
+ /*
+ * Do not disable nvme when suspending(s2idle)
+ */
+ NVME_QUIRK_NO_DISABLE = (1 << 8),
 };
 
 /*
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3be974ff4261..5f797d595e52 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -29,6 +29,7 @@
 #include <linux/types.h>
 #include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/sed-opal.h>
+#include <linux/suspend.h>
 
 #include "nvme.h"
 
@@ -2611,8 +2612,11 @@ static int nvme_suspend(struct device *dev)
 {
  struct pci_dev *pdev = to_pci_dev(dev);
  struct nvme_dev *ndev = pci_get_drvdata(pdev);
+ struct nvme_ctrl *ctrl = &ndev->ctrl;
+
+ if (!(pm_suspend_via_s2idle() && (ctrl->quirks & NVME_QUIRK_NO_DISABLE)))
+ nvme_dev_disable(ndev, true);
 
- nvme_dev_disable(ndev, true);
  return 0;
 }
 
@@ -2709,6 +2713,8 @@ static const struct pci_device_id nvme_id_table[] = {
  .driver_data = NVME_QUIRK_LIGHTNVM, },
  { PCI_DEVICE(0x1d1d, 0x2807), /* CNEX WL */
  .driver_data = NVME_QUIRK_LIGHTNVM, },
+ { PCI_VDEVICE(SK_HYNIX, 0x1527), /* Sk Hynix */
+ .driver_data = NVME_QUIRK_NO_DISABLE, },
  { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
  { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
  { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2][SRU][C] SAUCE: pci: prevent sk hynix nvme from entering D3

AceLan Kao
In reply to this post by AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1801875

It leads to the power consumption raises to 2.2W during s2idle, while
it consumes less than 1W during long idle if put SK hynix nvme to D3
and then enter s2idle.
From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
APST feature to do the power management.
To leverage its APST feature during s2idle, we can't disable nvme
device while suspending, too.

BTW, prevent it from entering D3 will increase the power consumtion around
0.13W ~ 0.15W during short/long idle, and the power consumption during
s2idle becomes 0.77W.

Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/pci/quirks.c    | 1 +
 include/linux/pci_ids.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f65fd0a067aa..56d9341822d1 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1338,6 +1338,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID,
    occur when mode detecting */
 DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
  PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SK_HYNIX, 0x1527, quirk_no_ata_d3);
 
 /*
  * This was originally an Alpha-specific thing, but it really fits here.
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index bf85e152af05..8cb5dbeb5ed4 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -3084,4 +3084,6 @@
 
 #define PCI_VENDOR_ID_NCUBE 0x10ff
 
+#define PCI_VENDOR_ID_SK_HYNIX 0x1c5c
+
 #endif /* _LINUX_PCI_IDS_H */
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2][SRU][C] SAUCE: nvme: add quirk to not call disable function when suspending

AceLan Kao
In reply to this post by AceLan Kao
BugLink: https://bugs.launchpad.net/bugs/1801875

Call nvme_dev_disable() function leads to the power consumption goes
up to 2.2 Watt during suspend-to-idle, and from SK hynix FE, they
suggest us to use its own APST feature to do the power management during
s2idle.
After D3 is diabled and nvme_dev_disable() is not called while
suspending, the power consumption drops to 0.77 Watt during s2idle.

Signed-off-by: AceLan Kao <[hidden email]>
---
 drivers/nvme/host/nvme.h | 5 +++++
 drivers/nvme/host/pci.c  | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 0c4a33df3b2f..8e27f351d25e 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -90,6 +90,11 @@ enum nvme_quirks {
  * Set MEDIUM priority on SQ creation
  */
  NVME_QUIRK_MEDIUM_PRIO_SQ = (1 << 7),
+
+ /*
+ * Do not disable nvme when suspending(s2idle)
+ */
+ NVME_QUIRK_NO_DISABLE = (1 << 8),
 };
 
 /*
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e10b0d20c4a7..e7e5099ce6e7 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -30,6 +30,7 @@
 #include <linux/types.h>
 #include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/sed-opal.h>
+#include <linux/suspend.h>
 
 #include "nvme.h"
 
@@ -2662,8 +2663,11 @@ static int nvme_suspend(struct device *dev)
 {
  struct pci_dev *pdev = to_pci_dev(dev);
  struct nvme_dev *ndev = pci_get_drvdata(pdev);
+ struct nvme_ctrl *ctrl = &ndev->ctrl;
+
+ if (!(pm_suspend_via_s2idle() && (ctrl->quirks & NVME_QUIRK_NO_DISABLE)))
+ nvme_dev_disable(ndev, true);
 
- nvme_dev_disable(ndev, true);
  return 0;
 }
 
@@ -2767,6 +2771,8 @@ static const struct pci_device_id nvme_id_table[] = {
  .driver_data = NVME_QUIRK_LIGHTNVM, },
  { PCI_DEVICE(0x1d1d, 0x2601), /* CNEX Granby */
  .driver_data = NVME_QUIRK_LIGHTNVM, },
+ { PCI_VDEVICE(SK_HYNIX, 0x1527), /* Sk Hynix */
+ .driver_data = NVME_QUIRK_NO_DISABLE, },
  { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
  { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
  { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2][SRU][B][OEM-B] SAUCE: nvme: add quirk to not call disable function when suspending

Kleber Souza
In reply to this post by AceLan Kao
On 11/06/18 11:53, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1801875
>
> Call nvme_dev_disable() function leads to the power consumption goes
> up to 2.2 Watt during suspend-to-idle, and from SK hynix FE, they
> suggest us to use its own APST feature to do the power management during
> s2idle.
> After D3 is diabled and nvme_dev_disable() is not called while
> suspending, the power consumption drops to 0.77 Watt during s2idle.
>
> Signed-off-by: AceLan Kao <[hidden email]>
> ---
>  drivers/nvme/host/nvme.h | 5 +++++
>  drivers/nvme/host/pci.c  | 8 +++++++-
>  2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index a9ec71cce3cc..c2f71cb23700 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -86,6 +86,11 @@ enum nvme_quirks {
>   * Set MEDIUM priority on SQ creation
>   */
>   NVME_QUIRK_MEDIUM_PRIO_SQ = (1 << 7),
> +
> + /*
> + * Do not disable nvme when suspending(s2idle)
> + */
> + NVME_QUIRK_NO_DISABLE = (1 << 8),
>  };
>  
>  /*
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 3be974ff4261..5f797d595e52 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -29,6 +29,7 @@
>  #include <linux/types.h>
>  #include <linux/io-64-nonatomic-lo-hi.h>
>  #include <linux/sed-opal.h>
> +#include <linux/suspend.h>
>  
>  #include "nvme.h"
>  
> @@ -2611,8 +2612,11 @@ static int nvme_suspend(struct device *dev)
>  {
>   struct pci_dev *pdev = to_pci_dev(dev);
>   struct nvme_dev *ndev = pci_get_drvdata(pdev);
> + struct nvme_ctrl *ctrl = &ndev->ctrl;
> +
> + if (!(pm_suspend_via_s2idle() && (ctrl->quirks & NVME_QUIRK_NO_DISABLE)))
> + nvme_dev_disable(ndev, true);
>  
> - nvme_dev_disable(ndev, true);
>   return 0;
>  }

Hi AceLan,

Are there any plans to submit these changes, at least the generic part,
to mainline?


Thanks,
Kleber

>  
> @@ -2709,6 +2713,8 @@ static const struct pci_device_id nvme_id_table[] = {
>   .driver_data = NVME_QUIRK_LIGHTNVM, },
>   { PCI_DEVICE(0x1d1d, 0x2807), /* CNEX WL */
>   .driver_data = NVME_QUIRK_LIGHTNVM, },
> + { PCI_VDEVICE(SK_HYNIX, 0x1527), /* Sk Hynix */
> + .driver_data = NVME_QUIRK_NO_DISABLE, },
>   { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
>   { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
>   { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/cmnt[B][C]: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

Kleber Souza
In reply to this post by AceLan Kao
On 11/06/18 11:53, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1801875
>
> [Impact]
> On some Dell XPS models, we observed the power consumption raises higher
> than long idle does during s2idle with sk hynix nvme.
>
> C2:
> Short idle: 4
> Long idle: 1
> S2I: 3.7
> S5: 0.19
>
> C3:
> Short idle: 7.2
> Long idle: 4.5
> S2I: 6.22
> S5: 0.18
>
> C5:
> Short idle: 6.5
> Long idle: 1
> S2I: 2.88
> S5: 0.18
>
> [Fix]
> From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
> APST feature to do the power management. To leverage its APST feature
> during s2idle, we can't disable nvme device while suspending, too.
> So, here is what we did on the driver, 1. prevent nvme from entering
> D3, 2. prevent nvme from being disabled when suspending.
>
> [Test]
> Verified on different XPS machines with different sk hynix nvme disks,
> it fixes the power consumption issue with no regression. And the power
> consumption drops to 0.77W during s2idle.
>
> [Regression Potential]
> Low, the patches only applied to specific nvme module, and from our
> test, the system is still stable.
>
> [Misc]
> This issue should be fixed by the firmware, and we're pushing sk hynix
> to fix it. But before sk hynix find out how to solve it, we have to
> preserve these commits in our kernel for a while.
> BTW, the patches require pm_suspend_via_s2idle() function from below
> commit which is still under reviewing.
> https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
>
> AceLan Kao (2):
>   pci: prevent sk hynix nvme from entering D3
>   nvme: add quirk to not call disable function when suspending
>
>  drivers/nvme/host/nvme.h | 5 +++++
>  drivers/nvme/host/pci.c  | 8 +++++++-
>  drivers/pci/quirks.c     | 1 +
>  include/linux/pci_ids.h  | 2 ++
>  4 files changed, 15 insertions(+), 1 deletion(-)
>
For Bionic and Cosmic:

Acked-by: Kleber Sacilotto de Souza <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2][SRU][B][OEM-B] SAUCE: nvme: add quirk to not call disable function when suspending

AceLan Kao
In reply to this post by Kleber Souza
I did, although maintainer doesn't like it much.
https://lkml.org/lkml/2018/11/6/583
Kleber Souza <[hidden email]> 於 2018年11月7日 週三 上午12:48寫道:

>
> On 11/06/18 11:53, AceLan Kao wrote:
> > BugLink: https://bugs.launchpad.net/bugs/1801875
> >
> > Call nvme_dev_disable() function leads to the power consumption goes
> > up to 2.2 Watt during suspend-to-idle, and from SK hynix FE, they
> > suggest us to use its own APST feature to do the power management during
> > s2idle.
> > After D3 is diabled and nvme_dev_disable() is not called while
> > suspending, the power consumption drops to 0.77 Watt during s2idle.
> >
> > Signed-off-by: AceLan Kao <[hidden email]>
> > ---
> >  drivers/nvme/host/nvme.h | 5 +++++
> >  drivers/nvme/host/pci.c  | 8 +++++++-
> >  2 files changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> > index a9ec71cce3cc..c2f71cb23700 100644
> > --- a/drivers/nvme/host/nvme.h
> > +++ b/drivers/nvme/host/nvme.h
> > @@ -86,6 +86,11 @@ enum nvme_quirks {
> >        * Set MEDIUM priority on SQ creation
> >        */
> >       NVME_QUIRK_MEDIUM_PRIO_SQ               = (1 << 7),
> > +
> > +     /*
> > +      * Do not disable nvme when suspending(s2idle)
> > +      */
> > +     NVME_QUIRK_NO_DISABLE                   = (1 << 8),
> >  };
> >
> >  /*
> > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> > index 3be974ff4261..5f797d595e52 100644
> > --- a/drivers/nvme/host/pci.c
> > +++ b/drivers/nvme/host/pci.c
> > @@ -29,6 +29,7 @@
> >  #include <linux/types.h>
> >  #include <linux/io-64-nonatomic-lo-hi.h>
> >  #include <linux/sed-opal.h>
> > +#include <linux/suspend.h>
> >
> >  #include "nvme.h"
> >
> > @@ -2611,8 +2612,11 @@ static int nvme_suspend(struct device *dev)
> >  {
> >       struct pci_dev *pdev = to_pci_dev(dev);
> >       struct nvme_dev *ndev = pci_get_drvdata(pdev);
> > +     struct nvme_ctrl *ctrl = &ndev->ctrl;
> > +
> > +     if (!(pm_suspend_via_s2idle() && (ctrl->quirks & NVME_QUIRK_NO_DISABLE)))
> > +             nvme_dev_disable(ndev, true);
> >
> > -     nvme_dev_disable(ndev, true);
> >       return 0;
> >  }
>
> Hi AceLan,
>
> Are there any plans to submit these changes, at least the generic part,
> to mainline?
>
>
> Thanks,
> Kleber
>
> >
> > @@ -2709,6 +2713,8 @@ static const struct pci_device_id nvme_id_table[] = {
> >               .driver_data = NVME_QUIRK_LIGHTNVM, },
> >       { PCI_DEVICE(0x1d1d, 0x2807),   /* CNEX WL */
> >               .driver_data = NVME_QUIRK_LIGHTNVM, },
> > +     { PCI_VDEVICE(SK_HYNIX, 0x1527),        /* Sk Hynix */
> > +             .driver_data = NVME_QUIRK_NO_DISABLE, },
> >       { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
> >       { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
> >       { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
>
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 2/2][SRU][B][OEM-B] SAUCE: nvme: add quirk to not call disable function when suspending

Kleber Souza
On 11/07/18 03:01, AceLan Kao wrote:
> I did, although maintainer doesn't like it much.
> https://lkml.org/lkml/2018/11/6/583

Thank you for the clarification, AceLan.

I see the point of the maintainer and it does make sense for us to keep
this SAUCE patches while the firmware doesn't get fixed.


Kleber

> Kleber Souza <[hidden email]> 於 2018年11月7日 週三 上午12:48寫道:
>> On 11/06/18 11:53, AceLan Kao wrote:
>>> BugLink: https://bugs.launchpad.net/bugs/1801875
>>>
>>> Call nvme_dev_disable() function leads to the power consumption goes
>>> up to 2.2 Watt during suspend-to-idle, and from SK hynix FE, they
>>> suggest us to use its own APST feature to do the power management during
>>> s2idle.
>>> After D3 is diabled and nvme_dev_disable() is not called while
>>> suspending, the power consumption drops to 0.77 Watt during s2idle.
>>>
>>> Signed-off-by: AceLan Kao <[hidden email]>
>>> ---
>>>  drivers/nvme/host/nvme.h | 5 +++++
>>>  drivers/nvme/host/pci.c  | 8 +++++++-
>>>  2 files changed, 12 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
>>> index a9ec71cce3cc..c2f71cb23700 100644
>>> --- a/drivers/nvme/host/nvme.h
>>> +++ b/drivers/nvme/host/nvme.h
>>> @@ -86,6 +86,11 @@ enum nvme_quirks {
>>>        * Set MEDIUM priority on SQ creation
>>>        */
>>>       NVME_QUIRK_MEDIUM_PRIO_SQ               = (1 << 7),
>>> +
>>> +     /*
>>> +      * Do not disable nvme when suspending(s2idle)
>>> +      */
>>> +     NVME_QUIRK_NO_DISABLE                   = (1 << 8),
>>>  };
>>>
>>>  /*
>>> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
>>> index 3be974ff4261..5f797d595e52 100644
>>> --- a/drivers/nvme/host/pci.c
>>> +++ b/drivers/nvme/host/pci.c
>>> @@ -29,6 +29,7 @@
>>>  #include <linux/types.h>
>>>  #include <linux/io-64-nonatomic-lo-hi.h>
>>>  #include <linux/sed-opal.h>
>>> +#include <linux/suspend.h>
>>>
>>>  #include "nvme.h"
>>>
>>> @@ -2611,8 +2612,11 @@ static int nvme_suspend(struct device *dev)
>>>  {
>>>       struct pci_dev *pdev = to_pci_dev(dev);
>>>       struct nvme_dev *ndev = pci_get_drvdata(pdev);
>>> +     struct nvme_ctrl *ctrl = &ndev->ctrl;
>>> +
>>> +     if (!(pm_suspend_via_s2idle() && (ctrl->quirks & NVME_QUIRK_NO_DISABLE)))
>>> +             nvme_dev_disable(ndev, true);
>>>
>>> -     nvme_dev_disable(ndev, true);
>>>       return 0;
>>>  }
>> Hi AceLan,
>>
>> Are there any plans to submit these changes, at least the generic part,
>> to mainline?
>>
>>
>> Thanks,
>> Kleber
>>
>>> @@ -2709,6 +2713,8 @@ static const struct pci_device_id nvme_id_table[] = {
>>>               .driver_data = NVME_QUIRK_LIGHTNVM, },
>>>       { PCI_DEVICE(0x1d1d, 0x2807),   /* CNEX WL */
>>>               .driver_data = NVME_QUIRK_LIGHTNVM, },
>>> +     { PCI_VDEVICE(SK_HYNIX, 0x1527),        /* Sk Hynix */
>>> +             .driver_data = NVME_QUIRK_NO_DISABLE, },
>>>       { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
>>>       { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
>>>       { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
>>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/Cmnt: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

Stefan Bader-2
In reply to this post by AceLan Kao
On 06.11.18 11:53, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1801875
>
> [Impact]
> On some Dell XPS models, we observed the power consumption raises higher
> than long idle does during s2idle with sk hynix nvme.
>
> C2:
> Short idle: 4
> Long idle: 1
> S2I: 3.7
> S5: 0.19
>
> C3:
> Short idle: 7.2
> Long idle: 4.5
> S2I: 6.22
> S5: 0.18
>
> C5:
> Short idle: 6.5
> Long idle: 1
> S2I: 2.88
> S5: 0.18
>
> [Fix]
> From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
> APST feature to do the power management. To leverage its APST feature
> during s2idle, we can't disable nvme device while suspending, too.
> So, here is what we did on the driver, 1. prevent nvme from entering
> D3, 2. prevent nvme from being disabled when suspending.
>
> [Test]
> Verified on different XPS machines with different sk hynix nvme disks,
> it fixes the power consumption issue with no regression. And the power
> consumption drops to 0.77W during s2idle.
>
> [Regression Potential]
> Low, the patches only applied to specific nvme module, and from our
> test, the system is still stable.
>
> [Misc]
> This issue should be fixed by the firmware, and we're pushing sk hynix
> to fix it. But before sk hynix find out how to solve it, we have to
> preserve these commits in our kernel for a while.
> BTW, the patches require pm_suspend_via_s2idle() function from below
> commit which is still under reviewing.
> https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
>
> AceLan Kao (2):
>   pci: prevent sk hynix nvme from entering D3
>   nvme: add quirk to not call disable function when suspending
>
>  drivers/nvme/host/nvme.h | 5 +++++
>  drivers/nvme/host/pci.c  | 8 +++++++-
>  drivers/pci/quirks.c     | 1 +
>  include/linux/pci_ids.h  | 2 ++
>  4 files changed, 15 insertions(+), 1 deletion(-)
>
Patches look reasonable and bug report has expected tasks. Just cover email is a
bit confusing because it does not list Cosmic at all.

Acked-by: Stefan Bader <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED[Unstable]: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

Seth Forshee
In reply to this post by AceLan Kao
On Tue, Nov 06, 2018 at 06:53:10PM +0800, AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1801875
>
> [Impact]
> On some Dell XPS models, we observed the power consumption raises higher
> than long idle does during s2idle with sk hynix nvme.
>
> C2:
> Short idle: 4
> Long idle: 1
> S2I: 3.7
> S5: 0.19
>
> C3:
> Short idle: 7.2
> Long idle: 4.5
> S2I: 6.22
> S5: 0.18
>
> C5:
> Short idle: 6.5
> Long idle: 1
> S2I: 2.88
> S5: 0.18
>
> [Fix]
> From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
> APST feature to do the power management. To leverage its APST feature
> during s2idle, we can't disable nvme device while suspending, too.
> So, here is what we did on the driver, 1. prevent nvme from entering
> D3, 2. prevent nvme from being disabled when suspending.
>
> [Test]
> Verified on different XPS machines with different sk hynix nvme disks,
> it fixes the power consumption issue with no regression. And the power
> consumption drops to 0.77W during s2idle.
>
> [Regression Potential]
> Low, the patches only applied to specific nvme module, and from our
> test, the system is still stable.
>
> [Misc]
> This issue should be fixed by the firmware, and we're pushing sk hynix
> to fix it. But before sk hynix find out how to solve it, we have to
> preserve these commits in our kernel for a while.
> BTW, the patches require pm_suspend_via_s2idle() function from below
> commit which is still under reviewing.
> https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html

Applied to unstable/master, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED(B,C)/cmnt: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

Khaled Elmously
In reply to this post by AceLan Kao
Does this need to be applied to bionic-oem specifically? It's been applied only to bionic/master-next (and cosmic/master-next).


On 2018-11-06 18:53:10 , AceLan Kao wrote:

> BugLink: https://bugs.launchpad.net/bugs/1801875
>
> [Impact]
> On some Dell XPS models, we observed the power consumption raises higher
> than long idle does during s2idle with sk hynix nvme.
>
> C2:
> Short idle: 4
> Long idle: 1
> S2I: 3.7
> S5: 0.19
>
> C3:
> Short idle: 7.2
> Long idle: 4.5
> S2I: 6.22
> S5: 0.18
>
> C5:
> Short idle: 6.5
> Long idle: 1
> S2I: 2.88
> S5: 0.18
>
> [Fix]
> From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
> APST feature to do the power management. To leverage its APST feature
> during s2idle, we can't disable nvme device while suspending, too.
> So, here is what we did on the driver, 1. prevent nvme from entering
> D3, 2. prevent nvme from being disabled when suspending.
>
> [Test]
> Verified on different XPS machines with different sk hynix nvme disks,
> it fixes the power consumption issue with no regression. And the power
> consumption drops to 0.77W during s2idle.
>
> [Regression Potential]
> Low, the patches only applied to specific nvme module, and from our
> test, the system is still stable.
>
> [Misc]
> This issue should be fixed by the firmware, and we're pushing sk hynix
> to fix it. But before sk hynix find out how to solve it, we have to
> preserve these commits in our kernel for a while.
> BTW, the patches require pm_suspend_via_s2idle() function from below
> commit which is still under reviewing.
> https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
>
> AceLan Kao (2):
>   pci: prevent sk hynix nvme from entering D3
>   nvme: add quirk to not call disable function when suspending
>
>  drivers/nvme/host/nvme.h | 5 +++++
>  drivers/nvme/host/pci.c  | 8 +++++++-
>  drivers/pci/quirks.c     | 1 +
>  include/linux/pci_ids.h  | 2 ++
>  4 files changed, 15 insertions(+), 1 deletion(-)
>
> --
> 2.17.1
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED(B,C)/cmnt: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

AceLan Kao
Yes, these commits should apply to bionic-oem, too.
I think bionic-oem will rebase on generic kernel, so I didn't specify
bionic-oem explicitly.
Khaled Elmously <[hidden email]> 於 2018年11月8日 週四 下午1:06寫道:

>
> Does this need to be applied to bionic-oem specifically? It's been applied only to bionic/master-next (and cosmic/master-next).
>
>
> On 2018-11-06 18:53:10 , AceLan Kao wrote:
> > BugLink: https://bugs.launchpad.net/bugs/1801875
> >
> > [Impact]
> > On some Dell XPS models, we observed the power consumption raises higher
> > than long idle does during s2idle with sk hynix nvme.
> >
> > C2:
> > Short idle: 4
> > Long idle: 1
> > S2I: 3.7
> > S5: 0.19
> >
> > C3:
> > Short idle: 7.2
> > Long idle: 4.5
> > S2I: 6.22
> > S5: 0.18
> >
> > C5:
> > Short idle: 6.5
> > Long idle: 1
> > S2I: 2.88
> > S5: 0.18
> >
> > [Fix]
> > From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
> > APST feature to do the power management. To leverage its APST feature
> > during s2idle, we can't disable nvme device while suspending, too.
> > So, here is what we did on the driver, 1. prevent nvme from entering
> > D3, 2. prevent nvme from being disabled when suspending.
> >
> > [Test]
> > Verified on different XPS machines with different sk hynix nvme disks,
> > it fixes the power consumption issue with no regression. And the power
> > consumption drops to 0.77W during s2idle.
> >
> > [Regression Potential]
> > Low, the patches only applied to specific nvme module, and from our
> > test, the system is still stable.
> >
> > [Misc]
> > This issue should be fixed by the firmware, and we're pushing sk hynix
> > to fix it. But before sk hynix find out how to solve it, we have to
> > preserve these commits in our kernel for a while.
> > BTW, the patches require pm_suspend_via_s2idle() function from below
> > commit which is still under reviewing.
> > https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
> >
> > AceLan Kao (2):
> >   pci: prevent sk hynix nvme from entering D3
> >   nvme: add quirk to not call disable function when suspending
> >
> >  drivers/nvme/host/nvme.h | 5 +++++
> >  drivers/nvme/host/pci.c  | 8 +++++++-
> >  drivers/pci/quirks.c     | 1 +
> >  include/linux/pci_ids.h  | 2 ++
> >  4 files changed, 15 insertions(+), 1 deletion(-)
> >
> > --
> > 2.17.1
> >
> >
> > --
> > kernel-team mailing list
> > [hidden email]
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED(B,C)/cmnt: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

AceLan Kao
BTW, my patches use a function, pm_suspend_via_s2idle(),
from below commit which seems doesn't be applied to bionic/cosmic yet.
I've give it one ack, please consider apply this commit before mine.
Thanks

https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
AceLan Kao <[hidden email]> 於 2018年11月8日 週四 下午4:32寫道:

>
> Yes, these commits should apply to bionic-oem, too.
> I think bionic-oem will rebase on generic kernel, so I didn't specify
> bionic-oem explicitly.
> Khaled Elmously <[hidden email]> 於 2018年11月8日 週四 下午1:06寫道:
> >
> > Does this need to be applied to bionic-oem specifically? It's been applied only to bionic/master-next (and cosmic/master-next).
> >
> >
> > On 2018-11-06 18:53:10 , AceLan Kao wrote:
> > > BugLink: https://bugs.launchpad.net/bugs/1801875
> > >
> > > [Impact]
> > > On some Dell XPS models, we observed the power consumption raises higher
> > > than long idle does during s2idle with sk hynix nvme.
> > >
> > > C2:
> > > Short idle: 4
> > > Long idle: 1
> > > S2I: 3.7
> > > S5: 0.19
> > >
> > > C3:
> > > Short idle: 7.2
> > > Long idle: 4.5
> > > S2I: 6.22
> > > S5: 0.18
> > >
> > > C5:
> > > Short idle: 6.5
> > > Long idle: 1
> > > S2I: 2.88
> > > S5: 0.18
> > >
> > > [Fix]
> > > From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
> > > APST feature to do the power management. To leverage its APST feature
> > > during s2idle, we can't disable nvme device while suspending, too.
> > > So, here is what we did on the driver, 1. prevent nvme from entering
> > > D3, 2. prevent nvme from being disabled when suspending.
> > >
> > > [Test]
> > > Verified on different XPS machines with different sk hynix nvme disks,
> > > it fixes the power consumption issue with no regression. And the power
> > > consumption drops to 0.77W during s2idle.
> > >
> > > [Regression Potential]
> > > Low, the patches only applied to specific nvme module, and from our
> > > test, the system is still stable.
> > >
> > > [Misc]
> > > This issue should be fixed by the firmware, and we're pushing sk hynix
> > > to fix it. But before sk hynix find out how to solve it, we have to
> > > preserve these commits in our kernel for a while.
> > > BTW, the patches require pm_suspend_via_s2idle() function from below
> > > commit which is still under reviewing.
> > > https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
> > >
> > > AceLan Kao (2):
> > >   pci: prevent sk hynix nvme from entering D3
> > >   nvme: add quirk to not call disable function when suspending
> > >
> > >  drivers/nvme/host/nvme.h | 5 +++++
> > >  drivers/nvme/host/pci.c  | 8 +++++++-
> > >  drivers/pci/quirks.c     | 1 +
> > >  include/linux/pci_ids.h  | 2 ++
> > >  4 files changed, 15 insertions(+), 1 deletion(-)
> > >
> > > --
> > > 2.17.1
> > >
> > >
> > > --
> > > kernel-team mailing list
> > > [hidden email]
> > > https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED(B,C)/cmnt: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

Stefan Bader-2
On 08.11.18 09:39, AceLan Kao wrote:
> BTW, my patches use a function, pm_suspend_via_s2idle(),
> from below commit which seems doesn't be applied to bionic/cosmic yet.
> I've give it one ack, please consider apply this commit before mine.
> Thanks
>
Then why was this not clearly documented in the patch submission? We cannot keep
track of those dependencies and if things like that cause us grieve we might
less easy going with future requests.

> https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
> AceLan Kao <[hidden email]> 於 2018年11月8日 週四 下午4:32寫道:
>>
>> Yes, these commits should apply to bionic-oem, too.
>> I think bionic-oem will rebase on generic kernel, so I didn't specify
>> bionic-oem explicitly.
>> Khaled Elmously <[hidden email]> 於 2018年11月8日 週四 下午1:06寫道:
>>>
>>> Does this need to be applied to bionic-oem specifically? It's been applied only to bionic/master-next (and cosmic/master-next).

Usually saying OEM is saying it needs to go there faster than via the main
kernel. And usually AceLan or Timo will take of those things (at least that is
my expectation). So from our stable point of view I blank any OEM-? targets.

-Stefan

>>>
>>>
>>> On 2018-11-06 18:53:10 , AceLan Kao wrote:
>>>> BugLink: https://bugs.launchpad.net/bugs/1801875
>>>>
>>>> [Impact]
>>>> On some Dell XPS models, we observed the power consumption raises higher
>>>> than long idle does during s2idle with sk hynix nvme.
>>>>
>>>> C2:
>>>> Short idle: 4
>>>> Long idle: 1
>>>> S2I: 3.7
>>>> S5: 0.19
>>>>
>>>> C3:
>>>> Short idle: 7.2
>>>> Long idle: 4.5
>>>> S2I: 6.22
>>>> S5: 0.18
>>>>
>>>> C5:
>>>> Short idle: 6.5
>>>> Long idle: 1
>>>> S2I: 2.88
>>>> S5: 0.18
>>>>
>>>> [Fix]
>>>> From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
>>>> APST feature to do the power management. To leverage its APST feature
>>>> during s2idle, we can't disable nvme device while suspending, too.
>>>> So, here is what we did on the driver, 1. prevent nvme from entering
>>>> D3, 2. prevent nvme from being disabled when suspending.
>>>>
>>>> [Test]
>>>> Verified on different XPS machines with different sk hynix nvme disks,
>>>> it fixes the power consumption issue with no regression. And the power
>>>> consumption drops to 0.77W during s2idle.
>>>>
>>>> [Regression Potential]
>>>> Low, the patches only applied to specific nvme module, and from our
>>>> test, the system is still stable.
>>>>
>>>> [Misc]
>>>> This issue should be fixed by the firmware, and we're pushing sk hynix
>>>> to fix it. But before sk hynix find out how to solve it, we have to
>>>> preserve these commits in our kernel for a while.
>>>> BTW, the patches require pm_suspend_via_s2idle() function from below
>>>> commit which is still under reviewing.
>>>> https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
>>>>
>>>> AceLan Kao (2):
>>>>   pci: prevent sk hynix nvme from entering D3
>>>>   nvme: add quirk to not call disable function when suspending
>>>>
>>>>  drivers/nvme/host/nvme.h | 5 +++++
>>>>  drivers/nvme/host/pci.c  | 8 +++++++-
>>>>  drivers/pci/quirks.c     | 1 +
>>>>  include/linux/pci_ids.h  | 2 ++
>>>>  4 files changed, 15 insertions(+), 1 deletion(-)
>>>>
>>>> --
>>>> 2.17.1
>>>>
>>>>
>>>> --
>>>> kernel-team mailing list
>>>> [hidden email]
>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: APPLIED(B,C)/cmnt: [PATCH 0/2][SRU][B][OEM-B] Power consumption during s2idle is higher than long idle(sk hynix)

AceLan Kao
Yes, i've written some words about the dependency in cover letter.
I'll try to point it out more clearly next time.

<quote>
[Misc]
This issue should be fixed by the firmware, and we're pushing sk hynix
to fix it. But before sk hynix find out how to solve it, we have to
preserve these commits in our kernel for a while.
BTW, the patches require pm_suspend_via_s2idle() function from below
commit which is still under reviewing.
https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
</quote>

Stefan Bader <[hidden email]> 於 2018年11月8日 週四 下午6:21寫道:

>
> On 08.11.18 09:39, AceLan Kao wrote:
> > BTW, my patches use a function, pm_suspend_via_s2idle(),
> > from below commit which seems doesn't be applied to bionic/cosmic yet.
> > I've give it one ack, please consider apply this commit before mine.
> > Thanks
> >
> Then why was this not clearly documented in the patch submission? We cannot keep
> track of those dependencies and if things like that cause us grieve we might
> less easy going with future requests.
>
> > https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
> > AceLan Kao <[hidden email]> 於 2018年11月8日 週四 下午4:32寫道:
> >>
> >> Yes, these commits should apply to bionic-oem, too.
> >> I think bionic-oem will rebase on generic kernel, so I didn't specify
> >> bionic-oem explicitly.
> >> Khaled Elmously <[hidden email]> 於 2018年11月8日 週四 下午1:06寫道:
> >>>
> >>> Does this need to be applied to bionic-oem specifically? It's been applied only to bionic/master-next (and cosmic/master-next).
>
> Usually saying OEM is saying it needs to go there faster than via the main
> kernel. And usually AceLan or Timo will take of those things (at least that is
> my expectation). So from our stable point of view I blank any OEM-? targets.
>
> -Stefan
> >>>
> >>>
> >>> On 2018-11-06 18:53:10 , AceLan Kao wrote:
> >>>> BugLink: https://bugs.launchpad.net/bugs/1801875
> >>>>
> >>>> [Impact]
> >>>> On some Dell XPS models, we observed the power consumption raises higher
> >>>> than long idle does during s2idle with sk hynix nvme.
> >>>>
> >>>> C2:
> >>>> Short idle: 4
> >>>> Long idle: 1
> >>>> S2I: 3.7
> >>>> S5: 0.19
> >>>>
> >>>> C3:
> >>>> Short idle: 7.2
> >>>> Long idle: 4.5
> >>>> S2I: 6.22
> >>>> S5: 0.18
> >>>>
> >>>> C5:
> >>>> Short idle: 6.5
> >>>> Long idle: 1
> >>>> S2I: 2.88
> >>>> S5: 0.18
> >>>>
> >>>> [Fix]
> >>>> From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its own
> >>>> APST feature to do the power management. To leverage its APST feature
> >>>> during s2idle, we can't disable nvme device while suspending, too.
> >>>> So, here is what we did on the driver, 1. prevent nvme from entering
> >>>> D3, 2. prevent nvme from being disabled when suspending.
> >>>>
> >>>> [Test]
> >>>> Verified on different XPS machines with different sk hynix nvme disks,
> >>>> it fixes the power consumption issue with no regression. And the power
> >>>> consumption drops to 0.77W during s2idle.
> >>>>
> >>>> [Regression Potential]
> >>>> Low, the patches only applied to specific nvme module, and from our
> >>>> test, the system is still stable.
> >>>>
> >>>> [Misc]
> >>>> This issue should be fixed by the firmware, and we're pushing sk hynix
> >>>> to fix it. But before sk hynix find out how to solve it, we have to
> >>>> preserve these commits in our kernel for a while.
> >>>> BTW, the patches require pm_suspend_via_s2idle() function from below
> >>>> commit which is still under reviewing.
> >>>> https://lists.ubuntu.com/archives/kernel-team/2018-October/096141.html
> >>>>
> >>>> AceLan Kao (2):
> >>>>   pci: prevent sk hynix nvme from entering D3
> >>>>   nvme: add quirk to not call disable function when suspending
> >>>>
> >>>>  drivers/nvme/host/nvme.h | 5 +++++
> >>>>  drivers/nvme/host/pci.c  | 8 +++++++-
> >>>>  drivers/pci/quirks.c     | 1 +
> >>>>  include/linux/pci_ids.h  | 2 ++
> >>>>  4 files changed, 15 insertions(+), 1 deletion(-)
> >>>>
> >>>> --
> >>>> 2.17.1
> >>>>
> >>>>
> >>>> --
> >>>> kernel-team mailing list
> >>>> [hidden email]
> >>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
> >
>
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team