diff options
-rw-r--r-- | CONTRIBUTORS.txt | 1 | ||||
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 45 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 |
4 files changed, 58 insertions, 8 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 43dea0b..5e50903 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt | |||
@@ -65,6 +65,7 @@ what it is today. | |||
65 | * A_Biondi | 65 | * A_Biondi |
66 | * alex_carnell | 66 | * alex_carnell |
67 | * Alan Webb (IBM) | 67 | * Alan Webb (IBM) |
68 | * Allen Kerensky | ||
68 | * BigFootAg | 69 | * BigFootAg |
69 | * BlueWall Slade | 70 | * BlueWall Slade |
70 | * brianw/Sir_Ahzz | 71 | * brianw/Sir_Ahzz |
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 0f90d37..c3e7ec2 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -102,17 +102,50 @@ namespace OpenSim | |||
102 | m_log.InfoFormat( | 102 | m_log.InfoFormat( |
103 | "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset"); | 103 | "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset"); |
104 | 104 | ||
105 | // Increase the number of IOCP threads available. Mono defaults to a tragically low number | 105 | // Verify the Threadpool allocates or uses enough worker and IO completion threads |
106 | // .NET 2.0 workerthreads default to 50 * numcores | ||
107 | // .NET 3.0 workerthreads defaults to 250 * numcores | ||
108 | // .NET 4.0 workerthreads are dynamic based on bitness and OS resources | ||
109 | // Max IO Completion threads are 1000 on all 3 CLRs. | ||
110 | int workerThreadsMin = 500; | ||
111 | int workerThreadsMax = 1000; // may need further adjustment to match other CLR | ||
112 | int iocpThreadsMin = 1000; | ||
113 | int iocpThreadsMax = 2000; // may need further adjustment to match other CLR | ||
106 | int workerThreads, iocpThreads; | 114 | int workerThreads, iocpThreads; |
107 | System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads); | 115 | System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads); |
108 | m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} worker threads and {1} IOCP threads", workerThreads, iocpThreads); | 116 | m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} worker threads and {1} IOCP threads", workerThreads, iocpThreads); |
109 | if (workerThreads < 500 || iocpThreads < 1000) | 117 | if (workerThreads < workerThreadsMin) |
110 | { | 118 | { |
111 | workerThreads = 500; | 119 | workerThreads = workerThreadsMin; |
112 | iocpThreads = 1000; | 120 | m_log.InfoFormat("[OPENSIM MAIN]: Bumping up to worker threads to {0}",workerThreads); |
113 | m_log.Info("[OPENSIM MAIN]: Bumping up to 500 worker threads and 1000 IOCP threads"); | ||
114 | System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads); | ||
115 | } | 121 | } |
122 | if (workerThreads > workerThreadsMax) | ||
123 | { | ||
124 | workerThreads = workerThreadsMax; | ||
125 | m_log.InfoFormat("[OPENSIM MAIN]: Limiting worker threads to {0}",workerThreads); | ||
126 | } | ||
127 | // Increase the number of IOCP threads available. | ||
128 | // Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17) | ||
129 | if (iocpThreads < iocpThreadsMin) | ||
130 | { | ||
131 | iocpThreads = iocpThreadsMin; | ||
132 | m_log.InfoFormat("[OPENSIM MAIN]: Bumping up IO completion threads to {0}",iocpThreads); | ||
133 | } | ||
134 | // Make sure we don't overallocate IOCP threads and thrash system resources | ||
135 | if ( iocpThreads > iocpThreadsMax ) | ||
136 | { | ||
137 | iocpThreads = iocpThreadsMax; | ||
138 | m_log.InfoFormat("[OPENSIM MAIN]: Limiting IO completion threads to {0}",iocpThreads); | ||
139 | } | ||
140 | // set the resulting worker and IO completion thread counts back to ThreadPool | ||
141 | if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) ) | ||
142 | { | ||
143 | m_log.InfoFormat("[OPENSIM MAIN]: Threadpool set to {0} worker threads and {1} IO completion threads", workerThreads, iocpThreads); | ||
144 | } | ||
145 | else | ||
146 | { | ||
147 | m_log.Info("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect."); | ||
148 | } | ||
116 | 149 | ||
117 | // Check if the system is compatible with OpenSimulator. | 150 | // Check if the system is compatible with OpenSimulator. |
118 | // Ensures that the minimum system requirements are met | 151 | // Ensures that the minimum system requirements are met |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c757147..1a1c3d2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5865,8 +5865,13 @@ Environment.Exit(1); | |||
5865 | 5865 | ||
5866 | if (banned) | 5866 | if (banned) |
5867 | { | 5867 | { |
5868 | reason = "No suitable landing point found"; | 5868 | if(Permissions.IsAdministrator(agentID) == false || Permissions.IsGridGod(agentID) == false) |
5869 | return false; | 5869 | { |
5870 | reason = "No suitable landing point found"; | ||
5871 | return false; | ||
5872 | } | ||
5873 | reason = "Administrative access only"; | ||
5874 | return true; | ||
5870 | } | 5875 | } |
5871 | } | 5876 | } |
5872 | } | 5877 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0bcf480..a57e0d1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -4269,6 +4269,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4269 | (m_teleportFlags & TeleportFlags.ViaLocation) != 0 || | 4269 | (m_teleportFlags & TeleportFlags.ViaLocation) != 0 || |
4270 | (m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0) | 4270 | (m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0) |
4271 | { | 4271 | { |
4272 | |||
4272 | if (GodLevel < 200 && | 4273 | if (GodLevel < 200 && |
4273 | ((!m_scene.Permissions.IsGod(m_uuid) && | 4274 | ((!m_scene.Permissions.IsGod(m_uuid) && |
4274 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || | 4275 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || |
@@ -4277,7 +4278,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
4277 | { | 4278 | { |
4278 | SpawnPoint[] spawnPoints = m_scene.RegionInfo.RegionSettings.SpawnPoints().ToArray(); | 4279 | SpawnPoint[] spawnPoints = m_scene.RegionInfo.RegionSettings.SpawnPoints().ToArray(); |
4279 | if (spawnPoints.Length == 0) | 4280 | if (spawnPoints.Length == 0) |
4281 | { | ||
4282 | if(m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) | ||
4283 | { | ||
4284 | pos.X = 128.0f; | ||
4285 | pos.Y = 128.0f; | ||
4286 | } | ||
4280 | return; | 4287 | return; |
4288 | } | ||
4281 | 4289 | ||
4282 | int index; | 4290 | int index; |
4283 | bool selected = false; | 4291 | bool selected = false; |
@@ -4286,6 +4294,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4286 | { | 4294 | { |
4287 | case "random": | 4295 | case "random": |
4288 | 4296 | ||
4297 | if (spawnPoints.Length == 0) | ||
4298 | return; | ||
4289 | do | 4299 | do |
4290 | { | 4300 | { |
4291 | index = Util.RandomClass.Next(spawnPoints.Length - 1); | 4301 | index = Util.RandomClass.Next(spawnPoints.Length - 1); |
@@ -4297,6 +4307,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4297 | // SpawnPoint sp = spawnPoints[index]; | 4307 | // SpawnPoint sp = spawnPoints[index]; |
4298 | 4308 | ||
4299 | ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); | 4309 | ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y); |
4310 | |||
4300 | if (land == null || land.IsEitherBannedOrRestricted(UUID)) | 4311 | if (land == null || land.IsEitherBannedOrRestricted(UUID)) |
4301 | selected = false; | 4312 | selected = false; |
4302 | else | 4313 | else |