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.

291 lines
7.7 KiB

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