Changeset 41682 in vbox for trunk/src/VBox/Runtime/r0drv/solaris
- Timestamp:
- Jun 13, 2012 12:52:01 PM (13 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/solaris
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/initterm-r0drv-solaris.c
r41656 r41682 154 154 else if (max_cpuid + 1 != IPRT_SOL_NCPUS) 155 155 { 156 cmn_err(CE_NOTE, "rtR0InitNative: cpuset_t size mismatch! max_cpuid=%d IPRT_SOL_NCPUS=%d\n", max_cpuid, IPRT_SOL_NCPUS); 156 cmn_err(CE_NOTE, "rtR0InitNative: cpuset_t size mismatch! max_cpuid=%d IPRT_SOL_NCPUS=%d\n", max_cpuid, 157 IPRT_SOL_NCPUS); 157 158 rc = VERR_NOT_SUPPORTED; 158 159 goto errorbail; … … 163 164 * Optional: Timeout hooks. 164 165 */ 165 RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /* pszModule */, "timeout_generic", (void **)&g_pfnrtR0Sol_timeout_generic); 166 RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /* pszModule */, "untimeout_generic", (void **)&g_pfnrtR0Sol_untimeout_generic); 166 RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /* pszModule */, "timeout_generic", 167 (void **)&g_pfnrtR0Sol_timeout_generic); 168 RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /* pszModule */, "untimeout_generic", 169 (void **)&g_pfnrtR0Sol_untimeout_generic); 167 170 if ((g_pfnrtR0Sol_timeout_generic == NULL) != (g_pfnrtR0Sol_untimeout_generic == NULL)) 168 171 { … … 173 176 g_pfnrtR0Sol_untimeout_generic = NULL; 174 177 } 175 RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /* pszModule */, "cyclic_reprogram", (void **)&g_pfnrtR0Sol_cyclic_reprogram); 178 RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /* pszModule */, "cyclic_reprogram", 179 (void **)&g_pfnrtR0Sol_cyclic_reprogram); 180 181 /* 182 * Optional: Querying page no-relocation support. 183 */ 184 RTR0DbgKrnlInfoQuerySymbol(g_hKrnlDbgInfo, NULL /*pszModule */, "page_noreloc_supported", 185 (void **)&g_pfnrtR0Sol_page_noreloc_supported); 176 186 177 187 /* -
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
r41680 r41682 84 84 static kmutex_t g_LargePageOffsetMtx; 85 85 static u_offset_t g_offLargePage; 86 static bool g_fLargePageNoReloc; 86 87 87 88 … … 291 292 { 292 293 /* 294 * Check PG_NORELOC support for large pages. Using this helps prevent _1G page 295 * fragementation on systems that support it. 296 */ 297 static bool fPageNoRelocChecked = false; 298 if (fPageNoRelocChecked == false) 299 { 300 fPageNoRelocChecked = true; 301 g_fLargePageNoReloc = false; 302 if ( g_pfnrtR0Sol_page_noreloc_supported 303 && g_pfnrtR0Sol_page_noreloc_supported(cbLargePage)) 304 { 305 g_fLargePageNoReloc = true; 306 } 307 } 308 309 /* 293 310 * Non-pageable memory reservation request for _4K pages, don't sleep. 294 311 */ … … 311 328 KernelSeg.s_as = &kas; 312 329 page_t *pRootPage = page_create_va_large(&g_LargePageVnode, offPage, cbLargePage, 313 PG_EXCL, &KernelSeg, 0 /* vaddr */, NULL /* locality group */); 330 PG_EXCL | (g_fLargePageNoReloc ? PG_NORELOC : 0), &KernelSeg, 331 0 /* vaddr */,NULL /* locality group */); 314 332 if (pRootPage) 315 333 { … … 399 417 AssertRelease(pFoundPage); 400 418 401 #if 0 402 /* 403 * This can only be guaranteed if PG_NORELOC is used while allocating the pages. 404 */ 405 AssertReleaseMsg(pFoundPage == pPage, 419 if (g_fLargePageNoReloc) 420 { 421 /* 422 * This can only be guaranteed if PG_NORELOC is used while allocating the pages. 423 */ 424 AssertReleaseMsg(pFoundPage == pPage, 406 425 ("lookup failed %p:%llu returned %p, expected %p\n", &g_LargePageVnode, offPage, 407 426 pFoundPage, pPage)); 408 #endif 427 } 409 428 410 429 /* -
trunk/src/VBox/Runtime/r0drv/solaris/the-solaris-kernel.h
r40978 r41682 82 82 typedef int (*PFNSOL_cyclic_reprogram)(cyclic_id_t id, hrtime_t expiration); 83 83 typedef void (*PFNSOL_contig_free)(void *addr, size_t size); 84 typedef int (*PFNSOL_page_noreloc_supported)(size_t cbPageSize); 84 85 85 86 /* IPRT globals. */ 86 extern bool g_frtSolSplSetsEIF;87 extern RTCPUSET g_rtMpSolCpuSet;88 extern PFNSOL_timeout_generic g_pfnrtR0Sol_timeout_generic;89 extern PFNSOL_untimeout_generic g_pfnrtR0Sol_untimeout_generic;90 extern PFNSOL_cyclic_reprogram g_pfnrtR0Sol_cyclic_reprogram;91 extern PFNSOL_contig_free g_pfnrtR0Sol_contig_free;92 extern bool g_frtSolUseKflt;93 extern size_t g_offrtSolThreadPreempt;94 extern size_t g_offrtSolCpuPreempt;95 extern size_t g_offrtSolCpuForceKernelPreempt;96 extern bool g_frtSolInitDone;97 extern RTDBGKRNLINFO g_hKrnlDbgInfo;87 extern bool g_frtSolSplSetsEIF; 88 extern RTCPUSET g_rtMpSolCpuSet; 89 extern PFNSOL_timeout_generic g_pfnrtR0Sol_timeout_generic; 90 extern PFNSOL_untimeout_generic g_pfnrtR0Sol_untimeout_generic; 91 extern PFNSOL_cyclic_reprogram g_pfnrtR0Sol_cyclic_reprogram; 92 extern PFNSOL_contig_free g_pfnrtR0Sol_contig_free; 93 extern PFNSOL_page_noreloc_supported g_pfnrtR0Sol_page_noreloc_supported; 94 extern size_t g_offrtSolThreadPreempt; 95 extern size_t g_offrtSolCpuPreempt; 96 extern size_t g_offrtSolCpuForceKernelPreempt; 97 extern bool g_frtSolInitDone; 98 extern RTDBGKRNLINFO g_hKrnlDbgInfo; 98 99 99 100 /*
Note:
See TracChangeset
for help on using the changeset viewer.