Problem accessing Paged Pool at DISPATCH LEVEL

Hi All,
I have a routine which is running at dispatch level.I was trying to
access some memory which is from Paged Pool.I couldn’t observe that when I
was coding.My driver crashes when i try to access that particular memory.Now
the books and the documentation say that you cannot access Paged Pool from a
routine running at DISPATCH_LEVEL.But I couldn’t find any reason explained
in the book.Can anybody let me know why is this restriction ?and is it only
at DISPATCH LEVEL or DIRQL also ?

Thanks.
Best Regards,
sai prasad


From: Maxim S. Shatskih[SMTP:xxxxx@storagecraft.com]
Reply To: NT Developers Interest List
Sent: Saturday, June 08, 2002 2:53 AM
To: NT Developers Interest List
Subject: [ntdev] Re: SCSI port context.

> We have two identical HBAs. Will the port driver context allow
us
> to complete SRB came to the first HBA from context of the
> second one (of course calling ScsiPortNotification with pointer to

No, they have different spinlocks.

Max


You are currently subscribed to ntdev as: xxxxx@satyam.com
To unsubscribe send a blank email to %%email.unsub%%

**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************

At 14.16 08/06/2002, you wrote:

Hi All,
I have a routine which is running at dispatch level.I was trying to
access some memory which is from Paged Pool.I couldn’t observe that when
I was coding.My driver crashes when i try to access that particular
memory.Now the books and the documentation say that you cannot access
Paged Pool from a routine running at DISPATCH_LEVEL.But I couldn’t find
any reason explained in the book.Can anybody let me know why is this
restriction ?and is it only at DISPATCH LEVEL or DIRQL also ?

This is basic operating systems theory. When you access paged memory an
interrupt is raised, to give the system a chance to retrieve the memory
from the mass memory (swap file on disk) and copy it into the main memory
(RAM), where it can be accessed by the CPU. When you run at DISPATCH_LEVEL
this interrupt is disabled

Because the OS cannot handle page faults on DISPATCH_LEVEL, and this
is because handling a page fault requires a wait - for inpage IO to
complete.

Max

----- Original Message -----
From: “Sai_Prasad”
To: “NT Developers Interest List”
Sent: Saturday, June 08, 2002 4:16 PM
Subject: [ntdev] Problem accessing Paged Pool at DISPATCH LEVEL

> Hi All,
> I have a routine which is running at dispatch level.I was trying
to
> access some memory which is from Paged Pool.I couldn’t observe that
when I
> was coding.My driver crashes when i try to access that particular
memory.Now
> the books and the documentation say that you cannot access Paged
Pool from a
> routine running at DISPATCH_LEVEL.But I couldn’t find any reason
explained
> in the book.Can anybody let me know why is this restriction ?and is
it only
> at DISPATCH LEVEL or DIRQL also ?
>
> Thanks.
> Best Regards,
> sai prasad
>
> > ----------
> > From: Maxim S. Shatskih[SMTP:xxxxx@storagecraft.com]
> > Reply To: NT Developers Interest List
> > Sent: Saturday, June 08, 2002 2:53 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] Re: SCSI port context.
> >
> > > We have two identical HBAs. Will the port driver context
allow
> > us
> > > to complete SRB came to the first HBA from context of the
> > > second one (of course calling ScsiPortNotification with pointer
to
> >
> > No, they have different spinlocks.
> >
> > Max
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@satyam.com
> > To unsubscribe send a blank email to %%email.unsub%%
> >
>
******************************************************************

> This email (including any attachments) is intended for the sole use
of the
> intended recipient/s and may contain material that is CONFIDENTIAL
AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or
copying or
> distribution or forwarding of any or all of the contents in this
message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please
contact
> the sender by email and delete all copies; your cooperation in this
regard
> is appreciated.
>
******************************************************************

>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>

> (RAM), where it can be accessed by the CPU. When you run at
DISPATCH_LEVEL

this interrupt is disabled

No, the interrupt is well-enabled and causes BSOD :slight_smile:
The reason is inability to wait on DISPATCH_LEVEL.

Max

At 16.43 08/06/2002, you wrote:

> (RAM), where it can be accessed by the CPU. When you run at DISPATCH_LEVEL
> this interrupt is disabled
No, the interrupt is well-enabled and causes BSOD :slight_smile:

what happens when you call an interrupt that has been disabled?

The reason is inability to wait on DISPATCH_LEVEL.

Makes sense. I should have figured out by myself

> what happens when you call an interrupt that has been disabled?

“you call” assumes software interrupt, and they cannot be disabled.

Max