Issuing DPC on a specific processor in Storage driver

Hi,

In my storport miniport driver I use StorPortIssueDpc. However by design the DPC is always scheduled on the same processor on which I make this call.
There are total 40 logical processors in the system but rest all are always idle with the one being stressed to its fullest.
I have also set STOR_PERF_DPC_REDIRECTION by calling StorPortInitializePerfOpts, but it has no effect.

I really miss the KeSetTargetProcessorDpc -> KeInsertQueueDpc here.
Is there anything equivalent (to KeSetTargetProcessorDpc) available in storport?

Regards,
Suresh

Are you supporting concurrency in handling requests coming in? If you take
advantage of the multiple processors for the initial handling of the
requests, most of the DPC issues are not there. I’ve worked on storport
drivers where we have successfully gotten a good balance on 128 logical
processors and never saw the DPC problems you are reporting.

Don Burn
Windows Driver Consulting
Website: http://www.windrvr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@yahoo.com
Sent: Tuesday, August 30, 2016 8:05 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Issuing DPC on a specific processor in Storage driver

Hi,

In my storport miniport driver I use StorPortIssueDpc. However by design the
DPC is always scheduled on the same processor on which I make this call.
There are total 40 logical processors in the system but rest all are always
idle with the one being stressed to its fullest.
I have also set STOR_PERF_DPC_REDIRECTION by calling
StorPortInitializePerfOpts, but it has no effect.

I really miss the KeSetTargetProcessorDpc -> KeInsertQueueDpc here.
Is there anything equivalent (to KeSetTargetProcessorDpc) available in
storport?

Regards,
Suresh


NTDEV is sponsored by OSR

Visit the list online at:
http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software
drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at
http:</http:></http:></http:>

When you call StorPortIssueDpc the DPC is queued to the current processor
and this is expected behavior. The redirection options have to do with the
internal DPCs that StorPort queues to handle request completion. In what
context are you calling StorPortIssueDpc from?

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntdev…

Hi,

In my storport miniport driver I use StorPortIssueDpc. However by design the
DPC is always scheduled on the same processor on which I make this call.
There are total 40 logical processors in the system but rest all are always
idle with the one being stressed to its fullest.
I have also set STOR_PERF_DPC_REDIRECTION by calling
StorPortInitializePerfOpts, but it has no effect.

I really miss the KeSetTargetProcessorDpc -> KeInsertQueueDpc here.
Is there anything equivalent (to KeSetTargetProcessorDpc) available in
storport?

Regards,
Suresh

Thanks for the suggestions.

@Don: I queue all requests in BuildIo itself and return FALSE so that StartIo doesn’t come at all. Since concurrent channels would matter only for StartIo, I have no use for them.

@Scott: I need to process each IO in say 3 different ways. Ideally I would like to spawn 3 DPCs on 3 different processors where all this processing can happen in parallel. However with StorPortIssueDpc, all these 3 DPCs get queued on the same processor and it all happens sequentially.

Regards,
Suresh

Is this a virtual miniport or a physical miniport?

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntdev…

Thanks for the suggestions.

@Don: I queue all requests in BuildIo itself and return FALSE so that
StartIo doesn’t come at all. Since concurrent channels would matter only for
StartIo, I have no use for them.

@Scott: I need to process each IO in say 3 different ways. Ideally I would
like to spawn 3 DPCs on 3 different processors where all this processing can
happen in parallel. However with StorPortIssueDpc, all these 3 DPCs get
queued on the same processor and it all happens sequentially.

Regards,
Suresh

> Is this a virtual miniport or a physical miniport?

Physical miniport.

Not much to be there then. There’s not really a concept of “I need to do a
massive amount of parallel processing before giving a SCSI command to my
storage device.” What do you need to do to the command that requires so much
processing?

-scott
OSR
@OSRDrivers

wrote in message news:xxxxx@ntdev…

Is this a virtual miniport or a physical miniport?

Physical miniport.