USB suspend, C3 and Vista

At XP CPU couldn’t enter C3 state until all attached USB devices were suspended. Is it still the necessary condition at Vista? I presume it is but want to be sure. Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

Yes, this is a side affect of how the USB HC works, so until there is a
change in the EHCI spec on how to run the schedule on the card, this
requirement will remain.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, February 07, 2007 7:54 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB suspend, C3 and Vista

At XP CPU couldn’t enter C3 state until all attached USB devices were
suspended. Is it still the necessary condition at Vista? I presume it is
but want to be sure. Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks. Does it mean it is necessary to have enabled suspend also for HCs itself? I mean power properties for USB Root Hub where it is disabled by default (and not so straightforward to enable: http://support.microsoft.com/kb/930312/en-us :-O)

BTW, if it is part of EHCI spec, makes any difference if we have USB 1.1 device and HC is in OHCI or UHCI mode?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, February 08, 2007 5:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

Yes, this is a side affect of how the USB HC works, so until there is a
change in the EHCI spec on how to run the schedule on the card, this
requirement will remain.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, February 07, 2007 7:54 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB suspend, C3 and Vista

At XP CPU couldn’t enter C3 state until all attached USB devices were
suspended. Is it still the necessary condition at Vista? I presume it is
but want to be sure. Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

The only reason I mentioned ehci is b/c that is the current spec, I
don’t think there is much development on ochi or uhci anymore, but it
applies to both 1.1 controllers as well.

The basic problem here is that
1 all the host controllers continuously runs its schedule when there is
a device attached
2 running the schedule causes DMA bus master traffic
3 to maintain cache/memory coherency, the processor must be in C0 (or
at the very least, a C state higher then C3)
4 your big power savings come when the processor is idle and in C3

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, February 07, 2007 8:17 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

Thanks. Does it mean it is necessary to have enabled suspend also for
HCs itself? I mean power properties for USB Root Hub where it is
disabled by default (and not so straightforward to enable:
http://support.microsoft.com/kb/930312/en-us :-O)

BTW, if it is part of EHCI spec, makes any difference if we have USB 1.1
device and HC is in OHCI or UHCI mode?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, February 08, 2007 5:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

Yes, this is a side affect of how the USB HC works, so until there is
a
change in the EHCI spec on how to run the schedule on the card, this
requirement will remain.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, February 07, 2007 7:54 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB suspend, C3 and Vista

At XP CPU couldn’t enter C3 state until all attached USB devices were
suspended. Is it still the necessary condition at Vista? I presume it
is
but want to be sure. Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks for the explanation. In my experience processor is can enter C2 when an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile: Which means we can’t avoid device suspend.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, February 08, 2007 6:05 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

The only reason I mentioned ehci is b/c that is the current spec, I
don’t think there is much development on ochi or uhci anymore, but it
applies to both 1.1 controllers as well.

The basic problem here is that
1 all the host controllers continuously runs its schedule when there is
a device attached
2 running the schedule causes DMA bus master traffic
3 to maintain cache/memory coherency, the processor must be in C0 (or
at the very least, a C state higher then C3)
4 your big power savings come when the processor is idle and in C3

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Wednesday, February 07, 2007 8:17 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

Thanks. Does it mean it is necessary to have enabled suspend also for
HCs itself? I mean power properties for USB Root Hub where it is
disabled by default (and not so straightforward to enable:
http://support.microsoft.com/kb/930312/en-us :-O)

BTW, if it is part of EHCI spec, makes any difference if we have USB 1.1
device and HC is in OHCI or UHCI mode?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Thursday, February 08, 2007 5:01 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] USB suspend, C3 and Vista
>
> Yes, this is a side affect of how the USB HC works, so until there is
a
> change in the EHCI spec on how to run the schedule on the card, this
> requirement will remain.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Wednesday, February 07, 2007 7:54 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] USB suspend, C3 and Vista
>
> At XP CPU couldn’t enter C3 state until all attached USB devices were
> suspended. Is it still the necessary condition at Vista? I presume it
is
> but want to be sure. Thanks.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256\>

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

It’s worth mentioning here that the answer depends on the processor, too.
Newer processors can transition from C3 to C2 and back again without OS
intervention, whenever there is DMA active. This means that, while it’s
still helpful to stop DMA when there isn’t anything useful going on, the
effect isn’t as absolute as it was with earlier processors.

  • Jake Oshins
    Windows Kernel Team

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
Thanks for the explanation. In my experience processor is can enter C2 when
an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile: Which
means we can’t avoid device suspend.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Thursday, February 08, 2007 6:05 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] USB suspend, C3 and Vista
>
> The only reason I mentioned ehci is b/c that is the current spec, I
> don’t think there is much development on ochi or uhci anymore, but it
> applies to both 1.1 controllers as well.
>
> The basic problem here is that
> 1 all the host controllers continuously runs its schedule when there is
> a device attached
> 2 running the schedule causes DMA bus master traffic
> 3 to maintain cache/memory coherency, the processor must be in C0 (or
> at the very least, a C state higher then C3)
> 4 your big power savings come when the processor is idle and in C3
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> Sent: Wednesday, February 07, 2007 8:17 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] USB suspend, C3 and Vista
>
> Thanks. Does it mean it is necessary to have enabled suspend also for
> HCs itself? I mean power properties for USB Root Hub where it is
> disabled by default (and not so straightforward to enable:
> http://support.microsoft.com/kb/930312/en-us :-O)
>
> BTW, if it is part of EHCI spec, makes any difference if we have USB 1.1
> device and HC is in OHCI or UHCI mode?
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
>] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Thursday, February 08, 2007 5:01 AM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] USB suspend, C3 and Vista
> >
> > Yes, this is a side affect of how the USB HC works, so until there is
> a
> > change in the EHCI spec on how to run the schedule on the card, this
> > requirement will remain.
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> > Sent: Wednesday, February 07, 2007 7:54 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] USB suspend, C3 and Vista
> >
> > At XP CPU couldn’t enter C3 state until all attached USB devices were
> > suspended. Is it still the necessary condition at Vista? I presume it
> is
> > but want to be sure. Thanks.
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256>
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Does it have any effect in Windows? I’m not sure if I understand consequences because I don’t know how processor Cx states are normally controlled. Does it mean if processor already is in C2 it will go automatically to C3 whenever DMA isn’t active? If so, will OS even know it happened? It can look like silly question but our customer usually use performance monitor C3 counter to see if our USB device behaves acceptable way for them.

BTW, which processors have this ability and is there a way how to find it?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, February 08, 2007 6:08 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] USB suspend, C3 and Vista

It’s worth mentioning here that the answer depends on the processor, too.
Newer processors can transition from C3 to C2 and back again without OS
intervention, whenever there is DMA active. This means that, while it’s
still helpful to stop DMA when there isn’t anything useful going on, the
effect isn’t as absolute as it was with earlier processors.

  • Jake Oshins
    Windows Kernel Team

“Michal Vodicka” wrote in message
> news:xxxxx@ntdev…
> Thanks for the explanation. In my experience processor is can enter C2 when
> an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile: Which
> means we can’t avoid device suspend.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
> > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Thursday, February 08, 2007 6:05 AM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] USB suspend, C3 and Vista
> >
> > The only reason I mentioned ehci is b/c that is the current spec, I
> > don’t think there is much development on ochi or uhci anymore, but it
> > applies to both 1.1 controllers as well.
> >
> > The basic problem here is that
> > 1 all the host controllers continuously runs its schedule when there is
> > a device attached
> > 2 running the schedule causes DMA bus master traffic
> > 3 to maintain cache/memory coherency, the processor must be in C0 (or
> > at the very least, a C state higher then C3)
> > 4 your big power savings come when the processor is idle and in C3
> >
> > d
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> > Sent: Wednesday, February 07, 2007 8:17 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] USB suspend, C3 and Vista
> >
> > Thanks. Does it mean it is necessary to have enabled suspend also for
> > HCs itself? I mean power properties for USB Root Hub where it is
> > disabled by default (and not so straightforward to enable:
> > http://support.microsoft.com/kb/930312/en-us :-O)
> >
> > BTW, if it is part of EHCI spec, makes any difference if we have USB 1.1
> > device and HC is in OHCI or UHCI mode?
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > > ----------
> > > From:
> > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > Reply To: Windows System Software Devs Interest List
> > > Sent: Thursday, February 08, 2007 5:01 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > >
> > > Yes, this is a side affect of how the USB HC works, so until there is
> > a
> > > change in the EHCI spec on how to run the schedule on the card, this
> > > requirement will remain.
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] USB suspend, C3 and Vista
> > >
> > > At XP CPU couldn’t enter C3 state until all attached USB devices were
> > > suspended. Is it still the necessary condition at Vista? I presume it
> > is
> > > but want to be sure. Thanks.
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256>
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

After some testing I’m confused. We have several notebooks here, usually with Intel Core Duo CPUs where C3 processor counter in the Performance Monitor is between 90 - 100% all the time. Both XP and Vista and regardless of USB devices connected. I disabled selective suspend for our device and attached USB mouse which doesn’t support SS and nothing changed. Other PCs immediatelly leave C3 when such USB device is connected (which I’d expect).

Is is the result of what Jake described below? If so, I’d appeciate an explanation how C3 counter works i.e. how OS knows which part of time spent processor in C3 state.

Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Michal Vodicka[SMTP:xxxxx@upek.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, February 08, 2007 9:26 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

Does it have any effect in Windows? I’m not sure if I understand consequences because I don’t know how processor Cx states are normally controlled. Does it mean if processor already is in C2 it will go automatically to C3 whenever DMA isn’t active? If so, will OS even know it happened? It can look like silly question but our customer usually use performance monitor C3 counter to see if our USB device behaves acceptable way for them.

BTW, which processors have this ability and is there a way how to find it?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Thursday, February 08, 2007 6:08 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] USB suspend, C3 and Vista
>
> It’s worth mentioning here that the answer depends on the processor, too.
> Newer processors can transition from C3 to C2 and back again without OS
> intervention, whenever there is DMA active. This means that, while it’s
> still helpful to stop DMA when there isn’t anything useful going on, the
> effect isn’t as absolute as it was with earlier processors.
>
> - Jake Oshins
> Windows Kernel Team
>
>
> “Michal Vodicka” wrote in message
> > news:xxxxx@ntdev…
> > Thanks for the explanation. In my experience processor is can enter C2 when
> > an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile: Which
> > means we can’t avoid device suspend.
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > > ----------
> > > From:
> > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > Reply To: Windows System Software Devs Interest List
> > > Sent: Thursday, February 08, 2007 6:05 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > >
> > > The only reason I mentioned ehci is b/c that is the current spec, I
> > > don’t think there is much development on ochi or uhci anymore, but it
> > > applies to both 1.1 controllers as well.
> > >
> > > The basic problem here is that
> > > 1 all the host controllers continuously runs its schedule when there is
> > > a device attached
> > > 2 running the schedule causes DMA bus master traffic
> > > 3 to maintain cache/memory coherency, the processor must be in C0 (or
> > > at the very least, a C state higher then C3)
> > > 4 your big power savings come when the processor is idle and in C3>
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> > > Sent: Wednesday, February 07, 2007 8:17 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > >
> > > Thanks. Does it mean it is necessary to have enabled suspend also for
> > > HCs itself? I mean power properties for USB Root Hub where it is
> > > disabled by default (and not so straightforward to enable:
> > > http://support.microsoft.com/kb/930312/en-us :-O)
> > >
> > > BTW, if it is part of EHCI spec, makes any difference if we have USB 1.1
> > > device and HC is in OHCI or UHCI mode?
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > > ----------
> > > > From:
> > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> > >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > Reply To: Windows System Software Devs Interest List
> > > > Sent: Thursday, February 08, 2007 5:01 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > > >
> > > > Yes, this is a side affect of how the USB HC works, so until there is
> > > a
> > > > change in the EHCI spec on how to run the schedule on the card, this
> > > > requirement will remain.
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> > > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > At XP CPU couldn’t enter C3 state until all attached USB devices were
> > > > suspended. Is it still the necessary condition at Vista? I presume it
> > > is
> > > > but want to be sure. Thanks.
> > > >
> > > > Best regards,
> > > >
> > > > Michal Vodicka
> > > > UPEK, Inc.
> > > > [xxxxx@upek.com, http://www.upek.com]
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256>
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

Unplug the cable from your NIC, does your processor now drop to C3?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, February 08, 2007 6:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

After some testing I’m confused. We have several notebooks here, usually
with Intel Core Duo CPUs where C3 processor counter in the Performance
Monitor is between 90 - 100% all the time. Both XP and Vista and
regardless of USB devices connected. I disabled selective suspend for
our device and attached USB mouse which doesn’t support SS and nothing
changed. Other PCs immediatelly leave C3 when such USB device is
connected (which I’d expect).

Is is the result of what Jake described below? If so, I’d appeciate an
explanation how C3 counter works i.e. how OS knows which part of time
spent processor in C3 state.

Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Michal Vodicka[SMTP:xxxxx@upek.com]
Reply To: Windows System Software Devs Interest List
Sent: Thursday, February 08, 2007 9:26 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

Does it have any effect in Windows? I’m not sure if I understand
consequences because I don’t know how processor Cx states are normally
controlled. Does it mean if processor already is in C2 it will go
automatically to C3 whenever DMA isn’t active? If so, will OS even know
it happened? It can look like silly question but our customer usually
use performance monitor C3 counter to see if our USB device behaves
acceptable way for them.

BTW, which processors have this ability and is there a way how to find
it?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Thursday, February 08, 2007 6:08 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] USB suspend, C3 and Vista
>
> It’s worth mentioning here that the answer depends on the processor,
too.
> Newer processors can transition from C3 to C2 and back again without
OS
> intervention, whenever there is DMA active. This means that, while
it’s
> still helpful to stop DMA when there isn’t anything useful going on,
the
> effect isn’t as absolute as it was with earlier processors.
>
> - Jake Oshins
> Windows Kernel Team
>
>
> “Michal Vodicka” wrote in message
> > news:xxxxx@ntdev…
> > Thanks for the explanation. In my experience processor is can enter
C2 when
> > an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile:
Which
> > means we can’t avoid device suspend.
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > > ----------
> > > From:
> > >
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
]
> > > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > Reply To: Windows System Software Devs Interest List
> > > Sent: Thursday, February 08, 2007 6:05 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > >
> > > The only reason I mentioned ehci is b/c that is the current spec,
I
> > > don’t think there is much development on ochi or uhci anymore, but
it
> > > applies to both 1.1 controllers as well.
> > >
> > > The basic problem here is that
> > > 1 all the host controllers continuously runs its schedule when
there is
> > > a device attached
> > > 2 running the schedule causes DMA bus master traffic
> > > 3 to maintain cache/memory coherency, the processor must be in C0
(or
> > > at the very least, a C state higher then C3)
> > > 4 your big power savings come when the processor is idle and in
C3>
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> > > Sent: Wednesday, February 07, 2007 8:17 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > >
> > > Thanks. Does it mean it is necessary to have enabled suspend also
for
> > > HCs itself? I mean power properties for USB Root Hub where it is
> > > disabled by default (and not so straightforward to enable:
> > > http://support.microsoft.com/kb/930312/en-us :-O)
> > >
> > > BTW, if it is part of EHCI spec, makes any difference if we have
USB 1.1
> > > device and HC is in OHCI or UHCI mode?
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > > ----------
> > > > From:
> > >
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> > >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > Reply To: Windows System Software Devs Interest List
> > > > Sent: Thursday, February 08, 2007 5:01 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > > >
> > > > Yes, this is a side affect of how the USB HC works, so until
there is
> > > a
> > > > change in the EHCI spec on how to run the schedule on the card,
this
> > > > requirement will remain.
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
Vodicka
> > > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > At XP CPU couldn’t enter C3 state until all attached USB devices
were
> > > > suspended. Is it still the necessary condition at Vista? I
presume it
> > > is
> > > > but want to be sure. Thanks.
> > > >
> > > > Best regards,
> > > >
> > > > Michal Vodicka
> > > > UPEK, Inc.
> > > > [xxxxx@upek.com, http://www.upek.com]
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256>
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Yes. The behavior that you’re looking for – C3 usage stopping when your
device is misbehaving – will only happen with CPUs older than a Core Duo.
While the CPU isn’t actually staying in C3, the OS doesn’t know and can’t do
much to influence the situation.

Note that, even with a Core Duo, you still get better power management if
your device does selective suspend correctly.

Tell the customer to pick an older laptop, specifically one that isn’t a
multi-core or multi-threaded design, for their test.

  • Jake Oshins
    Windows Kernel Team

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
After some testing I’m confused. We have several notebooks here, usually
with Intel Core Duo CPUs where C3 processor counter in the Performance
Monitor is between 90 - 100% all the time. Both XP and Vista and regardless
of USB devices connected. I disabled selective suspend for our device and
attached USB mouse which doesn’t support SS and nothing changed. Other PCs
immediatelly leave C3 when such USB device is connected (which I’d expect).

Is is the result of what Jake described below? If so, I’d appeciate an
explanation how C3 counter works i.e. how OS knows which part of time spent
processor in C3 state.

Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> on behalf of Michal Vodicka[SMTP:xxxxx@upek.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Thursday, February 08, 2007 9:26 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] USB suspend, C3 and Vista
>
> Does it have any effect in Windows? I’m not sure if I understand
> consequences because I don’t know how processor Cx states are normally
> controlled. Does it mean if processor already is in C2 it will go
> automatically to C3 whenever DMA isn’t active? If so, will OS even know it
> happened? It can look like silly question but our customer usually use
> performance monitor C3 counter to see if our USB device behaves acceptable
> way for them.
>
> BTW, which processors have this ability and is there a way how to find it?
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
> > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Thursday, February 08, 2007 6:08 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] USB suspend, C3 and Vista
> >
> > It’s worth mentioning here that the answer depends on the processor,
> > too.
> > Newer processors can transition from C3 to C2 and back again without OS
> > intervention, whenever there is DMA active. This means that, while it’s
> > still helpful to stop DMA when there isn’t anything useful going on, the
> > effect isn’t as absolute as it was with earlier processors.
> >
> > - Jake Oshins
> > Windows Kernel Team
> >
> >
> > “Michal Vodicka” wrote in message
> > news:xxxxx@ntdev…
> > Thanks for the explanation. In my experience processor is can enter C2
> > when
> > an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile:
> > Which
> > means we can’t avoid device suspend.
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > > ----------
> > > From:
> > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > Reply To: Windows System Software Devs Interest List
> > > Sent: Thursday, February 08, 2007 6:05 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > >
> > > The only reason I mentioned ehci is b/c that is the current spec, I
> > > don’t think there is much development on ochi or uhci anymore, but it
> > > applies to both 1.1 controllers as well.
> > >
> > > The basic problem here is that
> > > 1 all the host controllers continuously runs its schedule when there
> > > is
> > > a device attached
> > > 2 running the schedule causes DMA bus master traffic
> > > 3 to maintain cache/memory coherency, the processor must be in C0 (or
> > > at the very least, a C state higher then C3)
> > > 4 your big power savings come when the processor is idle and in C3>
> > >
> > > d
> > >
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> > > Sent: Wednesday, February 07, 2007 8:17 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > >
> > > Thanks. Does it mean it is necessary to have enabled suspend also for
> > > HCs itself? I mean power properties for USB Root Hub where it is
> > > disabled by default (and not so straightforward to enable:
> > > http://support.microsoft.com/kb/930312/en-us :-O)
> > >
> > > BTW, if it is part of EHCI spec, makes any difference if we have USB
> > > 1.1
> > > device and HC is in OHCI or UHCI mode?
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > > ----------
> > > > From:
> > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> > >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > Reply To: Windows System Software Devs Interest List
> > > > Sent: Thursday, February 08, 2007 5:01 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > > >
> > > > Yes, this is a side affect of how the USB HC works, so until there
> > > > is
> > > a
> > > > change in the EHCI spec on how to run the schedule on the card, this
> > > > requirement will remain.
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
> > > > Vodicka
> > > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > At XP CPU couldn’t enter C3 state until all attached USB devices
> > > > were
> > > > suspended. Is it still the necessary condition at Vista? I presume
> > > > it
> > > is
> > > > but want to be sure. Thanks.
> > > >
> > > > Best regards,
> > > >
> > > > Michal Vodicka
> > > > UPEK, Inc.
> > > > [xxxxx@upek.com, http://www.upek.com]
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256>
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Thanks. Could you clarify this part?

While the CPU isn’t actually staying in C3, the OS doesn’t know and can’t do
much to influence the situation.

Our concern is power consumption. What our device consumes when it isn’t suspended can be ignored. The important part is CPU consumption. In the above mode, will CPU draw more than when all USB devices are suspended?

More specifically. Our device and driver correctly support selective suspend. Unfortunately, Vista has a bug which causes long (up to 1024 ms) wakeup from suspend at UHCI HCs. It makes our device almost unusable so we’re looking for other solution. We’re examining a possibility to turn off selective suspend completely at least for some customers. We can afford to have our device powered in the idle state but we can’t afford to raise CPU power consumption for 10% which is usually a difference between C2 and C3 states.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Friday, February 09, 2007 8:14 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] USB suspend, C3 and Vista

Yes. The behavior that you’re looking for – C3 usage stopping when your
device is misbehaving – will only happen with CPUs older than a Core Duo.
While the CPU isn’t actually staying in C3, the OS doesn’t know and can’t do
much to influence the situation.

Note that, even with a Core Duo, you still get better power management if
your device does selective suspend correctly.

Tell the customer to pick an older laptop, specifically one that isn’t a
multi-core or multi-threaded design, for their test.

  • Jake Oshins
    Windows Kernel Team

“Michal Vodicka” wrote in message
> news:xxxxx@ntdev…
> After some testing I’m confused. We have several notebooks here, usually
> with Intel Core Duo CPUs where C3 processor counter in the Performance
> Monitor is between 90 - 100% all the time. Both XP and Vista and regardless
> of USB devices connected. I disabled selective suspend for our device and
> attached USB mouse which doesn’t support SS and nothing changed. Other PCs
> immediatelly leave C3 when such USB device is connected (which I’d expect).
>
> Is is the result of what Jake described below? If so, I’d appeciate an
> explanation how C3 counter works i.e. how OS knows which part of time spent
> processor in C3 state.
>
> Thanks.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
> > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > on behalf of Michal Vodicka[SMTP:xxxxx@upek.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Thursday, February 08, 2007 9:26 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] USB suspend, C3 and Vista
> >
> > Does it have any effect in Windows? I’m not sure if I understand
> > consequences because I don’t know how processor Cx states are normally
> > controlled. Does it mean if processor already is in C2 it will go
> > automatically to C3 whenever DMA isn’t active? If so, will OS even know it
> > happened? It can look like silly question but our customer usually use
> > performance monitor C3 counter to see if our USB device behaves acceptable
> > way for them.
> >
> > BTW, which processors have this ability and is there a way how to find it?
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > > ----------
> > > From:
> > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] >
> > > on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> > > Reply To: Windows System Software Devs Interest List
> > > Sent: Thursday, February 08, 2007 6:08 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: Re:[ntdev] USB suspend, C3 and Vista
> > >
> > > It’s worth mentioning here that the answer depends on the processor,
> > > too.
> > > Newer processors can transition from C3 to C2 and back again without OS
> > > intervention, whenever there is DMA active. This means that, while it’s
> > > still helpful to stop DMA when there isn’t anything useful going on, the
> > > effect isn’t as absolute as it was with earlier processors.
> > >
> > > - Jake Oshins
> > > Windows Kernel Team
> > >
> > >
> > > “Michal Vodicka” wrote in message
> > > news:xxxxx@ntdev…
> > > Thanks for the explanation. In my experience processor is can enter C2
> > > when
> > > an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile:
> > > Which
> > > means we can’t avoid device suspend.
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > > ----------
> > > > From:
> > > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > Reply To: Windows System Software Devs Interest List
> > > > Sent: Thursday, February 08, 2007 6:05 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > The only reason I mentioned ehci is b/c that is the current spec, I
> > > > don’t think there is much development on ochi or uhci anymore, but it
> > > > applies to both 1.1 controllers as well.
> > > >
> > > > The basic problem here is that
> > > > 1 all the host controllers continuously runs its schedule when there
> > > > is
> > > > a device attached
> > > > 2 running the schedule causes DMA bus master traffic
> > > > 3 to maintain cache/memory coherency, the processor must be in C0 (or
> > > > at the very least, a C state higher then C3)
> > > > 4 your big power savings come when the processor is idle and in C3>
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
> > > > Sent: Wednesday, February 07, 2007 8:17 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > Thanks. Does it mean it is necessary to have enabled suspend also for
> > > > HCs itself? I mean power properties for USB Root Hub where it is
> > > > disabled by default (and not so straightforward to enable:
> > > > http://support.microsoft.com/kb/930312/en-us :-O)
> > > >
> > > > BTW, if it is part of EHCI spec, makes any difference if we have USB
> > > > 1.1
> > > > device and HC is in OHCI or UHCI mode?
> > > >
> > > > Best regards,
> > > >
> > > > Michal Vodicka
> > > > UPEK, Inc.
> > > > [xxxxx@upek.com, http://www.upek.com]
> > > >
> > > >
> > > > > ----------
> > > > > From:
> > > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> > > >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > > Reply To: Windows System Software Devs Interest List
> > > > > Sent: Thursday, February 08, 2007 5:01 AM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > > > >
> > > > > Yes, this is a side affect of how the USB HC works, so until there
> > > > > is
> > > > a
> > > > > change in the EHCI spec on how to run the schedule on the card, this
> > > > > requirement will remain.
> > > > >
> > > > > d
> > > > >
> > > > > -----Original Message-----
> > > > > From: xxxxx@lists.osr.com
> > > > > [mailto:xxxxx@lists.osr.com>] On Behalf Of Michal
> > > > > Vodicka
> > > > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: [ntdev] USB suspend, C3 and Vista
> > > > >
> > > > > At XP CPU couldn’t enter C3 state until all attached USB devices
> > > > > were
> > > > > suspended. Is it still the necessary condition at Vista? I presume
> > > > > it
> > > > is
> > > > > but want to be sure. Thanks.
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Michal Vodicka
> > > > > UPEK, Inc.
> > > > > [xxxxx@upek.com, http://www.upek.com]
> > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256>
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

The cable was unplugged. There is opposite problem – Performance Monitor shows CPU is in C3 when it shoudln’t be.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Friday, February 09, 2007 7:21 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

Unplug the cable from your NIC, does your processor now drop to C3?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Thursday, February 08, 2007 6:50 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB suspend, C3 and Vista

After some testing I’m confused. We have several notebooks here, usually
with Intel Core Duo CPUs where C3 processor counter in the Performance
Monitor is between 90 - 100% all the time. Both XP and Vista and
regardless of USB devices connected. I disabled selective suspend for
our device and attached USB mouse which doesn’t support SS and nothing
changed. Other PCs immediatelly leave C3 when such USB device is
connected (which I’d expect).

Is is the result of what Jake described below? If so, I’d appeciate an
explanation how C3 counter works i.e. how OS knows which part of time
spent processor in C3 state.

Thanks.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Michal Vodicka[SMTP:xxxxx@upek.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Thursday, February 08, 2007 9:26 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] USB suspend, C3 and Vista
>
> Does it have any effect in Windows? I’m not sure if I understand
consequences because I don’t know how processor Cx states are normally
controlled. Does it mean if processor already is in C2 it will go
automatically to C3 whenever DMA isn’t active? If so, will OS even know
it happened? It can look like silly question but our customer usually
use performance monitor C3 counter to see if our USB device behaves
acceptable way for them.
>
> BTW, which processors have this ability and is there a way how to find
it?
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
] on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Thursday, February 08, 2007 6:08 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] USB suspend, C3 and Vista
> >
> > It’s worth mentioning here that the answer depends on the processor,
too.
> > Newer processors can transition from C3 to C2 and back again without
OS
> > intervention, whenever there is DMA active. This means that, while
it’s
> > still helpful to stop DMA when there isn’t anything useful going on,
the
> > effect isn’t as absolute as it was with earlier processors.
> >
> > - Jake Oshins
> > Windows Kernel Team
> >
> >
> > “Michal Vodicka” wrote in message
> > > news:xxxxx@ntdev…
> > > Thanks for the explanation. In my experience processor is can enter
> C2 when
> > > an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile:
> Which
> > > means we can’t avoid device suspend.
> > >
> > > Best regards,
> > >
> > > Michal Vodicka>
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > > ----------
> > > > From:
> > > >
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
>]
> > > > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > Reply To: Windows System Software Devs Interest List
> > > > Sent: Thursday, February 08, 2007 6:05 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > The only reason I mentioned ehci is b/c that is the current spec,
> I
> > > > don’t think there is much development on ochi or uhci anymore, but
> it
> > > > applies to both 1.1 controllers as well.
> > > >
> > > > The basic problem here is that
> > > > 1 all the host controllers continuously runs its schedule when
> there is
> > > > a device attached
> > > > 2 running the schedule causes DMA bus master traffic
> > > > 3 to maintain cache/memory coherency, the processor must be in C0
> (or
> > > > at the very least, a C state higher then C3)
> > > > 4 your big power savings come when the processor is idle and in
> C3>
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
> Vodicka
> > > > Sent: Wednesday, February 07, 2007 8:17 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > Thanks. Does it mean it is necessary to have enabled suspend also
> for
> > > > HCs itself? I mean power properties for USB Root Hub where it is
> > > > disabled by default (and not so straightforward to enable:
> > > > http://support.microsoft.com/kb/930312/en-us :-O)
> > > >
> > > > BTW, if it is part of EHCI spec, makes any difference if we have
> USB 1.1
> > > > device and HC is in OHCI or UHCI mode?
> > > >
> > > > Best regards,
> > > >
> > > > Michal Vodicka
> > > > UPEK, Inc.
> > > > [xxxxx@upek.com, http://www.upek.com]
> > > >
> > > >
> > > > > ----------
> > > > > From:
> > > >
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> > > >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > > Reply To: Windows System Software Devs Interest List
> > > > > Sent: Thursday, February 08, 2007 5:01 AM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > > > >
> > > > > Yes, this is a side affect of how the USB HC works, so until
> there is
> > > > a
> > > > > change in the EHCI spec on how to run the schedule on the card,
> this
> > > > > requirement will remain.
> > > > >
> > > > > d
> > > > >
> > > > > -----Original Message-----
> > > > > From: xxxxx@lists.osr.com
> > > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
> Vodicka
> > > > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: [ntdev] USB suspend, C3 and Vista
> > > > >
> > > > > At XP CPU couldn’t enter C3 state until all attached USB devices
> were
> > > > > suspended. Is it still the necessary condition at Vista? I
> presume it
> > > > is
> > > > > but want to be sure. Thanks.
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Michal Vodicka
> > > > > UPEK, Inc.
> > > > > [xxxxx@upek.com, http://www.upek.com]
> > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer>
> > > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256>
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

C3 is a state where the processor caches don’t snoop. So if you do DMA, you
have to move the processor out of C3, during which time the CPU will draw
more power. A USB device that isn’t in selective suspend will force the USB
controller to poll memory. Thus even an idle USB device will cause a
greater power draw from the processor itself. This is as it has been since
USB was introduced.

The difference is that, with older processors, moving out of C3 required
software intervention (and all transitions were to C0,) which greatly
perturbed the system and tended to cause a very large time between when the
processor exited C3 to allow the DMA to happen and when it could get back
into C3. Today’s processors (at least some of them) can transition from C3
to C2 and back again without software interaction. Software just sees the
processor in C3. Thus the time spent in C3 increases because the software
isn’t involved and the power draw is reduced.

Power draw will still be further reduced by putting the device in selective
suspend, because then the processor won’t have to move to C2 as frequently,
as DMA will be happening less frequently. But the margin of reduction due
to selective suspend is much, much smaller. (Don’t ask me how much. The
answer varies too much from machine to machine and any answer will be
obsolete tomorrow. Besides, I don’t have the exact numbers in front of me.)

  • Jake

“Michal Vodicka” wrote in message
news:xxxxx@ntdev…
Thanks. Could you clarify this part?

> While the CPU isn’t actually staying in C3, the OS doesn’t know and can’t
> do
> much to influence the situation.
>
Our concern is power consumption. What our device consumes when it isn’t
suspended can be ignored. The important part is CPU consumption. In the
above mode, will CPU draw more than when all USB devices are suspended?

More specifically. Our device and driver correctly support selective
suspend. Unfortunately, Vista has a bug which causes long (up to 1024 ms)
wakeup from suspend at UHCI HCs. It makes our device almost unusable so
we’re looking for other solution. We’re examining a possibility to turn off
selective suspend completely at least for some customers. We can afford to
have our device powered in the idle state but we can’t afford to raise CPU
power consumption for 10% which is usually a difference between C2 and C3
states.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From:
> xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Friday, February 09, 2007 8:14 PM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] USB suspend, C3 and Vista
>
> Yes. The behavior that you’re looking for – C3 usage stopping when your
> device is misbehaving – will only happen with CPUs older than a Core Duo.
> While the CPU isn’t actually staying in C3, the OS doesn’t know and can’t
> do
> much to influence the situation.
>
> Note that, even with a Core Duo, you still get better power management if
> your device does selective suspend correctly.
>
> Tell the customer to pick an older laptop, specifically one that isn’t a
> multi-core or multi-threaded design, for their test.
>
> - Jake Oshins
> Windows Kernel Team
>
>
> “Michal Vodicka” wrote in message
> news:xxxxx@ntdev…
> After some testing I’m confused. We have several notebooks here, usually
> with Intel Core Duo CPUs where C3 processor counter in the Performance
> Monitor is between 90 - 100% all the time. Both XP and Vista and
> regardless
> of USB devices connected. I disabled selective suspend for our device and
> attached USB mouse which doesn’t support SS and nothing changed. Other PCs
> immediatelly leave C3 when such USB device is connected (which I’d
> expect).
>
> Is is the result of what Jake described below? If so, I’d appeciate an
> explanation how C3 counter works i.e. how OS knows which part of time
> spent
> processor in C3 state.
>
> Thanks.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
> > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > on behalf of Michal Vodicka[SMTP:xxxxx@upek.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Thursday, February 08, 2007 9:26 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] USB suspend, C3 and Vista
> >
> > Does it have any effect in Windows? I’m not sure if I understand
> > consequences because I don’t know how processor Cx states are normally
> > controlled. Does it mean if processor already is in C2 it will go
> > automatically to C3 whenever DMA isn’t active? If so, will OS even know
> > it
> > happened? It can look like silly question but our customer usually use
> > performance monitor C3 counter to see if our USB device behaves
> > acceptable
> > way for them.
> >
> > BTW, which processors have this ability and is there a way how to find
> > it?
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > > ----------
> > > From:
> > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > >
> > > on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> > > Reply To: Windows System Software Devs Interest List
> > > Sent: Thursday, February 08, 2007 6:08 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: Re:[ntdev] USB suspend, C3 and Vista
> > >
> > > It’s worth mentioning here that the answer depends on the processor,
> > > too.
> > > Newer processors can transition from C3 to C2 and back again without
> > > OS
> > > intervention, whenever there is DMA active. This means that, while
> > > it’s
> > > still helpful to stop DMA when there isn’t anything useful going on,
> > > the
> > > effect isn’t as absolute as it was with earlier processors.
> > >
> > > - Jake Oshins
> > > Windows Kernel Team
> > >
> > >
> > > “Michal Vodicka” wrote in message
> > > news:xxxxx@ntdev…
> > > Thanks for the explanation. In my experience processor is can enter C2
> > > when
> > > an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile:
> > > Which
> > > means we can’t avoid device suspend.
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > > ----------
> > > > From:
> > > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > Reply To: Windows System Software Devs Interest List
> > > > Sent: Thursday, February 08, 2007 6:05 AM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > The only reason I mentioned ehci is b/c that is the current spec, I
> > > > don’t think there is much development on ochi or uhci anymore, but
> > > > it
> > > > applies to both 1.1 controllers as well.
> > > >
> > > > The basic problem here is that
> > > > 1 all the host controllers continuously runs its schedule when
> > > > there
> > > > is
> > > > a device attached
> > > > 2 running the schedule causes DMA bus master traffic
> > > > 3 to maintain cache/memory coherency, the processor must be in C0
> > > > (or
> > > > at the very least, a C state higher then C3)
> > > > 4 your big power savings come when the processor is idle and in C3>
> > > >
> > > > d
> > > >
> > > > -----Original Message-----
> > > > From: xxxxx@lists.osr.com
> > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
> > > > Vodicka
> > > > Sent: Wednesday, February 07, 2007 8:17 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > >
> > > > Thanks. Does it mean it is necessary to have enabled suspend also
> > > > for
> > > > HCs itself? I mean power properties for USB Root Hub where it is
> > > > disabled by default (and not so straightforward to enable:
> > > > http://support.microsoft.com/kb/930312/en-us :-O)
> > > >
> > > > BTW, if it is part of EHCI spec, makes any difference if we have USB
> > > > 1.1
> > > > device and HC is in OHCI or UHCI mode?
> > > >
> > > > Best regards,
> > > >
> > > > Michal Vodicka
> > > > UPEK, Inc.
> > > > [xxxxx@upek.com, http://www.upek.com]
> > > >
> > > >
> > > > > ----------
> > > > > From:
> > > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> > > >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > > Reply To: Windows System Software Devs Interest List
> > > > > Sent: Thursday, February 08, 2007 5:01 AM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > > > >
> > > > > Yes, this is a side affect of how the USB HC works, so until there
> > > > > is
> > > > a
> > > > > change in the EHCI spec on how to run the schedule on the card,
> > > > > this
> > > > > requirement will remain.
> > > > >
> > > > > d
> > > > >
> > > > > -----Original Message-----
> > > > > From: xxxxx@lists.osr.com
> > > > > [mailto:xxxxx@lists.osr.com>] On Behalf Of Michal
> > > > > Vodicka
> > > > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: [ntdev] USB suspend, C3 and Vista
> > > > >
> > > > > At XP CPU couldn’t enter C3 state until all attached USB devices
> > > > > were
> > > > > suspended. Is it still the necessary condition at Vista? I presume
> > > > > it
> > > > is
> > > > > but want to be sure. Thanks.
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Michal Vodicka
> > > > > UPEK, Inc.
> > > > > [xxxxx@upek.com, http://www.upek.com]
> > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256>
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Great, that’s what I wanted to know. Thanks for you patience.

We will try to measure actual power consumption to see if we can afford to turn SS off at least for some customers. Long term solution is to persuade MS to fix UHCI driver at Vista but it can take ages…

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
Reply To: Windows System Software Devs Interest List
Sent: Friday, February 09, 2007 10:46 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] USB suspend, C3 and Vista

C3 is a state where the processor caches don’t snoop. So if you do DMA, you
have to move the processor out of C3, during which time the CPU will draw
more power. A USB device that isn’t in selective suspend will force the USB
controller to poll memory. Thus even an idle USB device will cause a
greater power draw from the processor itself. This is as it has been since
USB was introduced.

The difference is that, with older processors, moving out of C3 required
software intervention (and all transitions were to C0,) which greatly
perturbed the system and tended to cause a very large time between when the
processor exited C3 to allow the DMA to happen and when it could get back
into C3. Today’s processors (at least some of them) can transition from C3
to C2 and back again without software interaction. Software just sees the
processor in C3. Thus the time spent in C3 increases because the software
isn’t involved and the power draw is reduced.

Power draw will still be further reduced by putting the device in selective
suspend, because then the processor won’t have to move to C2 as frequently,
as DMA will be happening less frequently. But the margin of reduction due
to selective suspend is much, much smaller. (Don’t ask me how much. The
answer varies too much from machine to machine and any answer will be
obsolete tomorrow. Besides, I don’t have the exact numbers in front of me.)

  • Jake

“Michal Vodicka” wrote in message
> news:xxxxx@ntdev…
> Thanks. Could you clarify this part?
>
> > While the CPU isn’t actually staying in C3, the OS doesn’t know and can’t
> > do
> > much to influence the situation.
> >
> Our concern is power consumption. What our device consumes when it isn’t
> suspended can be ignored. The important part is CPU consumption. In the
> above mode, will CPU draw more than when all USB devices are suspended?
>
> More specifically. Our device and driver correctly support selective
> suspend. Unfortunately, Vista has a bug which causes long (up to 1024 ms)
> wakeup from suspend at UHCI HCs. It makes our device almost unusable so
> we’re looking for other solution. We’re examining a possibility to turn off
> selective suspend completely at least for some customers. We can afford to
> have our device powered in the idle state but we can’t afford to raise CPU
> power consumption for 10% which is usually a difference between C2 and C3
> states.
>
> Best regards,
>
> Michal Vodicka
> UPEK, Inc.
> [xxxxx@upek.com, http://www.upek.com]
>
>
> > ----------
> > From:
> > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> > Reply To: Windows System Software Devs Interest List
> > Sent: Friday, February 09, 2007 8:14 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re:[ntdev] USB suspend, C3 and Vista
> >
> > Yes. The behavior that you’re looking for – C3 usage stopping when your
> > device is misbehaving – will only happen with CPUs older than a Core Duo.
> > While the CPU isn’t actually staying in C3, the OS doesn’t know and can’t >
> > do
> > much to influence the situation.
> >
> > Note that, even with a Core Duo, you still get better power management if
> > your device does selective suspend correctly.
> >
> > Tell the customer to pick an older laptop, specifically one that isn’t a
> > multi-core or multi-threaded design, for their test.
> >
> > - Jake Oshins
> > Windows Kernel Team
> >
> >
> > “Michal Vodicka” wrote in message
> > news:xxxxx@ntdev…
> > After some testing I’m confused. We have several notebooks here, usually
> > with Intel Core Duo CPUs where C3 processor counter in the Performance
> > Monitor is between 90 - 100% all the time. Both XP and Vista and
> > regardless
> > of USB devices connected. I disabled selective suspend for our device and
> > attached USB mouse which doesn’t support SS and nothing changed. Other PCs
> > immediatelly leave C3 when such USB device is connected (which I’d
> > expect).
> >
> > Is is the result of what Jake described below? If so, I’d appeciate an
> > explanation how C3 counter works i.e. how OS knows which part of time
> > spent
> > processor in C3 state.
> >
> > Thanks.
> >
> > Best regards,
> >
> > Michal Vodicka
> > UPEK, Inc.
> > [xxxxx@upek.com, http://www.upek.com]
> >
> >
> > > ----------
> > > From:
> > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > on behalf of Michal Vodicka[SMTP:xxxxx@upek.com]
> > > Reply To: Windows System Software Devs Interest List
> > > Sent: Thursday, February 08, 2007 9:26 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > >
> > > Does it have any effect in Windows? I’m not sure if I understand
> > > consequences because I don’t know how processor Cx states are normally
> > > controlled. Does it mean if processor already is in C2 it will go
> > > automatically to C3 whenever DMA isn’t active? If so, will OS even know
> > > it
> > > happened? It can look like silly question but our customer usually use
> > > performance monitor C3 counter to see if our USB device behaves
> > > acceptable
> > > way for them.
> > >
> > > BTW, which processors have this ability and is there a way how to find
> > > it?
> > >
> > > Best regards,
> > >
> > > Michal Vodicka
> > > UPEK, Inc.
> > > [xxxxx@upek.com, http://www.upek.com]
> > >
> > >
> > > > ----------
> > > > From:
> > > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > > >
> > > > on behalf of Jake Oshins[SMTP:xxxxx@windows.microsoft.com]
> > > > Reply To: Windows System Software Devs Interest List
> > > > Sent: Thursday, February 08, 2007 6:08 PM
> > > > To: Windows System Software Devs Interest List
> > > > Subject: Re:[ntdev] USB suspend, C3 and Vista
> > > >
> > > > It’s worth mentioning here that the answer depends on the processor,
> > > > too.
> > > > Newer processors can transition from C3 to C2 and back again without
> > > > OS
> > > > intervention, whenever there is DMA active. This means that, while
> > > > it’s
> > > > still helpful to stop DMA when there isn’t anything useful going on,
> > > > the
> > > > effect isn’t as absolute as it was with earlier processors.
> > > >
> > > > - Jake Oshins
> > > > Windows Kernel Team
> > > >
> > > >
> > > > “Michal Vodicka” wrote in message
> > > > news:xxxxx@ntdev…
> > > > Thanks for the explanation. In my experience processor is can enter C2
> > > > when
> > > > an USB device isn’t suspended. Suprisingly, our customers want C3 :slight_smile:
> > > > Which
> > > > means we can’t avoid device suspend.
> > > >
> > > > Best regards,
> > > >
> > > > Michal Vodicka
> > > > UPEK, Inc.
> > > > [xxxxx@upek.com, http://www.upek.com]
> > > >
> > > >
> > > > > ----------
> > > > > From:
> > > > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]
> > > > > on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]>
> > > > > Reply To: Windows System Software Devs Interest List
> > > > > Sent: Thursday, February 08, 2007 6:05 AM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > > >
> > > > > The only reason I mentioned ehci is b/c that is the current spec, I
> > > > > don’t think there is much development on ochi or uhci anymore, but
> > > > > it
> > > > > applies to both 1.1 controllers as well.
> > > > >
> > > > > The basic problem here is that
> > > > > 1 all the host controllers continuously runs its schedule when
> > > > > there
> > > > > is
> > > > > a device attached
> > > > > 2 running the schedule causes DMA bus master traffic
> > > > > 3 to maintain cache/memory coherency, the processor must be in C0
> > > > > (or
> > > > > at the very least, a C state higher then C3)
> > > > > 4 your big power savings come when the processor is idle and in C3>
> > > > >
> > > > > d
> > > > >
> > > > > -----Original Message-----
> > > > > From: xxxxx@lists.osr.com
> > > > > [mailto:xxxxx@lists.osr.com] On Behalf Of Michal
> > > > > Vodicka
> > > > > Sent: Wednesday, February 07, 2007 8:17 PM
> > > > > To: Windows System Software Devs Interest List
> > > > > Subject: RE: [ntdev] USB suspend, C3 and Vista
> > > > >
> > > > > Thanks. Does it mean it is necessary to have enabled suspend also
> > > > > for
> > > > > HCs itself? I mean power properties for USB Root Hub where it is
> > > > > disabled by default (and not so straightforward to enable:
> > > > > http://support.microsoft.com/kb/930312/en-us :-O)
> > > > >
> > > > > BTW, if it is part of EHCI spec, makes any difference if we have USB
> > > > > 1.1
> > > > > device and HC is in OHCI or UHCI mode?
> > > > >
> > > > > Best regards,
> > > > >
> > > > > Michal Vodicka
> > > > > UPEK, Inc.
> > > > > [xxxxx@upek.com, http://www.upek.com]
> > > > >
> > > > >
> > > > > > ----------
> > > > > > From:
> > > > > xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com
> > > > >] on behalf of Doron Holan[SMTP:xxxxx@microsoft.com]
> > > > > > Reply To: Windows System Software Devs Interest List
> > > > > > Sent: Thursday, February 08, 2007 5:01 AM
> > > > > > To: Windows System Software Devs Interest List
> > > > > > Subject: RE: [ntdev] USB suspend, C3 and Vista>
> > > > > >
> > > > > > Yes, this is a side affect of how the USB HC works, so until there
> > > > > > is
> > > > > a
> > > > > > change in the EHCI spec on how to run the schedule on the card,
> > > > > > this
> > > > > > requirement will remain.
> > > > > >
> > > > > > d
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: xxxxx@lists.osr.com
> > > > > > [mailto:xxxxx@lists.osr.com>] On Behalf Of Michal
> > > > > > Vodicka
> > > > > > Sent: Wednesday, February 07, 2007 7:54 PM
> > > > > > To: Windows System Software Devs Interest List
> > > > > > Subject: [ntdev] USB suspend, C3 and Vista
> > > > > >
> > > > > > At XP CPU couldn’t enter C3 state until all attached USB devices
> > > > > > were
> > > > > > suspended. Is it still the necessary condition at Vista? I presume
> > > > > > it
> > > > > is
> > > > > > but want to be sure. Thanks.
> > > > > >
> > > > > > Best regards,
> > > > > >
> > > > > > Michal Vodicka
> > > > > > UPEK, Inc.
> > > > > > [xxxxx@upek.com, http://www.upek.com]
> > > > > >
> > > > > >
> > > > > > —
> > > > > > Questions? First check the Kernel Driver FAQ at
> > > > > > http://www.osronline.com/article.cfm?id=256
> > > > > >
> > > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > > >
> > > > > > —
> > > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256
> > > > > >
> > > > > > To unsubscribe, visit the List Server section of OSR Online at>
> > > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > > >
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > > > —
> > > > > Questions? First check the Kernel Driver FAQ at
> > > > > http://www.osronline.com/article.cfm?id=256>
> > > > >
> > > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > > http://www.osronline.com/page.cfm?name=ListServer
> > > > >
> > > >
> > > >
> > > >
> > > > —
> > > > Questions? First check the Kernel Driver FAQ at
> > > > http://www.osronline.com/article.cfm?id=256
> > > >
> > > > To unsubscribe, visit the List Server section of OSR Online at
> > > > http://www.osronline.com/page.cfm?name=ListServer
> > > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > To unsubscribe, visit the List Server section of OSR Online at
> > > http://www.osronline.com/page.cfm?name=ListServer
> > >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> > http://www.osronline.com/page.cfm?name=ListServer
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

>There is opposite problem – Performance Monitor shows
CPU is in C3 when it shoudln’t be.

The C3 meter of WinXP perfmon does not work correctly on Core Duo.
You need an updated C3 perfmon plugin dated April 2005 or newer.
Unfortunately it does not appear in public downloads. Try to find it via your laptop OEMs.

Regards,
–PA

> ----------

From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of xxxxx@writeme.com[SMTP:xxxxx@writeme.com]
Reply To: Windows System Software Devs Interest List
Sent: Friday, February 09, 2007 11:00 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] USB suspend, C3 and Vista

The C3 meter of WinXP perfmon does not work correctly on Core Duo.
You need an updated C3 perfmon plugin dated April 2005 or newer.
Unfortunately it does not appear in public downloads. Try to find it via your laptop OEMs.

Will try, thanks. But I see the same results at both XP and Vista – does it mean it isn’t included in Vista?

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]