Assign interrupt affinity

hello. iam cant english very wall. sorry.

Irq number I had obtained through the inf file.

I obtained the Interrupt vector by using the createinterrupt () to interrupt the connection.

I have one I want to assign an interrupt to the CPU.

To assign an affinity in the inf file [ddinstall.HW] was used.

However, check with winDBG 0x3 This value was the result of affinity.

Also in the device driver source by using the WdfInterruptSetExtendedPolicy () tries to get affinity.

But I did not come get the desired affinity.

Please help to assign affinity.

This is my inf file and source code is written.

My development environment is a dual-core of win7, kmdf.

============= inf file===================

;Copyright (c) 1990-2000 Microsoft Corporation All rights Reserved
;
;Module Name:
;
; WdfRTiK.INF
;
;Abstract:
; INF file for installing sample RTiK driver

[Version]
Signature=“$WINDOWS NT$”
Class=RTiK
ClassGuid={cfb15040-5bc7-11d3-b194-0060b0efd4aa}
Provider=“SYSTEM SOFTWARE LAB.”
DriverVer=09/06/2011,6.1.7600.16385
catalogfile=WdfRTiK.cat

[DestinationDirs]
DefaultDestDir=12

; ============================== class section ============================

[ClassInstall32]
Addreg = RTiKClass

[RTiKClass]
HKR,0,%ClassName%
HKR,Icon,-5
HKR,DeviceCharacteristics,0x10001,0x100 ;Use same security checks on relative opens
HKR,Security,“D:P(A;;GA;;;SY)(A;;GA;;;BA)” ;Allow generic all access to system and built-in Admin.

;======================== device install section =======================

[Manufacturer]
%Mfg%=MfgDeviceSection,NT$ARCH$

[MfgDeviceSection]
%DeviceDesc% = WdfRTiK_Inst, SSLAB_VIRTUAL_INTRTIK_DEVICE

[MfgDeviceSection.NT$ARCH$]
%DeviceDesc% = WdfRTiK_Inst, SSLAB_VIRTUAL_INTRTIK_DEVICE

[WdfRTiK.NT$ARCH$.HW]
AddReg=WdfRTiK_MP

[WdfRTiK_MP]
HKR,“Interrupt Management”,0x00010001
HKR,“Interrupt Management\Affinity Policy”,0x00010001
HKR,“Interrupt Management\Affinity Policy”,DevicePolicy,0x00010001,4
HKR,“Interrupt Management\Affinity Policy”,AssignmentSetOverride,0x00000001,1
HKR,“Interrupt Management\Affinity Policy”,DevicePriority,0x00010001,3

[WdfRTiK_Inst.NT$ARCH$]
CopyFiles=WdfRTiK.CopyFiles
;CopyFiles=WdfRTiK.sys
;LogConfig=WdfRTiK.LC0, WdfRTiK.LC1, WdfRTiK.LC2
LogConfig=WdfRTiK.LC0
;LogConfig=WdfRTiK.LC1
;LogConfig=WdfRTiK.LC2

[WdfRTiK.CopyFiles]
WdfRTiK.sys

[WdfRTiK_Inst.NT.Services]
AddService = WdfRTiK,%SPSVCINST_ASSOCSERVICE%,WdfRTiK_Service

[WdfRTiK.LC0]
ConfigPriority = DESIRED
IRQConfig = L:7

[WdfRTiK.LC1]
ConfigPriority = NORMAL
IRQConfig = L:7

[WdfRTiK.LC2]
ConfigPriority = DISABLED
IRQConfig = L:7

[WdfRTiK_Service]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_MANUAL_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\WdfRTiK.sys

[SourceDisksFiles]
WdfRTiK.sys=1,

[SourceDisksNames]
1=%DiskId%,“”

;-------------- WDF Coinstaller installation

[DestinationDirs]
RTiK_Device_CoInstaller_CopyFiles = 11

[WdfRTiK_Device.NT.CoInstallers]
AddReg=RTiK_Device_CoInstaller_AddReg
CopyFiles=RTiK_Device_CoInstaller_CopyFiles

[RTiK_Device_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoinstaller01009.dll,WdfCoInstaller”

[RTiK_Device_CoInstaller_CopyFiles]
WdfCoinstaller01009.dll

[SourceDisksFiles]
WdfCoinstaller01009.dll=1 ; make sure the number matches with SourceDisksNames

[RTiK_Device.NT.Wdf]
KmdfService = WdfRTiK, WdfRTiK_wdfsect

[WdfRTiK_wdfsect]
KmdfLibraryVersion = 1.9

;---------------------------------------------------------------;

[Strings]
ClassName =“WDF RTiK MP Driver”
DeviceDesc = “WDF RTiK Driver V1.9”
DiskId = “Install disk (1)”
Mfg = “SYSTEM SOFTWARE LAB.”
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_MANUAL_START = 3
SERVICE_ERROR_NORMAL = 1

=============== source code ==================

for (ULONG i=0; i < WdfCmResourceListGetCount(ResourcesTranslated); i++) {

resourceTrans = WdfCmResourceListGetDescriptor(ResourcesTranslated, i);

if(!resourceTrans){
#if DBG
DbgPrint(“NULL resource returned??\n”);
#endif
return(STATUS_DEVICE_CONFIGURATION_ERROR);
}

switch (resourceTrans->Type) {

case CmResourceTypePort:

#if DBG
DbgPrint(“Resource %d: Port 0x%0x, Length %d.\n”,
i,
resourceTrans->u.Port.Start.LowPart,
resourceTrans->u.Port.Length);
#endif
break;

case CmResourceTypeMemory:

#if DBG
DbgPrint(“Resource %d: Register 0x%0x:%0x Length %d.\n”,
i,
resourceTrans->u.Memory.Start.HighPart,
resourceTrans->u.Memory.Start.LowPart,
resourceTrans->u.Memory.Length);
#endif
break;

case CmResourceTypeInterrupt:
DbgPrint(“111 %x \n”,resourceTrans->Flags);
resourceTrans->Flags = (CM_RESOURCE_INTERRUPT_POLICY_INCLUDED | CM_RESOURCE_INTERRUPT_LATCHED);
DbgPrint(“222 %x \n”,resourceTrans->Flags);

WdfInterruptSetPolicy(
devContext->WdfInterrupt, WdfIrqPolicySpecifiedProcessors,
WdfIrqPriorityHigh,
AFFINITY_MASK(0)
);

#if DBG
DbgPrint(“Resource %d: Interrupt level: 0x%0x, Vector: 0x%0x, Affinity: 0x%0x\n”,
i,
resourceTrans->u.Interrupt.Level,
resourceTrans->u.Interrupt.Vector,
resourceTrans->u.Interrupt.Affinity);
#endif

Have you considered registering for a
EvtDeviceFilterRemoveResourceRequirements callback to change the affinity
there ?

Regards,

Daniel Terhell
Resplendence Software Projects Sp
xxxxx@resplendence.com
http://www.resplendence.com

wrote in message news:xxxxx@ntdev…
> hello. iam cant english very wall. sorry.
>
> Irq number I had obtained through the inf file.
>
> I obtained the Interrupt vector by using the createinterrupt () to
> interrupt the connection.
>
> I have one I want to assign an interrupt to the CPU.
>
> To assign an affinity in the inf file [ddinstall.HW] was used.
>
> However, check with winDBG 0x3 This value was the result of affinity.
>
> Also in the device driver source by using the
> WdfInterruptSetExtendedPolicy () tries to get affinity.
>
> But I did not come get the desired affinity.
>
> Please help to assign affinity.
>
> This is my inf file and source code is written.
>
> My development environment is a dual-core of win7, kmdf.
>
> ============= inf file===================
>
> ;Copyright (c) 1990-2000 Microsoft Corporation All rights Reserved
> ;
> ;Module Name:
> ;
> ; WdfRTiK.INF
> ;
> ;Abstract:
> ; INF file for installing sample RTiK driver
>
>
> [Version]
> Signature=“$WINDOWS NT$”
> Class=RTiK
> ClassGuid={cfb15040-5bc7-11d3-b194-0060b0efd4aa}
> Provider=“SYSTEM SOFTWARE LAB.”
> DriverVer=09/06/2011,6.1.7600.16385
> catalogfile=WdfRTiK.cat
>
> [DestinationDirs]
> DefaultDestDir=12
>
> ; ============================== class section
> ============================
>
> [ClassInstall32]
> Addreg = RTiKClass
>
> [RTiKClass]
> HKR,0,%ClassName%
> HKR,Icon,-5
> HKR,DeviceCharacteristics,0x10001,0x100 ;Use same security checks on
> relative opens
> HKR,Security,“D:P(A;;GA;;;SY)(A;;GA;;;BA)” ;Allow generic all access to
> system and built-in Admin.
>
>
> ;======================== device install section =======================
>
> [Manufacturer]
> %Mfg%=MfgDeviceSection,NT$ARCH$
>
> [MfgDeviceSection]
> %DeviceDesc% = WdfRTiK_Inst, SSLAB_VIRTUAL_INTRTIK_DEVICE
>
> [MfgDeviceSection.NT$ARCH$]
> %DeviceDesc% = WdfRTiK_Inst, SSLAB_VIRTUAL_INTRTIK_DEVICE
>
> [WdfRTiK.NT$ARCH$.HW]
> AddReg=WdfRTiK_MP
>
> [WdfRTiK_MP]
> HKR,“Interrupt Management”,0x00010001
> HKR,“Interrupt Management\Affinity Policy”,0x00010001
> HKR,“Interrupt Management\Affinity Policy”,DevicePolicy,0x00010001,4
> HKR,“Interrupt Management\Affinity
> Policy”,AssignmentSetOverride,0x00000001,1
> HKR,“Interrupt Management\Affinity Policy”,DevicePriority,0x00010001,3
>
> [WdfRTiK_Inst.NT$ARCH$]
> CopyFiles=WdfRTiK.CopyFiles
> ;CopyFiles=WdfRTiK.sys
> ;LogConfig=WdfRTiK.LC0, WdfRTiK.LC1, WdfRTiK.LC2
> LogConfig=WdfRTiK.LC0
> ;LogConfig=WdfRTiK.LC1
> ;LogConfig=WdfRTiK.LC2
>
>
> [WdfRTiK.CopyFiles]
> WdfRTiK.sys
>
> [WdfRTiK_Inst.NT.Services]
> AddService = WdfRTiK,%SPSVCINST_ASSOCSERVICE%,WdfRTiK_Service
>
> [WdfRTiK.LC0]
> ConfigPriority = DESIRED
> IRQConfig = L:7
>
> [WdfRTiK.LC1]
> ConfigPriority = NORMAL
> IRQConfig = L:7
>
> [WdfRTiK.LC2]
> ConfigPriority = DISABLED
> IRQConfig = L:7
>
> [WdfRTiK_Service]
> ServiceType = %SERVICE_KERNEL_DRIVER%
> StartType = %SERVICE_MANUAL_START%
> ErrorControl = %SERVICE_ERROR_NORMAL%
> ServiceBinary = %12%\WdfRTiK.sys
>
>
> [SourceDisksFiles]
> WdfRTiK.sys=1,
>
> [SourceDisksNames]
> 1=%DiskId%,“”
>
>
> ;-------------- WDF Coinstaller installation
>
> [DestinationDirs]
> RTiK_Device_CoInstaller_CopyFiles = 11
>
> [WdfRTiK_Device.NT.CoInstallers]
> AddReg=RTiK_Device_CoInstaller_AddReg
> CopyFiles=RTiK_Device_CoInstaller_CopyFiles
>
> [RTiK_Device_CoInstaller_AddReg]
> HKR,CoInstallers32,0x00010000, “WdfCoinstaller01009.dll,WdfCoInstaller”
>
> [RTiK_Device_CoInstaller_CopyFiles]
> WdfCoinstaller01009.dll
>
> [SourceDisksFiles]
> WdfCoinstaller01009.dll=1 ; make sure the number matches with
> SourceDisksNames
>
>
> [RTiK_Device.NT.Wdf]
> KmdfService = WdfRTiK, WdfRTiK_wdfsect
>
> [WdfRTiK_wdfsect]
> KmdfLibraryVersion = 1.9
>
> ;---------------------------------------------------------------;
>
> [Strings]
> ClassName =“WDF RTiK MP Driver”
> DeviceDesc = “WDF RTiK Driver V1.9”
> DiskId = “Install disk (1)”
> Mfg = “SYSTEM SOFTWARE LAB.”
> SPSVCINST_ASSOCSERVICE = 0x00000002
> SERVICE_KERNEL_DRIVER = 1
> SERVICE_MANUAL_START = 3
> SERVICE_ERROR_NORMAL = 1
>
> =============== source code ==================
>
> for (ULONG i=0; i < WdfCmResourceListGetCount(ResourcesTranslated); i++) {
>
> resourceTrans = WdfCmResourceListGetDescriptor(ResourcesTranslated,
> i);
>
> if(!resourceTrans){
> #if DBG
> DbgPrint(“NULL resource returned??\n”);
> #endif
> return(STATUS_DEVICE_CONFIGURATION_ERROR);
> }
>
> switch (resourceTrans->Type) {
>
> case CmResourceTypePort:
>
> #if DBG
> DbgPrint(“Resource %d: Port 0x%0x, Length %d.\n”,
> i,
> resourceTrans->u.Port.Start.LowPart,
> resourceTrans->u.Port.Length);
> #endif
> break;
>
> case CmResourceTypeMemory:
>
> #if DBG
> DbgPrint(“Resource %d: Register 0x%0x:%0x Length %d.\n”,
> i,
> resourceTrans->u.Memory.Start.HighPart,
> resourceTrans->u.Memory.Start.LowPart,
> resourceTrans->u.Memory.Length);
> #endif
> break;
>
> case CmResourceTypeInterrupt:
> DbgPrint(“111 %x \n”,resourceTrans->Flags);
> resourceTrans->Flags = (CM_RESOURCE_INTERRUPT_POLICY_INCLUDED |
> CM_RESOURCE_INTERRUPT_LATCHED);
> DbgPrint(“222 %x \n”,resourceTrans->Flags);
>
> WdfInterruptSetPolicy(
> devContext->WdfInterrupt, WdfIrqPolicySpecifiedProcessors,
> WdfIrqPriorityHigh,
> AFFINITY_MASK(0)
> );
>
> #if DBG
> DbgPrint(“Resource %d: Interrupt level: 0x%0x, Vector: 0x%0x,
> Affinity: 0x%0x\n”,
> i,
> resourceTrans->u.Interrupt.Level,
> resourceTrans->u.Interrupt.Vector,
> resourceTrans->u.Interrupt.Affinity);
> #endif
>
>
>

The real question is Why? Why do you want to assign affinity? Typically that will degrade system performance and is very seldom recommended as a solution. So what are you trying to do?

Gary Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

On Sep 18, 2011, at 4:27 AM, xxxxx@nate.com wrote:

hello. iam cant english very wall. sorry.

Irq number I had obtained through the inf file.

I obtained the Interrupt vector by using the createinterrupt () to interrupt the connection.

I have one I want to assign an interrupt to the CPU.

To assign an affinity in the inf file [ddinstall.HW] was used.

However, check with winDBG 0x3 This value was the result of affinity.

Also in the device driver source by using the WdfInterruptSetExtendedPolicy () tries to get affinity.

But I did not come get the desired affinity.

Please help to assign affinity.

This is my inf file and source code is written.

My development environment is a dual-core of win7, kmdf.

============= inf file===================

;Copyright (c) 1990-2000 Microsoft Corporation All rights Reserved
;
;Module Name:
;
; WdfRTiK.INF
;
;Abstract:
; INF file for installing sample RTiK driver

[Version]
Signature=“$WINDOWS NT$”
Class=RTiK
ClassGuid={cfb15040-5bc7-11d3-b194-0060b0efd4aa}
Provider=“SYSTEM SOFTWARE LAB.”
DriverVer=09/06/2011,6.1.7600.16385
catalogfile=WdfRTiK.cat

[DestinationDirs]
DefaultDestDir=12

; ============================== class section ============================

[ClassInstall32]
Addreg = RTiKClass

[RTiKClass]
HKR,0,%ClassName%
HKR,Icon,-5
HKR,DeviceCharacteristics,0x10001,0x100 ;Use same security checks on relative opens
HKR,Security,“D:P(A;;GA;;;SY)(A;;GA;;;BA)” ;Allow generic all access to system and built-in Admin.

;======================== device install section =======================

[Manufacturer]
%Mfg%=MfgDeviceSection,NT$ARCH$

[MfgDeviceSection]
%DeviceDesc% = WdfRTiK_Inst, SSLAB_VIRTUAL_INTRTIK_DEVICE

[MfgDeviceSection.NT$ARCH$]
%DeviceDesc% = WdfRTiK_Inst, SSLAB_VIRTUAL_INTRTIK_DEVICE

[WdfRTiK.NT$ARCH$.HW]
AddReg=WdfRTiK_MP

[WdfRTiK_MP]
HKR,“Interrupt Management”,0x00010001
HKR,“Interrupt Management\Affinity Policy”,0x00010001
HKR,“Interrupt Management\Affinity Policy”,DevicePolicy,0x00010001,4
HKR,“Interrupt Management\Affinity Policy”,AssignmentSetOverride,0x00000001,1
HKR,“Interrupt Management\Affinity Policy”,DevicePriority,0x00010001,3

[WdfRTiK_Inst.NT$ARCH$]
CopyFiles=WdfRTiK.CopyFiles
;CopyFiles=WdfRTiK.sys
;LogConfig=WdfRTiK.LC0, WdfRTiK.LC1, WdfRTiK.LC2
LogConfig=WdfRTiK.LC0
;LogConfig=WdfRTiK.LC1
;LogConfig=WdfRTiK.LC2

[WdfRTiK.CopyFiles]
WdfRTiK.sys

[WdfRTiK_Inst.NT.Services]
AddService = WdfRTiK,%SPSVCINST_ASSOCSERVICE%,WdfRTiK_Service

[WdfRTiK.LC0]
ConfigPriority = DESIRED
IRQConfig = L:7

[WdfRTiK.LC1]
ConfigPriority = NORMAL
IRQConfig = L:7

[WdfRTiK.LC2]
ConfigPriority = DISABLED
IRQConfig = L:7

[WdfRTiK_Service]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_MANUAL_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\WdfRTiK.sys

[SourceDisksFiles]
WdfRTiK.sys=1,

[SourceDisksNames]
1=%DiskId%,“”

;-------------- WDF Coinstaller installation

[DestinationDirs]
RTiK_Device_CoInstaller_CopyFiles = 11

[WdfRTiK_Device.NT.CoInstallers]
AddReg=RTiK_Device_CoInstaller_AddReg
CopyFiles=RTiK_Device_CoInstaller_CopyFiles

[RTiK_Device_CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoinstaller01009.dll,WdfCoInstaller”

[RTiK_Device_CoInstaller_CopyFiles]
WdfCoinstaller01009.dll

[SourceDisksFiles]
WdfCoinstaller01009.dll=1 ; make sure the number matches with SourceDisksNames

[RTiK_Device.NT.Wdf]
KmdfService = WdfRTiK, WdfRTiK_wdfsect

[WdfRTiK_wdfsect]
KmdfLibraryVersion = 1.9

;---------------------------------------------------------------;

[Strings]
ClassName =“WDF RTiK MP Driver”
DeviceDesc = “WDF RTiK Driver V1.9”
DiskId = “Install disk (1)”
Mfg = “SYSTEM SOFTWARE LAB.”
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_MANUAL_START = 3
SERVICE_ERROR_NORMAL = 1

=============== source code ==================

for (ULONG i=0; i < WdfCmResourceListGetCount(ResourcesTranslated); i++) {

resourceTrans = WdfCmResourceListGetDescriptor(ResourcesTranslated, i);

if(!resourceTrans){
#if DBG
DbgPrint(“NULL resource returned??\n”);
#endif
return(STATUS_DEVICE_CONFIGURATION_ERROR);
}

switch (resourceTrans->Type) {

case CmResourceTypePort:

#if DBG
DbgPrint(“Resource %d: Port 0x%0x, Length %d.\n”,
i,
resourceTrans->u.Port.Start.LowPart,
resourceTrans->u.Port.Length);
#endif
break;

case CmResourceTypeMemory:

#if DBG
DbgPrint(“Resource %d: Register 0x%0x:%0x Length %d.\n”,
i,
resourceTrans->u.Memory.Start.HighPart,
resourceTrans->u.Memory.Start.LowPart,
resourceTrans->u.Memory.Length);
#endif
break;

case CmResourceTypeInterrupt:
DbgPrint(“111 %x \n”,resourceTrans->Flags);
resourceTrans->Flags = (CM_RESOURCE_INTERRUPT_POLICY_INCLUDED | CM_RESOURCE_INTERRUPT_LATCHED);
DbgPrint(“222 %x \n”,resourceTrans->Flags);

WdfInterruptSetPolicy(
devContext->WdfInterrupt, WdfIrqPolicySpecifiedProcessors,
WdfIrqPriorityHigh,
AFFINITY_MASK(0)
);

#if DBG
DbgPrint(“Resource %d: Interrupt level: 0x%0x, Vector: 0x%0x, Affinity: 0x%0x\n”,
i,
resourceTrans->u.Interrupt.Level,
resourceTrans->u.Interrupt.Vector,
resourceTrans->u.Interrupt.Affinity);
#endif


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

thanks Gray.

I am in Windows 7 aims to provide real-time availability.

But if all the core interrupt allocation, they do not provide real-time availability.

so I want to assign an interrupt to the one of core.

Daniel thanks advice.

but I do not know for a EvtDeviceFilterRemoveResourceRequirements .

Can you tell me do you?

Windows is not a real-time OS (c). That doesn’t mean certain goals cannot be
met. But limiting the CPUs on which your device can interrupt is likely to
make things worse. Only if you have data that shows certain CPUs are much
less busy processing ISRs with a higher priority than yours this might make
sense.

Regards,

Daniel Terhell
Resplendence Software Projects Sp
xxxxx@resplendence.com
http://www.resplendence.com

wrote in message news:xxxxx@ntdev…
> thanks Gray.
>
> I am in Windows 7 aims to provide real-time availability.
>
> But if all the core interrupt allocation, they do not provide real-time
> availability.
>
> so I want to assign an interrupt to the one of core.
>

thanks advice.

how do you know to the create for Subsystem in Windows 7 ?

For example, the core 1 is running in Windows, I want to my interrupt work the Core 2.

Now my interrupt function is only available to Core 2.

However, the operation of windows in the Core 1 and Core 2 is operated.

>Now my interrupt function is only available to Core 2.

However, the operation of windows in the Core 1 and Core 2 is operated.

Your device need to support MSI-X interrupt.

Igor Sharovar

xxxxx@nate.com wrote:

Now my interrupt function is only available to Core 2.

However, the operation of windows in the Core 1 and Core 2 is operated.

Are you asking to have the second core be completely idle, except for
your interrupt handler? I can’t quite tell. If so, that’s a silly
thing to do. The latency for an interrupt is not dependent on what the
processors happen to be doing. That’s why your task here doesn’t make
sense. When an interrupt comes in, one of the cores is interrupted in
order to handle it. That’s the POINT of an interrupt. Whether the core
is busy running Excel or busy running an idle loop, it doesn’t matter.
It will start running your interrupt handler.

As Don pointed out, unless you are running a non-symmetrical system,
virtually all attempts to manage the affinity end up REDUCING overall
performance.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@nate.com wrote:

Daniel thanks advice.

but I do not know for a EvtDeviceFilterRemoveResourceRequirements .

Can you tell me do you?

Do they not have Google where you live?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I have seen cases where, due to C-STATE or similar mechanisms, it takes
“longer time” for the processor to wake up. In this case, if the processor
is very busy, the ISRs are processed very fast. But if processor is not so
busy then there is a delay in the processing of ISRs (because processor
needs time to wake up).

So, OP may be running into that issue which I solved by making my board
interrupt more frequently which caused the processor to stay awake (while my
driver’s transactions were happening).

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, September 19, 2011 10:41 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Assign interrupt affinity

xxxxx@nate.com wrote:

Now my interrupt function is only available to Core 2.

However, the operation of windows in the Core 1 and Core 2 is operated.

Are you asking to have the second core be completely idle, except for
your interrupt handler? I can’t quite tell. If so, that’s a silly
thing to do. The latency for an interrupt is not dependent on what the
processors happen to be doing. That’s why your task here doesn’t make
sense. When an interrupt comes in, one of the cores is interrupted in
order to handle it. That’s the POINT of an interrupt. Whether the core
is busy running Excel or busy running an idle loop, it doesn’t matter.
It will start running your interrupt handler.

As Don pointed out, unless you are running a non-symmetrical system,
virtually all attempts to manage the affinity end up REDUCING overall
performance.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

I just want to work on one core is to my interrupts.

I Know interrupted during execution using only one core.

if an higher interrupt occurs, the latency will have my interrupt.

So my goal is to behave similarly to RTX.

RTX and Intime already dedicate mode operates using.

So I am asking because the behavior of is dedicate.

I do not think it takes a long time for a processor to wake up. What might
be happening is that the processor is hitting power management SMI routines
(being discuseed in the Performance Issues - Long ISRs thread). Even more
scary are the CPU bugs. If you check the long list of errata (spec update)
or certain CPUs, in particular the 1st generation core i7s, that really
gives the shivers. Most of these bugs are related to CPU C and P states and
can freeze a CPU for an indefinite period of time until certain conditions
are met. Of course if there is no way to detect these we can only speculate
about the cause of the problem.

But there seems to be hope, I checked the exports of Win8 and there seems to
be a list of very interesting new routines (PoFx) such as
PoFxProcessorNotification. Hopefully these routines will become documented
and give us more insight to what is happening to our CPUs in terms of power
management and latencies.

Regards,

Daniel Terhell
Resplendence Software Projects Sp
xxxxx@resplendence.com
http://www.resplendence.com

“Sam Tertzakian” wrote in message news:xxxxx@ntdev…
>I have seen cases where, due to C-STATE or similar mechanisms, it takes
> “longer time” for the processor to wake up. In this case, if the processor
> is very busy, the ISRs are processed very fast. But if processor is not so
> busy then there is a delay in the processing of ISRs (because processor
> needs time to wake up).
>
> So, OP may be running into that issue which I solved by making my board
> interrupt more frequently which caused the processor to stay awake (while
> my
> driver’s transactions were happening).
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
> Sent: Monday, September 19, 2011 10:41 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Assign interrupt affinity
>
> xxxxx@nate.com wrote:
>> Now my interrupt function is only available to Core 2.
>>
>> However, the operation of windows in the Core 1 and Core 2 is operated.
>
> Are you asking to have the second core be completely idle, except for
> your interrupt handler? I can’t quite tell. If so, that’s a silly
> thing to do. The latency for an interrupt is not dependent on what the
> processors happen to be doing. That’s why your task here doesn’t make
> sense. When an interrupt comes in, one of the cores is interrupted in
> order to handle it. That’s the POINT of an interrupt. Whether the core
> is busy running Excel or busy running an idle loop, it doesn’t matter.
> It will start running your interrupt handler.
>
> As Don pointed out, unless you are running a non-symmetrical system,
> virtually all attempts to manage the affinity end up REDUCING overall
> performance.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>

On 20-Sep-2011 14:14, xxxxx@resplendence.com wrote:
[snip]

I checked the exports of Win8 and there seems to
be a list of very interesting new routines (PoFx) such as
PoFxProcessorNotification. Hopefully these routines will become documented
and give us more insight to what is happening to our CPUs in terms of power
management and latencies.

+1 please!
–pa

Yes, after I sent the response, I realized that I should not have said
“processor needs time to wake up”. More accurate is “processor seems to need
time to wake up (and service my ISR)”. And after fighting with that issue
the only thing I saw that made it better was to not let it fall “asleep”.
But I did not mean to indicate that I know the underlying mechanism.

These are the data points I saw:

  1. If I disabled C-State or similar sounding mechanism in BIOS, performance
    was good.
  2. If I prevented processor from “sleeping” by programming my board to
    interrupt more frequently when transactions are happening, performance was
    good.
  3. If I created a thread and kept the CPU running by doing some unneeded
    calculation, performance was good.
  4. This only happened on a single motherboard that was relatively new. (I
    don’t remember the name now as I did not have direct access to it.) All
    other computers were fine but they seemed not to support C-State.
  5. The other thing is…the performance difference was substantial. If I
    recall, I think it was like 25-50%.

So, the only way I could explain it was that processor went to sleep because
it detected it was not doing work. Then when it came time to do work, it
took a while to wake up and actually do the work.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@resplendence.com
Sent: Tuesday, September 20, 2011 4:15 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Assign interrupt affinity

I do not think it takes a long time for a processor to wake up. What might
be happening is that the processor is hitting power management SMI routines
(being discuseed in the Performance Issues - Long ISRs thread). Even more
scary are the CPU bugs. If you check the long list of errata (spec update)
or certain CPUs, in particular the 1st generation core i7s, that really
gives the shivers. Most of these bugs are related to CPU C and P states and
can freeze a CPU for an indefinite period of time until certain conditions
are met. Of course if there is no way to detect these we can only speculate
about the cause of the problem.

But there seems to be hope, I checked the exports of Win8 and there seems to

be a list of very interesting new routines (PoFx) such as
PoFxProcessorNotification. Hopefully these routines will become documented
and give us more insight to what is happening to our CPUs in terms of power
management and latencies.

Regards,

Daniel Terhell
Resplendence Software Projects Sp
xxxxx@resplendence.com
http://www.resplendence.com

“Sam Tertzakian” wrote in message news:xxxxx@ntdev…
>I have seen cases where, due to C-STATE or similar mechanisms, it takes
> “longer time” for the processor to wake up. In this case, if the processor
> is very busy, the ISRs are processed very fast. But if processor is not so
> busy then there is a delay in the processing of ISRs (because processor
> needs time to wake up).
>
> So, OP may be running into that issue which I solved by making my board
> interrupt more frequently which caused the processor to stay awake (while
> my
> driver’s transactions were happening).
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
> Sent: Monday, September 19, 2011 10:41 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Assign interrupt affinity
>
> xxxxx@nate.com wrote:
>> Now my interrupt function is only available to Core 2.
>>
>> However, the operation of windows in the Core 1 and Core 2 is operated.
>
> Are you asking to have the second core be completely idle, except for
> your interrupt handler? I can’t quite tell. If so, that’s a silly
> thing to do. The latency for an interrupt is not dependent on what the
> processors happen to be doing. That’s why your task here doesn’t make
> sense. When an interrupt comes in, one of the cores is interrupted in
> order to handle it. That’s the POINT of an interrupt. Whether the core
> is busy running Excel or busy running an idle loop, it doesn’t matter.
> It will start running your interrupt handler.
>
> As Don pointed out, unless you are running a non-symmetrical system,
> virtually all attempts to manage the affinity end up REDUCING overall
> performance.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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