When pagefiles are opened?

Hi All!

I have few questions about NT filesystems and page files:

  1. When NT opens pagefiles?
  2. How they are opened? Via IRP or FastIO? Are any special open flags present?
    Do FS need initialize caching for pagefile?

Regards, Dennis


Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

> Do FS need initialize caching for pagefile?

Surely no. They are used for paging IO only - and all paging IO must bypass
the cache.

Max

NT uses routine NtCreatePagingFile which looks like this:

NTSYSAPI
NTSTATUS
NTAPI
NtCreatePagingFile (
IN PUNICODE_STRING PageFileName,
IN PLARGE_INTEGER InitialSize,
IN PLARGE_INTEGER MaximumSize,
IN ULONG Reserved
);

This routine is usually called by SMSS.EXE after it performs
some critical operations (autochecks, file renames etc.).
There is a key in registry \Registry\Machine\System\CurrentControlSetControl\Session Manager\Memory management containing value
PagingFiles of type REG_MULTI_SZ. This one contains list of:

  • file name (eg. D:\pagefile.sys),
  • initial size (eg. 43 [MB])
  • maximum size (eg. 65 [MB]) (optional).

Routine NtCreatePagingFile calls IoCreateFile with Options
IO_OPEN_PAGING_FILE. This is present in create irp stack
location as SL_OPEN_PAGING_FILE.
FS should in this moment read all allocation for this file
to the resident memory and both the FCB and CCB should
also be allocated from non-paged pool. This is because when
processing the I/O to the paging file you have to translate file
run into disk runs and call the disk driver - ie. no cache is
maintained - and at this time also no page faults can occur.

Paul

-----P?vodn? zpr?va-----
Od: Dennis [SMTP:xxxxx@yahoo.com]
Odesl?no: 13. kv?tna 2000 1:39
Komu: File Systems Developers
P?edm?t: [ntfsd] When pagefiles are opened?

Hi All!

I have few questions about NT filesystems and page files:

  1. When NT opens pagefiles?
  2. How they are opened? Via IRP or FastIO? Are any special open flags
    present?
    Do FS need initialize caching for pagefile?

Regards, Dennis


Do You Yahoo!?

Talk to your friends online with Yahoo! Messenger.

http://im.yahoo.com


You are currently subscribed to ntfsd as: xxxxx@sodatsw.cz
To unsubscribe send a blank email to $subst(‘Email.Unsub’)