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.

369 lines
7.3 KiB

  1. title "Global SpinLock declerations"
  2. ;++
  3. ;
  4. ;Copyright (c) 2000 Microsoft Corporation
  5. ;
  6. ; Module Name:
  7. ;
  8. ; hifreqlk.asm
  9. ;
  10. ; Abstract:
  11. ;
  12. ; High frequency system spin locks are declared in this module. Each spin
  13. ; lock is placed in its own cache line on MP systems.
  14. ;
  15. ; Author:
  16. ;
  17. ; David N. Cutler (davec) 22-Jun-2000
  18. ;
  19. ;Revision History:
  20. ;
  21. ;--
  22. include ksamd64.inc
  23. ifdef NT_UP
  24. ALIGN_VALUE equ 16
  25. else
  26. ALIGN_VALUE equ 128
  27. endif
  28. ;
  29. ; Define spin lock generation macro.
  30. ;
  31. SPINLOCK macro SpinLockName
  32. align ALIGN_VALUE
  33. public SpinLockName
  34. SpinLockName:
  35. dq 0
  36. endm
  37. ;
  38. ; Define variable generation macro.
  39. ;
  40. ULONG64 macro VariableName
  41. align ALIGN_VALUE
  42. public VariableName
  43. VariableName:
  44. dq 0
  45. endm
  46. _DATA$00 SEGMENT PAGE PUBLIC 'DATA'
  47. ;
  48. ; The Initial PCR must be the first allocation in the section so it will be
  49. ; page aligned.
  50. ;
  51. public KiInitialPCR
  52. KiInitialPCR:
  53. db ProcessorControlRegisterLength dup (0) ;
  54. ;
  55. ; Static SpinLocks from ntos\cc
  56. ;
  57. SPINLOCK CcMasterSpinLock
  58. SPINLOCK CcWorkQueueSpinLock
  59. SPINLOCK CcVacbSpinLock
  60. SPINLOCK CcDeferredWriteSpinLock
  61. SPINLOCK CcDebugTraceLock
  62. SPINLOCK CcBcbSpinLock
  63. ;
  64. ; Static SpinLocks from ntos\ex
  65. ;
  66. SPINLOCK NonPagedPoolLock
  67. SPINLOCK ExpResourceSpinLock
  68. ;
  69. ; Static SpinLocks from ntos\io
  70. ;
  71. SPINLOCK IopCompletionLock
  72. SPINLOCK IopCancelSpinLock
  73. SPINLOCK IopVpbSpinLock
  74. SPINLOCK IopDatabaseLock
  75. SPINLOCK IopErrorLogLock
  76. SPINLOCK IopTimerLock
  77. SPINLOCK IoStatisticsLock
  78. ;
  79. ; Static SpinLocks from ntos\kd
  80. ;
  81. SPINLOCK KdpDebuggerLock
  82. ;
  83. ; Static SpinLocks from ntos\ke
  84. ;
  85. SPINLOCK KiContextSwapLock
  86. SPINLOCK KiDispatcherLock
  87. SPINLOCK KiFreezeExecutionLock
  88. SPINLOCK KiFreezeLockBackup
  89. SPINLOCK KiProfileLock
  90. ULONG64 KiHardwareTrigger
  91. ;
  92. ; Static SpinLocks from ntos\mm
  93. ;
  94. SPINLOCK MmPfnLock
  95. SPINLOCK MmSystemSpaceLock
  96. SPINLOCK MmChargeCommitmentLock
  97. ;
  98. ; Static SpinLocks from ntos\ps
  99. ;
  100. SPINLOCK PspEventPairLock
  101. SPINLOCK PsLoadedModuleSpinLock
  102. ;
  103. ; Static SpinLocks from ntos\fsrtl
  104. ;
  105. SPINLOCK FsRtlStrucSupSpinLock
  106. ;
  107. ; Static SpinLocks from base\fs\ntfs
  108. ;
  109. SPINLOCK NtfsStructLock
  110. ;
  111. ; Static SpinLocks from net\sockets\winsock2\wsp
  112. ;
  113. SPINLOCK AfdWorkQueueSpinLock
  114. ;
  115. ; These variables are referenced together and are defined in a single cache
  116. ; line to reduce sharing on MP systems.
  117. ;
  118. ; KiIdleSummary - This is the set of processors which are idle. It is
  119. ; used by the ready thread code to speed up the search for a thread
  120. ; to preempt when a thread becomes runnable.
  121. ;
  122. align ALIGN_VALUE
  123. public KiIdleSummary
  124. KiIdleSummary:
  125. dq 0
  126. ;
  127. ; KiReadySummary - This is the set of dispatcher ready queues that are not
  128. ; empty. A member is set in this set for each priority that has one or
  129. ; more entries in its respective dispatcher ready queues.
  130. ;
  131. public KiReadySummary
  132. KiReadySummary:
  133. dq 0
  134. ;
  135. ; PoSleepingSummary - Set of processors which currently sleep (ie stop)
  136. ; when idle.
  137. ;
  138. public PoSleepingSummary
  139. PoSleepingSummary:
  140. dq 0
  141. ;
  142. ; KiTbFlushTimeStamp - This is the TB flush entire time stamp counter.
  143. ;
  144. ; This variable is in it own cache line to reduce false sharing on MP systems.
  145. ;
  146. align ALIGN_VALUE
  147. public KiTbFlushTimeStamp
  148. KiTbFlushTimeStamp:
  149. dd 0
  150. ;
  151. ; These variables are referenced together and are defined in a single cache
  152. ; line to reduce sharing on MP systems.
  153. ;
  154. ; IopLookasideIrpFloat - This is the number of IRPs that are currently
  155. ; in progress that were allocated from a lookaside list.
  156. ;
  157. align ALIGN_VALUE
  158. public IopLookasideIrpFloat
  159. IopLookasideIrpFloat:
  160. dd 0
  161. ;
  162. ; IopLookasideIrpLimit - This is the maximum number of IRPs that can be
  163. ; in progress that were allocated from a lookaside list.
  164. ;
  165. public IopLookasideIrpLimit
  166. IopLookasideIrpLimit:
  167. dd 0
  168. ;
  169. ; These variables are referenced together and are defined in a single cache
  170. ; line to reduce sharing on MP systems.
  171. ;
  172. ; KeTickCount - This is the number of clock ticks that have occurred since
  173. ; the system was booted. This count is used to compute a millisecond
  174. ; tick counter.
  175. ;
  176. align ALIGN_VALUE
  177. public KeTickCount
  178. KeTickCount:
  179. dq 0
  180. ;
  181. ; KeMaximumIncrement - This is the maximum time between clock interrupts
  182. ; in 100ns units that is supported by the host HAL.
  183. ;
  184. public KeMaximumIncrement
  185. KeMaximumIncrement:
  186. dd 0
  187. ;
  188. ; KeTimeAdjustment - This is the actual number of 100ns units that are to
  189. ; be added to the system time at each interval timer interupt. This
  190. ; value is copied from KeTimeIncrement at system start up and can be
  191. ; later modified via the set system information service.
  192. ; timer table entries.
  193. ;
  194. public KeTimeAdjustment
  195. KeTimeAdjustment:
  196. dd 0
  197. ;
  198. ; KiTickOffset - This is the number of 100ns units remaining before a tick
  199. ; is added to the tick count and the system time is updated.
  200. ;
  201. public KiTickOffset
  202. KiTickOffset:
  203. dd 0
  204. ;
  205. ; These variables are referenced together and are defined in a single cache
  206. ; line to reduce sharing on MP systems.
  207. ;
  208. ; KiMaximumDpcQueueDepth - This is used to control how many DPCs can be
  209. ; queued before a DPC of medium importance will trigger a dispatch
  210. ; interrupt.
  211. ;
  212. align ALIGN_VALUE
  213. public KiMaximumDpcQueueDepth
  214. KiMaximumDpcQueueDepth:
  215. dd 4
  216. ;
  217. ; KiMinimumDpcRate - This is the rate of DPC requests per clock tick that
  218. ; must be exceeded before DPC batching of medium importance DPCs
  219. ; will occur.
  220. ;
  221. public KiMinimumDpcRate
  222. KiMinimumDpcRate:
  223. dd 3
  224. ;
  225. ; KiAdjustDpcThreshold - This is the threshold used by the clock interrupt
  226. ; routine to control the rate at which the processor's DPC queue depth
  227. ; is dynamically adjusted.
  228. ;
  229. public KiAdjustDpcThreshold
  230. KiAdjustDpcThreshold:
  231. dd 20
  232. ;
  233. ; KiIdealDpcRate - This is used to control the aggressiveness of the DPC
  234. ; rate adjusting algorithm when decrementing the queue depth. As long
  235. ; as the DPC rate for the last tick is greater than this rate, the
  236. ; DPC queue depth will not be decremented.
  237. ;
  238. public KiIdealDpcRate
  239. KiIdealDpcRate:
  240. dd 20
  241. ;
  242. ; MmPaeMask - This is the value used to mask upper bits of a PAE PTE.
  243. ;
  244. ; This variable is in it own cache line to reduce false sharing on MP systems.
  245. ;
  246. align ALIGN_VALUE
  247. public MmPaeMask
  248. MmPaeMask:
  249. dq 0
  250. ;
  251. ; MmPfnDereferenceSListHead - This is used to store free blocks used for
  252. ; deferred PFN reference count releasing.
  253. ;
  254. ; This variable is in it own cache line to reduce false sharing on MP systems.
  255. ;
  256. align ALIGN_VALUE
  257. public MmPfnDereferenceSListHead
  258. MmPfnDereferenceSListHead:
  259. dq 0
  260. dq 0
  261. ;
  262. ; MmPfnDeferredList - This is used to queue items that need reference count
  263. ; decrement processing.
  264. ;
  265. ; This variable is in it own cache line to reduce false sharing on MP systems.
  266. ;
  267. align ALIGN_VALUE
  268. public MmPfnDeferredList
  269. MmPfnDeferredList:
  270. dq 0
  271. ;
  272. ; MmSystemLockPagesCount - This is the count of the number of locked pages
  273. ; in the system.
  274. ;
  275. align ALIGN_VALUE
  276. public MmSystemLockPagesCount
  277. MmSystemLockPagesCount:
  278. dq 0
  279. align ALIGN_VALUE
  280. _DATA$00 ends
  281. end