Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

848 lines
17 KiB

  1. /*++ BUILD Version: 0003 // Increment this if a change has global effects
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. Cache.h
  5. Abstract:
  6. This module contains the public data structures and procedure
  7. prototypes for the cache management system.
  8. Author:
  9. Revision History:
  10. --*/
  11. #ifndef _CACHE_
  12. #define _CACHE_
  13. #include "prefetch.h"
  14. #include "perf.h"
  15. // begin_ntifs
  16. //
  17. // Define two constants describing the view size (and alignment)
  18. // that the Cache Manager uses to map files.
  19. //
  20. #define VACB_MAPPING_GRANULARITY (0x40000)
  21. #define VACB_OFFSET_SHIFT (18)
  22. //
  23. // Public portion of BCB
  24. //
  25. typedef struct _PUBLIC_BCB {
  26. //
  27. // Type and size of this record
  28. //
  29. // NOTE: The first four fields must be the same as the BCB in cc.h.
  30. //
  31. CSHORT NodeTypeCode;
  32. CSHORT NodeByteSize;
  33. //
  34. // Description of range of file which is currently mapped.
  35. //
  36. ULONG MappedLength;
  37. LARGE_INTEGER MappedFileOffset;
  38. } PUBLIC_BCB, *PPUBLIC_BCB;
  39. //
  40. // File Sizes structure.
  41. //
  42. typedef struct _CC_FILE_SIZES {
  43. LARGE_INTEGER AllocationSize;
  44. LARGE_INTEGER FileSize;
  45. LARGE_INTEGER ValidDataLength;
  46. } CC_FILE_SIZES, *PCC_FILE_SIZES;
  47. //
  48. // Define a Cache Manager callback structure. These routines are required
  49. // by the Lazy Writer, so that it can acquire resources in the right order
  50. // to avoid deadlocks. Note that otherwise you would have most FS requests
  51. // acquiring FS resources first and caching structures second, while the
  52. // Lazy Writer needs to acquire its own resources first, and then FS
  53. // structures later as it calls the file system.
  54. //
  55. //
  56. // First define the procedure pointer typedefs
  57. //
  58. //
  59. // This routine is called by the Lazy Writer prior to doing a write,
  60. // since this will require some file system resources associated with
  61. // this cached file. The context parameter supplied is whatever the FS
  62. // passed as the LazyWriteContext parameter when is called
  63. // CcInitializeCacheMap.
  64. //
  65. typedef
  66. BOOLEAN (*PACQUIRE_FOR_LAZY_WRITE) (
  67. IN PVOID Context,
  68. IN BOOLEAN Wait
  69. );
  70. //
  71. // This routine releases the Context acquired above.
  72. //
  73. typedef
  74. VOID (*PRELEASE_FROM_LAZY_WRITE) (
  75. IN PVOID Context
  76. );
  77. //
  78. // This routine is called by the Lazy Writer prior to doing a readahead.
  79. //
  80. typedef
  81. BOOLEAN (*PACQUIRE_FOR_READ_AHEAD) (
  82. IN PVOID Context,
  83. IN BOOLEAN Wait
  84. );
  85. //
  86. // This routine releases the Context acquired above.
  87. //
  88. typedef
  89. VOID (*PRELEASE_FROM_READ_AHEAD) (
  90. IN PVOID Context
  91. );
  92. typedef struct _CACHE_MANAGER_CALLBACKS {
  93. PACQUIRE_FOR_LAZY_WRITE AcquireForLazyWrite;
  94. PRELEASE_FROM_LAZY_WRITE ReleaseFromLazyWrite;
  95. PACQUIRE_FOR_READ_AHEAD AcquireForReadAhead;
  96. PRELEASE_FROM_READ_AHEAD ReleaseFromReadAhead;
  97. } CACHE_MANAGER_CALLBACKS, *PCACHE_MANAGER_CALLBACKS;
  98. //
  99. // This structure is passed into CcUninitializeCacheMap
  100. // if the caller wants to know when the cache map is deleted.
  101. //
  102. typedef struct _CACHE_UNINITIALIZE_EVENT {
  103. struct _CACHE_UNINITIALIZE_EVENT *Next;
  104. KEVENT Event;
  105. } CACHE_UNINITIALIZE_EVENT, *PCACHE_UNINITIALIZE_EVENT;
  106. //
  107. // Callback routine for retrieving dirty pages from Cache Manager.
  108. //
  109. typedef
  110. VOID (*PDIRTY_PAGE_ROUTINE) (
  111. IN PFILE_OBJECT FileObject,
  112. IN PLARGE_INTEGER FileOffset,
  113. IN ULONG Length,
  114. IN PLARGE_INTEGER OldestLsn,
  115. IN PLARGE_INTEGER NewestLsn,
  116. IN PVOID Context1,
  117. IN PVOID Context2
  118. );
  119. //
  120. // Callback routine for doing log file flushes to Lsn.
  121. //
  122. typedef
  123. VOID (*PFLUSH_TO_LSN) (
  124. IN PVOID LogHandle,
  125. IN LARGE_INTEGER Lsn
  126. );
  127. //
  128. // Macro to test whether a file is cached or not.
  129. //
  130. #define CcIsFileCached(FO) ( \
  131. ((FO)->SectionObjectPointer != NULL) && \
  132. (((PSECTION_OBJECT_POINTERS)(FO)->SectionObjectPointer)->SharedCacheMap != NULL) \
  133. )
  134. // end_ntifs
  135. //
  136. // Throw away miss counter
  137. //
  138. extern ULONG CcThrowAway;
  139. //
  140. // Performance Counters
  141. //
  142. extern ULONG CcFastReadNoWait;
  143. extern ULONG CcFastReadWait;
  144. extern ULONG CcFastReadResourceMiss;
  145. extern ULONG CcFastReadNotPossible;
  146. extern ULONG CcFastMdlReadNoWait;
  147. extern ULONG CcFastMdlReadWait; // ntifs
  148. extern ULONG CcFastMdlReadResourceMiss;
  149. extern ULONG CcFastMdlReadNotPossible;
  150. extern ULONG CcMapDataNoWait;
  151. extern ULONG CcMapDataWait;
  152. extern ULONG CcMapDataNoWaitMiss;
  153. extern ULONG CcMapDataWaitMiss;
  154. extern ULONG CcPinMappedDataCount;
  155. extern ULONG CcPinReadNoWait;
  156. extern ULONG CcPinReadWait;
  157. extern ULONG CcPinReadNoWaitMiss;
  158. extern ULONG CcPinReadWaitMiss;
  159. extern ULONG CcCopyReadNoWait;
  160. extern ULONG CcCopyReadWait;
  161. extern ULONG CcCopyReadNoWaitMiss;
  162. extern ULONG CcCopyReadWaitMiss;
  163. extern ULONG CcMdlReadNoWait;
  164. extern ULONG CcMdlReadWait;
  165. extern ULONG CcMdlReadNoWaitMiss;
  166. extern ULONG CcMdlReadWaitMiss;
  167. extern ULONG CcReadAheadIos;
  168. extern ULONG CcLazyWriteIos;
  169. extern ULONG CcLazyWritePages;
  170. extern ULONG CcDataFlushes;
  171. extern ULONG CcDataPages;
  172. extern ULONG CcLostDelayedWrites;
  173. extern PULONG CcMissCounter;
  174. //
  175. // Global Maintenance routines
  176. //
  177. NTKERNELAPI
  178. BOOLEAN
  179. CcInitializeCacheManager (
  180. VOID
  181. );
  182. LOGICAL
  183. CcHasInactiveViews (
  184. VOID
  185. );
  186. LOGICAL
  187. CcUnmapInactiveViews (
  188. IN ULONG NumberOfViewsToUnmap
  189. );
  190. // begin_ntifs
  191. //
  192. // The following routines are intended for use by File Systems Only.
  193. //
  194. NTKERNELAPI
  195. VOID
  196. CcInitializeCacheMap (
  197. IN PFILE_OBJECT FileObject,
  198. IN PCC_FILE_SIZES FileSizes,
  199. IN BOOLEAN PinAccess,
  200. IN PCACHE_MANAGER_CALLBACKS Callbacks,
  201. IN PVOID LazyWriteContext
  202. );
  203. NTKERNELAPI
  204. BOOLEAN
  205. CcUninitializeCacheMap (
  206. IN PFILE_OBJECT FileObject,
  207. IN PLARGE_INTEGER TruncateSize OPTIONAL,
  208. IN PCACHE_UNINITIALIZE_EVENT UninitializeCompleteEvent OPTIONAL
  209. );
  210. NTKERNELAPI
  211. VOID
  212. CcSetFileSizes (
  213. IN PFILE_OBJECT FileObject,
  214. IN PCC_FILE_SIZES FileSizes
  215. );
  216. //
  217. // VOID
  218. // CcFastIoSetFileSizes (
  219. // IN PFILE_OBJECT FileObject,
  220. // IN PCC_FILE_SIZES FileSizes
  221. // );
  222. //
  223. #define CcGetFileSizePointer(FO) ( \
  224. ((PLARGE_INTEGER)((FO)->SectionObjectPointer->SharedCacheMap) + 1) \
  225. )
  226. NTKERNELAPI
  227. BOOLEAN
  228. CcPurgeCacheSection (
  229. IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
  230. IN PLARGE_INTEGER FileOffset OPTIONAL,
  231. IN ULONG Length,
  232. IN BOOLEAN UninitializeCacheMaps
  233. );
  234. NTKERNELAPI
  235. VOID
  236. CcSetDirtyPageThreshold (
  237. IN PFILE_OBJECT FileObject,
  238. IN ULONG DirtyPageThreshold
  239. );
  240. NTKERNELAPI
  241. VOID
  242. CcFlushCache (
  243. IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
  244. IN PLARGE_INTEGER FileOffset OPTIONAL,
  245. IN ULONG Length,
  246. OUT PIO_STATUS_BLOCK IoStatus OPTIONAL
  247. );
  248. NTKERNELAPI
  249. LARGE_INTEGER
  250. CcGetFlushedValidData (
  251. IN PSECTION_OBJECT_POINTERS SectionObjectPointer,
  252. IN BOOLEAN BcbListHeld
  253. );
  254. // end_ntifs
  255. NTKERNELAPI
  256. VOID
  257. CcZeroEndOfLastPage (
  258. IN PFILE_OBJECT FileObject
  259. );
  260. // begin_ntifs
  261. NTKERNELAPI
  262. BOOLEAN
  263. CcZeroData (
  264. IN PFILE_OBJECT FileObject,
  265. IN PLARGE_INTEGER StartOffset,
  266. IN PLARGE_INTEGER EndOffset,
  267. IN BOOLEAN Wait
  268. );
  269. NTKERNELAPI
  270. PVOID
  271. CcRemapBcb (
  272. IN PVOID Bcb
  273. );
  274. NTKERNELAPI
  275. VOID
  276. CcRepinBcb (
  277. IN PVOID Bcb
  278. );
  279. NTKERNELAPI
  280. VOID
  281. CcUnpinRepinnedBcb (
  282. IN PVOID Bcb,
  283. IN BOOLEAN WriteThrough,
  284. OUT PIO_STATUS_BLOCK IoStatus
  285. );
  286. NTKERNELAPI
  287. PFILE_OBJECT
  288. CcGetFileObjectFromSectionPtrs (
  289. IN PSECTION_OBJECT_POINTERS SectionObjectPointer
  290. );
  291. NTKERNELAPI
  292. PFILE_OBJECT
  293. CcGetFileObjectFromBcb (
  294. IN PVOID Bcb
  295. );
  296. //
  297. // These routines are implemented to support write throttling.
  298. //
  299. //
  300. // BOOLEAN
  301. // CcCopyWriteWontFlush (
  302. // IN PFILE_OBJECT FileObject,
  303. // IN PLARGE_INTEGER FileOffset,
  304. // IN ULONG Length
  305. // );
  306. //
  307. #define CcCopyWriteWontFlush(FO,FOFF,LEN) ((LEN) <= 0X10000)
  308. NTKERNELAPI
  309. BOOLEAN
  310. CcCanIWrite (
  311. IN PFILE_OBJECT FileObject,
  312. IN ULONG BytesToWrite,
  313. IN BOOLEAN Wait,
  314. IN BOOLEAN Retrying
  315. );
  316. typedef
  317. VOID (*PCC_POST_DEFERRED_WRITE) (
  318. IN PVOID Context1,
  319. IN PVOID Context2
  320. );
  321. NTKERNELAPI
  322. VOID
  323. CcDeferWrite (
  324. IN PFILE_OBJECT FileObject,
  325. IN PCC_POST_DEFERRED_WRITE PostRoutine,
  326. IN PVOID Context1,
  327. IN PVOID Context2,
  328. IN ULONG BytesToWrite,
  329. IN BOOLEAN Retrying
  330. );
  331. //
  332. // The following routines provide a data copy interface to the cache, and
  333. // are intended for use by File Servers and File Systems.
  334. //
  335. NTKERNELAPI
  336. BOOLEAN
  337. CcCopyRead (
  338. IN PFILE_OBJECT FileObject,
  339. IN PLARGE_INTEGER FileOffset,
  340. IN ULONG Length,
  341. IN BOOLEAN Wait,
  342. OUT PVOID Buffer,
  343. OUT PIO_STATUS_BLOCK IoStatus
  344. );
  345. NTKERNELAPI
  346. VOID
  347. CcFastCopyRead (
  348. IN PFILE_OBJECT FileObject,
  349. IN ULONG FileOffset,
  350. IN ULONG Length,
  351. IN ULONG PageCount,
  352. OUT PVOID Buffer,
  353. OUT PIO_STATUS_BLOCK IoStatus
  354. );
  355. NTKERNELAPI
  356. BOOLEAN
  357. CcCopyWrite (
  358. IN PFILE_OBJECT FileObject,
  359. IN PLARGE_INTEGER FileOffset,
  360. IN ULONG Length,
  361. IN BOOLEAN Wait,
  362. IN PVOID Buffer
  363. );
  364. NTKERNELAPI
  365. VOID
  366. CcFastCopyWrite (
  367. IN PFILE_OBJECT FileObject,
  368. IN ULONG FileOffset,
  369. IN ULONG Length,
  370. IN PVOID Buffer
  371. );
  372. //
  373. // The following routines provide an Mdl interface for transfers to and
  374. // from the cache, and are primarily intended for File Servers.
  375. //
  376. // NOBODY SHOULD BE CALLING THESE MDL ROUTINES DIRECTLY, USE FSRTL AND
  377. // FASTIO INTERFACES.
  378. //
  379. NTKERNELAPI
  380. VOID
  381. CcMdlRead (
  382. IN PFILE_OBJECT FileObject,
  383. IN PLARGE_INTEGER FileOffset,
  384. IN ULONG Length,
  385. OUT PMDL *MdlChain,
  386. OUT PIO_STATUS_BLOCK IoStatus
  387. );
  388. //
  389. // This routine is now a wrapper for FastIo if present or CcMdlReadComplete2
  390. //
  391. NTKERNELAPI
  392. VOID
  393. CcMdlReadComplete (
  394. IN PFILE_OBJECT FileObject,
  395. IN PMDL MdlChain
  396. );
  397. // end_ntifs
  398. NTKERNELAPI
  399. VOID
  400. CcMdlReadComplete2 (
  401. IN PFILE_OBJECT FileObject,
  402. IN PMDL MdlChain
  403. );
  404. // begin_ntifs
  405. NTKERNELAPI
  406. VOID
  407. CcPrepareMdlWrite (
  408. IN PFILE_OBJECT FileObject,
  409. IN PLARGE_INTEGER FileOffset,
  410. IN ULONG Length,
  411. OUT PMDL *MdlChain,
  412. OUT PIO_STATUS_BLOCK IoStatus
  413. );
  414. //
  415. // This routine is now a wrapper for FastIo if present or CcMdlWriteComplete2
  416. //
  417. NTKERNELAPI
  418. VOID
  419. CcMdlWriteComplete (
  420. IN PFILE_OBJECT FileObject,
  421. IN PLARGE_INTEGER FileOffset,
  422. IN PMDL MdlChain
  423. );
  424. VOID
  425. CcMdlWriteAbort (
  426. IN PFILE_OBJECT FileObject,
  427. IN PMDL MdlChain
  428. );
  429. // end_ntifs
  430. NTKERNELAPI
  431. VOID
  432. CcMdlWriteComplete2 (
  433. IN PFILE_OBJECT FileObject,
  434. IN PLARGE_INTEGER FileOffset,
  435. IN PMDL MdlChain
  436. );
  437. // begin_ntifs
  438. //
  439. // Common ReadAhead call for Copy Read and Mdl Read.
  440. //
  441. // ReadAhead should always be invoked by calling the CcReadAhead macro,
  442. // which tests first to see if the read is large enough to warrant read
  443. // ahead. Measurements have shown that, calling the read ahead routine
  444. // actually decreases performance for small reads, such as issued by
  445. // many compilers and linkers. Compilers simply want all of the include
  446. // files to stay in memory after being read the first time.
  447. //
  448. #define CcReadAhead(FO,FOFF,LEN) { \
  449. if ((LEN) >= 256) { \
  450. CcScheduleReadAhead((FO),(FOFF),(LEN)); \
  451. } \
  452. }
  453. NTKERNELAPI
  454. VOID
  455. CcScheduleReadAhead (
  456. IN PFILE_OBJECT FileObject,
  457. IN PLARGE_INTEGER FileOffset,
  458. IN ULONG Length
  459. );
  460. //
  461. // The following routine allows a caller to wait for the next batch
  462. // of lazy writer work to complete. In particular, this provides a
  463. // mechanism for a caller to be sure that all avaliable lazy closes
  464. // at the time of this call have issued.
  465. //
  466. NTSTATUS
  467. CcWaitForCurrentLazyWriterActivity (
  468. VOID
  469. );
  470. //
  471. // This routine changes the read ahead granularity for a file, which is
  472. // PAGE_SIZE by default.
  473. //
  474. NTKERNELAPI
  475. VOID
  476. CcSetReadAheadGranularity (
  477. IN PFILE_OBJECT FileObject,
  478. IN ULONG Granularity
  479. );
  480. //
  481. // The following routines provide direct access data which is pinned in the
  482. // cache, and is primarily intended for use by File Systems. In particular,
  483. // this mode of access is ideal for dealing with volume structures.
  484. //
  485. //
  486. // Flags for pinning
  487. //
  488. //
  489. // Synchronous Wait - normally specified. This pattern may be specified as TRUE.
  490. //
  491. #define PIN_WAIT (1)
  492. //
  493. // Acquire metadata Bcb exclusive (default is shared, Lazy Writer uses exclusive).
  494. //
  495. // Must be set with PIN_WAIT.
  496. //
  497. #define PIN_EXCLUSIVE (2)
  498. //
  499. // Acquire metadata Bcb but do not fault data in. Default is to fault the data in.
  500. // This unusual flag is only used by Ntfs for cache coherency synchronization between
  501. // compressed and uncompressed streams for the same compressed file.
  502. //
  503. // Must be set with PIN_WAIT.
  504. //
  505. #define PIN_NO_READ (4)
  506. //
  507. // This option may be used to pin data only if the Bcb already exists. If the Bcb
  508. // does not already exist - the pin is unsuccessful and no Bcb is returned. This routine
  509. // provides a way to see if data is already pinned (and possibly dirty) in the cache,
  510. // without forcing a fault if the data is not there.
  511. //
  512. #define PIN_IF_BCB (8)
  513. //
  514. // Flags for mapping
  515. //
  516. //
  517. // Synchronous Wait - normally specified. This pattern may be specified as TRUE.
  518. //
  519. #define MAP_WAIT (1)
  520. //
  521. // Acquire metadata Bcb but do not fault data in. Default is to fault the data in.
  522. // This should not overlap with any of the PIN_ flags so they can be passed down to
  523. // CcPinFileData
  524. //
  525. #define MAP_NO_READ (16)
  526. NTKERNELAPI
  527. BOOLEAN
  528. CcPinRead (
  529. IN PFILE_OBJECT FileObject,
  530. IN PLARGE_INTEGER FileOffset,
  531. IN ULONG Length,
  532. IN ULONG Flags,
  533. OUT PVOID *Bcb,
  534. OUT PVOID *Buffer
  535. );
  536. NTKERNELAPI
  537. BOOLEAN
  538. CcMapData (
  539. IN PFILE_OBJECT FileObject,
  540. IN PLARGE_INTEGER FileOffset,
  541. IN ULONG Length,
  542. IN ULONG Flags,
  543. OUT PVOID *Bcb,
  544. OUT PVOID *Buffer
  545. );
  546. NTKERNELAPI
  547. BOOLEAN
  548. CcPinMappedData (
  549. IN PFILE_OBJECT FileObject,
  550. IN PLARGE_INTEGER FileOffset,
  551. IN ULONG Length,
  552. IN ULONG Flags,
  553. IN OUT PVOID *Bcb
  554. );
  555. NTKERNELAPI
  556. BOOLEAN
  557. CcPreparePinWrite (
  558. IN PFILE_OBJECT FileObject,
  559. IN PLARGE_INTEGER FileOffset,
  560. IN ULONG Length,
  561. IN BOOLEAN Zero,
  562. IN ULONG Flags,
  563. OUT PVOID *Bcb,
  564. OUT PVOID *Buffer
  565. );
  566. NTKERNELAPI
  567. VOID
  568. CcSetDirtyPinnedData (
  569. IN PVOID BcbVoid,
  570. IN PLARGE_INTEGER Lsn OPTIONAL
  571. );
  572. NTKERNELAPI
  573. VOID
  574. CcUnpinData (
  575. IN PVOID Bcb
  576. );
  577. NTKERNELAPI
  578. VOID
  579. CcSetBcbOwnerPointer (
  580. IN PVOID Bcb,
  581. IN PVOID OwnerPointer
  582. );
  583. NTKERNELAPI
  584. VOID
  585. CcUnpinDataForThread (
  586. IN PVOID Bcb,
  587. IN ERESOURCE_THREAD ResourceThreadId
  588. );
  589. // end_ntifs
  590. //
  591. // The following routines are in logsup.c, and provide special Cache Manager
  592. // support for storting Lsns with dirty file pages, and peforming subsequent
  593. // operations based on them.
  594. //
  595. NTKERNELAPI
  596. BOOLEAN
  597. CcSetPrivateWriteFile(
  598. PFILE_OBJECT FileObject
  599. );
  600. // begin_ntifs
  601. NTKERNELAPI
  602. VOID
  603. CcSetAdditionalCacheAttributes (
  604. IN PFILE_OBJECT FileObject,
  605. IN BOOLEAN DisableReadAhead,
  606. IN BOOLEAN DisableWriteBehind
  607. );
  608. NTKERNELAPI
  609. VOID
  610. CcSetLogHandleForFile (
  611. IN PFILE_OBJECT FileObject,
  612. IN PVOID LogHandle,
  613. IN PFLUSH_TO_LSN FlushToLsnRoutine
  614. );
  615. NTKERNELAPI
  616. LARGE_INTEGER
  617. CcGetDirtyPages (
  618. IN PVOID LogHandle,
  619. IN PDIRTY_PAGE_ROUTINE DirtyPageRoutine,
  620. IN PVOID Context1,
  621. IN PVOID Context2
  622. );
  623. NTKERNELAPI
  624. BOOLEAN
  625. CcIsThereDirtyData (
  626. IN PVPB Vpb
  627. );
  628. // end_ntifs
  629. NTKERNELAPI
  630. LARGE_INTEGER
  631. CcGetLsnForFileObject(
  632. IN PFILE_OBJECT FileObject,
  633. OUT PLARGE_INTEGER OldestLsn OPTIONAL
  634. );
  635. //
  636. // Internal kernel interfaces for the prefetcher.
  637. //
  638. extern LONG CcPfNumActiveTraces;
  639. #define CCPF_IS_PREFETCHER_ACTIVE() (CcPfNumActiveTraces)
  640. extern LOGICAL CcPfEnablePrefetcher;
  641. #define CCPF_IS_PREFETCHER_ENABLED() (CcPfEnablePrefetcher)
  642. extern LOGICAL CcPfPrefetchingForBoot;
  643. #define CCPF_IS_PREFETCHING_FOR_BOOT() (CcPfPrefetchingForBoot)
  644. NTSTATUS
  645. CcPfInitializePrefetcher(
  646. VOID
  647. );
  648. NTSTATUS
  649. CcPfBeginBootPhase(
  650. PF_BOOT_PHASE_ID Phase
  651. );
  652. NTSTATUS
  653. CcPfBeginAppLaunch(
  654. PEPROCESS Process,
  655. PVOID Section
  656. );
  657. NTSTATUS
  658. CcPfProcessExitNotification(
  659. PEPROCESS Process
  660. );
  661. #define CCPF_TYPE_IMAGE 0x00000001 // Current fault is for an image
  662. #define CCPF_TYPE_ROM 0x00000002 // Current fault is for a ROM
  663. VOID
  664. CcPfLogPageFault(
  665. IN PFILE_OBJECT FileObject,
  666. IN ULONGLONG FileOffset,
  667. IN ULONG Flags
  668. );
  669. NTSTATUS
  670. CcPfQueryPrefetcherInformation (
  671. IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
  672. IN PVOID SystemInformation,
  673. IN ULONG SystemInformationLength,
  674. IN KPROCESSOR_MODE PreviousMode,
  675. OUT PULONG Length
  676. );
  677. NTSTATUS
  678. CcPfSetPrefetcherInformation (
  679. IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
  680. IN PVOID SystemInformation,
  681. IN ULONG SystemInformationLength,
  682. IN KPROCESSOR_MODE PreviousMode
  683. );
  684. //
  685. // Internal kernel interfaces for Perf FileName rundowns.
  686. //
  687. VOID
  688. CcPerfFileRunDown (
  689. IN PPERFINFO_ENTRY_TABLE HashTable
  690. );
  691. #endif // CACHE