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.

307 lines
7.4 KiB

  1. // TITLE("High Frequency Spin Locks")
  2. //++
  3. //
  4. // Module Name:
  5. //
  6. // hifreqlk.s
  7. //
  8. // Abstract:
  9. //
  10. // This module contains storage for high frequency spin locks. Each
  11. // is allocated to a separate cache line.
  12. //
  13. // Author:
  14. //
  15. // William K. Cheung (wcheung) 29-Sep-1995
  16. //
  17. // based on David N. Cutler (davec) 25-Jun-1993
  18. //
  19. // Environment:
  20. //
  21. // Kernel mode.
  22. //
  23. // Revision History:
  24. //
  25. //--
  26. #include "ksia64.h"
  27. #if defined(NT_UP)
  28. #define ALIGN .##align 8
  29. #define ALIGN_SLIST .##align 16
  30. #else
  31. #define ALIGN .##align 128
  32. #define ALIGN_SLIST ALIGN
  33. #endif
  34. #define SPIN_LOCK data8 0
  35. .sdata
  36. ALIGN
  37. SPIN_LOCK
  38. .global AfdWorkQueueSpinLock
  39. ALIGN
  40. AfdWorkQueueSpinLock: // AFD work queue lock
  41. SPIN_LOCK
  42. .global CcBcbSpinLock
  43. ALIGN
  44. CcBcbSpinLock: // cache manager BCB lock
  45. SPIN_LOCK
  46. .global CcMasterSpinLock
  47. ALIGN
  48. CcMasterSpinLock: // cache manager master lock
  49. SPIN_LOCK
  50. .global CcVacbSpinLock
  51. ALIGN
  52. CcVacbSpinLock: // cache manager VACB lock
  53. SPIN_LOCK
  54. .global ExpResourceSpinLock
  55. ALIGN
  56. ExpResourceSpinLock: // resource package lock
  57. SPIN_LOCK
  58. .global IopCancelSpinLock
  59. ALIGN
  60. IopCancelSpinLock: // I/O cancel lock
  61. SPIN_LOCK
  62. .global IopCompletionLock
  63. ALIGN
  64. IopCompletionLock: // I/O completion lock
  65. SPIN_LOCK
  66. .global IopDatabaseLock
  67. ALIGN
  68. IopDatabaseLock: // I/O database lock
  69. SPIN_LOCK
  70. .global IopVpbSpinLock
  71. ALIGN
  72. IopVpbSpinLock: // I/O VPB lock
  73. SPIN_LOCK
  74. .global IoStatisticsLock
  75. ALIGN
  76. IoStatisticsLock: // I/O statistics lock
  77. SPIN_LOCK
  78. .global KiContextSwapLock
  79. ALIGN
  80. KiContextSwapLock: // context swap lock
  81. SPIN_LOCK
  82. .global KiDispatcherLock
  83. ALIGN
  84. KiDispatcherLock: // dispatcher database lock
  85. SPIN_LOCK
  86. .global MmPfnLock
  87. ALIGN
  88. MmPfnLock: // page frame database lock
  89. SPIN_LOCK
  90. .global NonPagedPoolLock
  91. ALIGN
  92. NonPagedPoolLock: // nonpage pool allocation lock
  93. SPIN_LOCK
  94. .global NtfsStructLock
  95. ALIGN
  96. NtfsStructLock: // NTFS structure lock
  97. SPIN_LOCK
  98. //
  99. // IopLookasideIrpFloat - This is the number of IRPs that are currently
  100. // in progress that were allocated from a lookaside list.
  101. //
  102. .global IopLookasideIrpFloat;
  103. ALIGN
  104. IopLookasideIrpFloat:
  105. data4 0
  106. //
  107. // IopLookasideIrpLimit - This is the maximum number of IRPs that can be
  108. // in progress that were allocated from a lookaside list.
  109. //
  110. .global IopLookasideIrpLimit;
  111. IopLookasideIrpLimit:
  112. data4 0
  113. //
  114. // The following fields are updated rarely.
  115. //
  116. ALIGN
  117. .global KiMasterSequence // master sequence number
  118. KiMasterSequence:
  119. data8 START_SEQUENCE
  120. .global KiMasterRid // master region ID
  121. KiMasterRid:
  122. data4 START_PROCESS_RID
  123. //
  124. // KeTickCount - This is the number of clock ticks that have occurred since
  125. // the system was booted. This count is used to compute a millisecond
  126. // tick counter.
  127. //
  128. ALIGN
  129. .global KeTickCount
  130. KeTickCount: //
  131. data8 0
  132. //
  133. // KiTickOffset - This is the number of 100ns units remaining before a tick
  134. // is added to the tick count and the system time is updated.
  135. //
  136. .global KiTickOffset
  137. KiTickOffset: //
  138. data4 0
  139. //
  140. // The following fields are static for the life of the system.
  141. //
  142. .global KiSynchIrql
  143. KiSynchIrql: // synchronization IRQL
  144. data4 SYNCH_LEVEL //
  145. //
  146. // KeMaximumIncrement - This is the maximum time between clock interrupts
  147. // in 100ns units that is supported by the host HAL.
  148. //
  149. .global KeMaximumIncrement
  150. KeMaximumIncrement: //
  151. data4 0
  152. //
  153. // KeTimeAdjustment - This is the actual number of 100ns units that are to
  154. // be added to the system time at each interval timer interupt. This
  155. // value is copied from KeTimeIncrement at system start up and can be
  156. // later modified via the set system information service.
  157. // timer table entries.
  158. //
  159. .global KeTimeAdjustment
  160. KeTimeAdjustment: //
  161. data4 0
  162. //
  163. // KiMaximumDpcQueueDepth - This is used to control how many DPCs can be
  164. // queued before a DPC of medium importance will trigger a dispatch
  165. // interrupt.
  166. //
  167. ALIGN
  168. .global KiMaximumDpcQueueDepth
  169. KiMaximumDpcQueueDepth: //
  170. data4 4
  171. //
  172. // KiMinimumDpcRate - This is the rate of DPC requests per clock tick that
  173. // must be exceeded before DPC batching of medium importance DPCs
  174. // will occur.
  175. //
  176. .global KiMinimumDpcRate
  177. KiMinimumDpcRate: //
  178. data4 3
  179. //
  180. // KiAdjustDpcThreshold - This is the threshold used by the clock interrupt
  181. // routine to control the rate at which the processor's DPC queue depth
  182. // is dynamically adjusted.
  183. //
  184. .global KiAdjustDpcThreshold
  185. KiAdjustDpcThreshold: //
  186. data4 20
  187. //
  188. // KiIdealDpcRate - This is used to control the aggressiveness of the DPC
  189. // rate adjusting algorithm when decrementing the queue depth. As long
  190. // as the DPC rate for the last tick is greater than this rate, the
  191. // DPC queue depth will not be decremented.
  192. //
  193. .global KiIdealDpcRate
  194. KiIdealDpcRate: //
  195. data4 20
  196. //
  197. // KiTbFlushTimeStamp - This is the TB flush entire time stamp counter.
  198. //
  199. ALIGN
  200. .global KiTbFlushTimeStamp
  201. KiTbFlushTimeStamp: //
  202. data4 0
  203. //
  204. // The following data is frequently updated together and always
  205. // under the ownership of the dispatcher database lock.
  206. //
  207. ALIGN
  208. .global KiIdleSummary
  209. KiIdleSummary:
  210. data8 0
  211. .global KiReadySummary
  212. KiReadySummary:
  213. data8 0
  214. .global PoSleepingSummary
  215. PoSleepingSummary:
  216. data8 0
  217. //
  218. // MmPfnDereferenceSListHead - This is used to store free blocks used for
  219. // deferred PFN reference count releasing.
  220. //
  221. ALIGN_SLIST
  222. .global MmPfnDereferenceSListHead
  223. MmPfnDereferenceSListHead:
  224. data8 0
  225. data8 0
  226. //
  227. // MmPfnDeferredList - This is used to queue items that need reference count
  228. // decrement processing.
  229. //
  230. ALIGN
  231. .global MmPfnDeferredList
  232. MmPfnDeferredList:
  233. data8 0
  234. //
  235. // MmSystemLockPagesCount - This is the count of the number of locked pages
  236. // in the system.
  237. //
  238. ALIGN
  239. .global MmSystemLockPagesCount
  240. MmSystemLockPagesCount:
  241. data8 0
  242. ALIGN
  243. data8 0