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.

358 lines
7.9 KiB

  1. title "Global SpinLock declerations"
  2. ;++
  3. ;
  4. ;Copyright (c) 1991 Microsoft Corporation
  5. ;
  6. ;Module Name:
  7. ;
  8. ; splocks.asm
  9. ;
  10. ;Abstract:
  11. ;
  12. ; All global spinlocks in the kernel image are declared in this
  13. ; module. This is done so that each spinlock can be spaced out
  14. ; sufficiently to guaarantee that the L2 cache does not thrash
  15. ; by having a spinlock and another high use variable in the same
  16. ; cache line.
  17. ;
  18. ;Author:
  19. ;
  20. ; Ken Reneris (kenr) 13-Jan-1992
  21. ;
  22. ;Revision History:
  23. ;
  24. ;--
  25. .386p
  26. .xlist
  27. ifdef NT_UP
  28. PADLOCKS equ 4
  29. _DATA SEGMENT PARA PUBLIC 'DATA'
  30. else
  31. PADLOCKS equ 128
  32. _DATA SEGMENT PAGE PUBLIC 'DATA'
  33. endif
  34. SPINLOCK macro SpinLockName
  35. align PADLOCKS
  36. public SpinLockName
  37. SpinLockName dd 0
  38. endm
  39. ULONG macro VariableName
  40. align PADLOCKS
  41. public VariableName
  42. VariableName dd 0
  43. endm
  44. ;
  45. ; Static SpinLocks from ntos\cc\cachedat.c
  46. ;
  47. SPINLOCK _CcMasterSpinLock
  48. SPINLOCK _CcWorkQueueSpinLock
  49. SPINLOCK _CcVacbSpinLock
  50. SPINLOCK _CcDeferredWriteSpinLock
  51. SPINLOCK _CcDebugTraceLock
  52. SPINLOCK _CcBcbSpinLock
  53. ;
  54. ; Static SpinLocks from ntos\ex
  55. ;
  56. SPINLOCK _NonPagedPoolLock ; pool.c
  57. SPINLOCK _ExpResourceSpinLock ; resource.c
  58. ;
  59. ; Static SpinLocks from ntos\io\iodata.c
  60. ;
  61. SPINLOCK _IopCompletionLock
  62. SPINLOCK _IopCancelSpinLock
  63. SPINLOCK _IopVpbSpinLock
  64. SPINLOCK _IopDatabaseLock
  65. SPINLOCK _IopErrorLogLock
  66. SPINLOCK _IopTimerLock
  67. SPINLOCK _IoStatisticsLock
  68. ;
  69. ; Static SpinLocks from ntos\kd\kdlock.c
  70. ;
  71. SPINLOCK _KdpDebuggerLock
  72. ;
  73. ; Static SpinLocks from ntos\ke\kernldat.c
  74. ;
  75. SPINLOCK _KiContextSwapLock
  76. SPINLOCK _KiDispatcherLock
  77. SPINLOCK _KiFreezeExecutionLock
  78. SPINLOCK _KiFreezeLockBackup
  79. ULONG _KiHardwareTrigger
  80. SPINLOCK _KiProfileLock
  81. ;
  82. ; Static SpinLocks from ntos\mm\miglobal.c
  83. ;
  84. SPINLOCK _MmPfnLock
  85. SPINLOCK _MmSystemSpaceLock
  86. ;
  87. ; Static SpinLocks from ntos\ps\psinit.c
  88. ;
  89. SPINLOCK _PspEventPairLock
  90. SPINLOCK _PsLoadedModuleSpinLock
  91. ;
  92. ; Static SpinLocks from ntos\fsrtl\fsrtlp.c
  93. ;
  94. SPINLOCK _FsRtlStrucSupSpinLock ; fsrtlp.c
  95. ;
  96. ; Static SpinLocks from base\fs\ntfs
  97. ;
  98. SPINLOCK _NtfsStructLock
  99. ;
  100. ; Static SpinLocks from net\sockets\winsock2\wsp\afdsys
  101. ;
  102. SPINLOCK _AfdWorkQueueSpinLock
  103. ;
  104. ; These variables are updated frequently and under control of the dispatcher
  105. ; database lock. They are defined in a single cache line to reduce false
  106. ; sharing in MP systems.
  107. ;
  108. ; KiIdleSummary - This is the set of processors which are idle. It is
  109. ; used by the ready thread code to speed up the search for a thread
  110. ; to preempt when a thread becomes runnable.
  111. ;
  112. align PADLOCKS
  113. public _KiIdleSummary
  114. _KiIdleSummary dd 0
  115. ;
  116. ; KiIdleSMTSummary - In multi threaded processors, this is the set of
  117. ; idle processors in which all the logical processors that make up a
  118. ; physical processor are idle. That is, this is the set of logical
  119. ; processors in completely idle physical processors.
  120. ;
  121. public _KiIdleSMTSummary
  122. _KiIdleSMTSummary dd 0
  123. ;
  124. ; KiReadySummary - This is the set of dispatcher ready queues that are not
  125. ; empty. A member is set in this set for each priority that has one or
  126. ; more entries in its respective dispatcher ready queues.
  127. ;
  128. public _KiReadySummary
  129. _KiReadySummary dd 0
  130. ;
  131. ; PoSleepingSummary - Set of processors which currently sleep (ie stop)
  132. ; when idle.
  133. ;
  134. public _PoSleepingSummary
  135. _PoSleepingSummary dd 0
  136. ;
  137. ; KiTbFlushTimeStamp - This is the TB flush entire time stamp counter.
  138. ;
  139. ; This variable is in it own cache line to reduce false sharing on MP systems.
  140. ;
  141. align PADLOCKS
  142. public _KiTbFlushTimeStamp
  143. _KiTbFlushTimeStamp dd 0
  144. ;
  145. ; These variables are referenced together and are defined in a single cache
  146. ; line to reduce sharing on MP systems.
  147. ;
  148. ; IopLookasideIrpFloat - This is the number of IRPs that are currently
  149. ; in progress that were allocated from a lookaside list.
  150. ;
  151. align PADLOCKS
  152. public _IopLookasideIrpFloat
  153. _IopLookasideIrpFloat dd 0
  154. ;
  155. ; IopLookasideIrpLimit - This is the maximum number of IRPs that can be
  156. ; in progress that were allocated from a lookaside list.
  157. ;
  158. public _IopLookasideIrpLimit
  159. _IopLookasideIrpLimit dd 0
  160. ;
  161. ; These variables are referenced together and are defined in a single cache
  162. ; line to reduce sharing on MP systems.
  163. ;
  164. ; KeTickCount - This is the number of clock ticks that have occurred since
  165. ; the system was booted. This count is used to compute a millisecond
  166. ; tick counter.
  167. ;
  168. align PADLOCKS
  169. public _KeTickCount
  170. _KeTickCount dd 0, 0, 0
  171. ;
  172. ; KeMaximumIncrement - This is the maximum time between clock interrupts
  173. ; in 100ns units that is supported by the host HAL.
  174. ;
  175. public _KeMaximumIncrement
  176. _KeMaximumIncrement dd 0
  177. ;
  178. ; KeTimeAdjustment - This is the actual number of 100ns units that are to
  179. ; be added to the system time at each interval timer interupt. This
  180. ; value is copied from KeTimeIncrement at system start up and can be
  181. ; later modified via the set system information service.
  182. ; timer table entries.
  183. ;
  184. public _KeTimeAdjustment
  185. _KeTimeAdjustment dd 0
  186. ;
  187. ; KiTickOffset - This is the number of 100ns units remaining before a tick
  188. ; is added to the tick count and the system time is updated.
  189. ;
  190. public _KiTickOffset
  191. _KiTickOffset dd 0
  192. ;
  193. ; These variables are referenced together and are defined in a single cache
  194. ; line to reduce sharing on MP systems.
  195. ;
  196. ; KiMaximumDpcQueueDepth - This is used to control how many DPCs can be
  197. ; queued before a DPC of medium importance will trigger a dispatch
  198. ; interrupt.
  199. ;
  200. align PADLOCKS
  201. public _KiMaximumDpcQueueDepth
  202. _KiMaximumDpcQueueDepth dd 4
  203. ;
  204. ; KiMinimumDpcRate - This is the rate of DPC requests per clock tick that
  205. ; must be exceeded before DPC batching of medium importance DPCs
  206. ; will occur.
  207. ;
  208. public _KiMinimumDpcRate
  209. _KiMinimumDpcRate dd 3
  210. ;
  211. ; KiAdjustDpcThreshold - This is the threshold used by the clock interrupt
  212. ; routine to control the rate at which the processor's DPC queue depth
  213. ; is dynamically adjusted.
  214. ;
  215. public _KiAdjustDpcThreshold
  216. _KiAdjustDpcThreshold dd 20
  217. ;
  218. ; KiIdealDpcRate - This is used to control the aggressiveness of the DPC
  219. ; rate adjusting algorithm when decrementing the queue depth. As long
  220. ; as the DPC rate for the last tick is greater than this rate, the
  221. ; DPC queue depth will not be decremented.
  222. ;
  223. public _KiIdealDpcRate
  224. _KiIdealDpcRate dd 20
  225. ;
  226. ; These variables are referenced together and are defined in a single cache
  227. ; line to reduce sharing on MP systems.
  228. ;
  229. ; KeErrorMask - This is the value used to mask the error code passed to
  230. ; memory management on page faults.
  231. ;
  232. align PADLOCKS
  233. public _KeErrorMask
  234. _KeErrorMask dd 1
  235. ;
  236. ; MmPaeErrMask - This is the value used to mask upper bits of a PAE error.
  237. ;
  238. public _MmPaeErrMask
  239. _MmPaeErrMask dd 0
  240. ;
  241. ; MmPaeMask - This is the value used to mask upper bits of a PAE PTE.
  242. ;
  243. public _MmPaeMask
  244. _MmPaeMask dq 0
  245. ;
  246. ; MmPfnDereferenceSListHead - This is used to store free blocks used for
  247. ; deferred PFN reference count releasing.
  248. ;
  249. align PADLOCKS
  250. public _MmPfnDereferenceSListHead
  251. _MmPfnDereferenceSListHead dq 0
  252. ;
  253. ; MmPfnDeferredList - This is used to queue items that need reference count
  254. ; decrement processing.
  255. ;
  256. align PADLOCKS
  257. public _MmPfnDeferredList
  258. _MmPfnDeferredList dd 0
  259. ;
  260. ; MmSystemLockPagesCount - This is the count of the number of locked pages
  261. ; in the system.
  262. ;
  263. align PADLOCKS
  264. public _MmSystemLockPagesCount
  265. _MmSystemLockPagesCount dd 0
  266. align PADLOCKS
  267. _DATA ends
  268. end