Leaked source code of windows server 2003
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.

328 lines
6.8 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 dq 0
  35. endm
  36. ;
  37. ; Define variable generation macro.
  38. ;
  39. ULONG64 macro VariableName
  40. align ALIGN_VALUE
  41. public VariableName
  42. VariableName dq 0
  43. endm
  44. _DATA$00 SEGMENT PAGE 'DATA'
  45. ;
  46. ; The Initial PCR must be the first allocation in the section so it will be
  47. ; page aligned.
  48. ;
  49. public KiInitialPCR
  50. KiInitialPCR db ProcessorControlRegisterLength dup (0)
  51. ;
  52. ; Static SpinLocks from ntos\cc
  53. ;
  54. SPINLOCK CcMasterSpinLock
  55. SPINLOCK CcWorkQueueSpinLock
  56. SPINLOCK CcVacbSpinLock
  57. SPINLOCK CcDeferredWriteSpinLock
  58. SPINLOCK CcDebugTraceLock
  59. SPINLOCK CcBcbSpinLock
  60. ;
  61. ; Static SpinLocks from ntos\ex
  62. ;
  63. SPINLOCK NonPagedPoolLock
  64. SPINLOCK ExpResourceSpinLock
  65. ;
  66. ; Static SpinLocks from ntos\io
  67. ;
  68. SPINLOCK IopCompletionLock
  69. SPINLOCK IopCancelSpinLock
  70. SPINLOCK IopVpbSpinLock
  71. SPINLOCK IopDatabaseLock
  72. SPINLOCK IopErrorLogLock
  73. SPINLOCK IopTimerLock
  74. SPINLOCK IoStatisticsLock
  75. ;
  76. ; Static SpinLocks from ntos\kd
  77. ;
  78. SPINLOCK KdpDebuggerLock
  79. ;
  80. ; Static SpinLocks from ntos\ke
  81. ;
  82. SPINLOCK KiDispatcherLock
  83. SPINLOCK KiFreezeExecutionLock
  84. SPINLOCK KiFreezeLockBackup
  85. SPINLOCK KiNMILock
  86. SPINLOCK KiProfileLock
  87. ULONG64 KiHardwareTrigger
  88. ;
  89. ; Static SpinLocks from ntos\mm
  90. ;
  91. SPINLOCK MmPfnLock
  92. SPINLOCK MmSystemSpaceLock
  93. SPINLOCK MmNonPagedPoolLock
  94. ;
  95. ; Static SpinLocks from ntos\ps
  96. ;
  97. SPINLOCK PspEventPairLock
  98. SPINLOCK PsLoadedModuleSpinLock
  99. ;
  100. ; Static SpinLocks from ntos\fsrtl
  101. ;
  102. SPINLOCK FsRtlStrucSupSpinLock
  103. ;
  104. ; Static SpinLocks from base\fs\ntfs
  105. ;
  106. SPINLOCK NtfsStructLock
  107. ;
  108. ; Static SpinLocks from net\sockets\winsock2\wsp
  109. ;
  110. SPINLOCK AfdWorkQueueSpinLock
  111. ;
  112. ; These variables are referenced together and are defined in a single cache
  113. ; line to reduce sharing on MP systems.
  114. ;
  115. ; KiIdleSummary - This is the set of processors which are idle. It is
  116. ; used by the ready thread code to speed up the search for a thread
  117. ; to preempt when a thread becomes runnable.
  118. ;
  119. align ALIGN_VALUE
  120. public KiIdleSummary
  121. KiIdleSummary dq 0
  122. ;
  123. ; PoSleepingSummary - Set of processors which currently sleep (ie stop)
  124. ; when idle.
  125. ;
  126. public PoSleepingSummary
  127. PoSleepingSummary dq 0
  128. ;
  129. ; KiTbFlushTimeStamp - This is the TB flush entire time stamp counter.
  130. ;
  131. ; This variable is in it own cache line to reduce false sharing on MP systems.
  132. ;
  133. align ALIGN_VALUE
  134. public KiTbFlushTimeStamp
  135. KiTbFlushTimeStamp dd 0
  136. ;
  137. ; These variables are referenced together and are defined in a single cache
  138. ; line to reduce sharing on MP systems.
  139. ;
  140. ; KiTimeIncrementReciprocal - This is the reciprocal fraction of the time
  141. ; increment value that is specified by the HAL when the system is
  142. ; booted.
  143. ;
  144. align ALIGN_VALUE
  145. public KiTimeIncrementReciprocal
  146. KiTimeIncrementReciprocal dq 0
  147. ;
  148. ; KiTimeIncrementShiftCount - This is the shift count that corresponds to
  149. ; the time increment reciprocal value.
  150. ;
  151. public KiTimeIncrementShiftCount
  152. KiTimeIncrementShiftCount dd 0
  153. ;
  154. ; KeMaximumIncrement - This is the maximum time between clock interrupts
  155. ; in 100ns units that is supported by the host HAL.
  156. ;
  157. public KeMaximumIncrement
  158. KeMaximumIncrement dd 0
  159. ;
  160. ; KeTimeAdjustment - This is the actual number of 100ns units that are to
  161. ; be added to the system time at each interval timer interupt. This
  162. ; value is copied from KeTimeIncrement at system start up and can be
  163. ; later modified via the set system information service.
  164. ; timer table entries.
  165. ;
  166. public KeTimeAdjustment
  167. KeTimeAdjustment dd 0
  168. ;
  169. ; KiTickOffset - This is the number of 100ns units remaining before a tick
  170. ; is added to the tick count and the system time is updated.
  171. ;
  172. public KiTickOffset
  173. KiTickOffset dd 0
  174. ;
  175. ; These variables are referenced together and are defined in a single cache
  176. ; line to reduce sharing on MP systems.
  177. ;
  178. ; KiMaximumDpcQueueDepth - This is used to control how many DPCs can be
  179. ; queued before a DPC of medium importance will trigger a dispatch
  180. ; interrupt.
  181. ;
  182. align ALIGN_VALUE
  183. public KiMaximumDpcQueueDepth
  184. KiMaximumDpcQueueDepth dd 4
  185. ;
  186. ; KiMinimumDpcRate - This is the rate of DPC requests per clock tick that
  187. ; must be exceeded before DPC batching of medium importance DPCs
  188. ; will occur.
  189. ;
  190. public KiMinimumDpcRate
  191. KiMinimumDpcRate dd 3
  192. ;
  193. ; KiAdjustDpcThreshold - This is the threshold used by the clock interrupt
  194. ; routine to control the rate at which the processor's DPC queue depth
  195. ; is dynamically adjusted.
  196. ;
  197. public KiAdjustDpcThreshold
  198. KiAdjustDpcThreshold dd 20
  199. ;
  200. ; KiIdealDpcRate - This is used to control the aggressiveness of the DPC
  201. ; rate adjusting algorithm when decrementing the queue depth. As long
  202. ; as the DPC rate for the last tick is greater than this rate, the
  203. ; DPC queue depth will not be decremented.
  204. ;
  205. public KiIdealDpcRate
  206. KiIdealDpcRate dd 20
  207. ;
  208. ; MmPaeMask - This is the value used to mask upper bits of a PAE PTE.
  209. ;
  210. ; This variable is in it own cache line to reduce false sharing on MP systems.
  211. ;
  212. align ALIGN_VALUE
  213. public MmPaeMask
  214. MmPaeMask dq 0
  215. public MmPaeErrMask
  216. MmPaeErrMask dd 0
  217. ;
  218. ; MmPfnDereferenceSListHead - This is used to store free blocks used for
  219. ; deferred PFN reference count releasing.
  220. ;
  221. ; This variable is in it own cache line to reduce false sharing on MP systems.
  222. ;
  223. align ALIGN_VALUE
  224. public MmPfnDereferenceSListHead
  225. MmPfnDereferenceSListHead dq 2 dup (0)
  226. ;
  227. ; MmPfnDeferredList - This is used to queue items that need reference count
  228. ; decrement processing.
  229. ;
  230. ; This variable is in it own cache line to reduce false sharing on MP systems.
  231. ;
  232. align ALIGN_VALUE
  233. public MmPfnDeferredList
  234. MmPfnDeferredList dq 0
  235. ;
  236. ; MmSystemLockPagesCount - This is the count of the number of locked pages
  237. ; in the system.
  238. ;
  239. align ALIGN_VALUE
  240. public MmSystemLockPagesCount
  241. MmSystemLockPagesCount dq 0
  242. align ALIGN_VALUE
  243. _DATA$00 ends
  244. end