Merge branch 'master' into careminster
commit
12f732fd3f
|
@ -65,6 +65,7 @@ what it is today.
|
||||||
* A_Biondi
|
* A_Biondi
|
||||||
* alex_carnell
|
* alex_carnell
|
||||||
* Alan Webb (IBM)
|
* Alan Webb (IBM)
|
||||||
|
* Allen Kerensky
|
||||||
* BigFootAg
|
* BigFootAg
|
||||||
* BlueWall Slade
|
* BlueWall Slade
|
||||||
* brianw/Sir_Ahzz
|
* brianw/Sir_Ahzz
|
||||||
|
|
|
@ -102,17 +102,50 @@ namespace OpenSim
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset");
|
"[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset");
|
||||||
|
|
||||||
// Increase the number of IOCP threads available. Mono defaults to a tragically low number
|
// Verify the Threadpool allocates or uses enough worker and IO completion threads
|
||||||
|
// .NET 2.0 workerthreads default to 50 * numcores
|
||||||
|
// .NET 3.0 workerthreads defaults to 250 * numcores
|
||||||
|
// .NET 4.0 workerthreads are dynamic based on bitness and OS resources
|
||||||
|
// Max IO Completion threads are 1000 on all 3 CLRs.
|
||||||
|
int workerThreadsMin = 500;
|
||||||
|
int workerThreadsMax = 1000; // may need further adjustment to match other CLR
|
||||||
|
int iocpThreadsMin = 1000;
|
||||||
|
int iocpThreadsMax = 2000; // may need further adjustment to match other CLR
|
||||||
int workerThreads, iocpThreads;
|
int workerThreads, iocpThreads;
|
||||||
System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
|
System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
|
||||||
m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} worker threads and {1} IOCP threads", workerThreads, iocpThreads);
|
m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} worker threads and {1} IOCP threads", workerThreads, iocpThreads);
|
||||||
if (workerThreads < 500 || iocpThreads < 1000)
|
if (workerThreads < workerThreadsMin)
|
||||||
{
|
{
|
||||||
workerThreads = 500;
|
workerThreads = workerThreadsMin;
|
||||||
iocpThreads = 1000;
|
m_log.InfoFormat("[OPENSIM MAIN]: Bumping up to worker threads to {0}",workerThreads);
|
||||||
m_log.Info("[OPENSIM MAIN]: Bumping up to 500 worker threads and 1000 IOCP threads");
|
|
||||||
System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads);
|
|
||||||
}
|
}
|
||||||
|
if (workerThreads > workerThreadsMax)
|
||||||
|
{
|
||||||
|
workerThreads = workerThreadsMax;
|
||||||
|
m_log.InfoFormat("[OPENSIM MAIN]: Limiting worker threads to {0}",workerThreads);
|
||||||
|
}
|
||||||
|
// Increase the number of IOCP threads available.
|
||||||
|
// Mono defaults to a tragically low number (24 on 6-core / 8GB Fedora 17)
|
||||||
|
if (iocpThreads < iocpThreadsMin)
|
||||||
|
{
|
||||||
|
iocpThreads = iocpThreadsMin;
|
||||||
|
m_log.InfoFormat("[OPENSIM MAIN]: Bumping up IO completion threads to {0}",iocpThreads);
|
||||||
|
}
|
||||||
|
// Make sure we don't overallocate IOCP threads and thrash system resources
|
||||||
|
if ( iocpThreads > iocpThreadsMax )
|
||||||
|
{
|
||||||
|
iocpThreads = iocpThreadsMax;
|
||||||
|
m_log.InfoFormat("[OPENSIM MAIN]: Limiting IO completion threads to {0}",iocpThreads);
|
||||||
|
}
|
||||||
|
// set the resulting worker and IO completion thread counts back to ThreadPool
|
||||||
|
if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) )
|
||||||
|
{
|
||||||
|
m_log.InfoFormat("[OPENSIM MAIN]: Threadpool set to {0} worker threads and {1} IO completion threads", workerThreads, iocpThreads);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.Info("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect.");
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the system is compatible with OpenSimulator.
|
// Check if the system is compatible with OpenSimulator.
|
||||||
// Ensures that the minimum system requirements are met
|
// Ensures that the minimum system requirements are met
|
||||||
|
|
|
@ -5865,8 +5865,13 @@ Environment.Exit(1);
|
||||||
|
|
||||||
if (banned)
|
if (banned)
|
||||||
{
|
{
|
||||||
reason = "No suitable landing point found";
|
if(Permissions.IsAdministrator(agentID) == false || Permissions.IsGridGod(agentID) == false)
|
||||||
return false;
|
{
|
||||||
|
reason = "No suitable landing point found";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
reason = "Administrative access only";
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4269,6 +4269,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
(m_teleportFlags & TeleportFlags.ViaLocation) != 0 ||
|
(m_teleportFlags & TeleportFlags.ViaLocation) != 0 ||
|
||||||
(m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0)
|
(m_teleportFlags & Constants.TeleportFlags.ViaHGLogin) != 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (GodLevel < 200 &&
|
if (GodLevel < 200 &&
|
||||||
((!m_scene.Permissions.IsGod(m_uuid) &&
|
((!m_scene.Permissions.IsGod(m_uuid) &&
|
||||||
!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) ||
|
!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) ||
|
||||||
|
@ -4277,7 +4278,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
SpawnPoint[] spawnPoints = m_scene.RegionInfo.RegionSettings.SpawnPoints().ToArray();
|
SpawnPoint[] spawnPoints = m_scene.RegionInfo.RegionSettings.SpawnPoints().ToArray();
|
||||||
if (spawnPoints.Length == 0)
|
if (spawnPoints.Length == 0)
|
||||||
|
{
|
||||||
|
if(m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid))
|
||||||
|
{
|
||||||
|
pos.X = 128.0f;
|
||||||
|
pos.Y = 128.0f;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int index;
|
int index;
|
||||||
bool selected = false;
|
bool selected = false;
|
||||||
|
@ -4286,6 +4294,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
case "random":
|
case "random":
|
||||||
|
|
||||||
|
if (spawnPoints.Length == 0)
|
||||||
|
return;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
index = Util.RandomClass.Next(spawnPoints.Length - 1);
|
index = Util.RandomClass.Next(spawnPoints.Length - 1);
|
||||||
|
@ -4297,6 +4307,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// SpawnPoint sp = spawnPoints[index];
|
// SpawnPoint sp = spawnPoints[index];
|
||||||
|
|
||||||
ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y);
|
ILandObject land = m_scene.LandChannel.GetLandObject(spawnPosition.X, spawnPosition.Y);
|
||||||
|
|
||||||
if (land == null || land.IsEitherBannedOrRestricted(UUID))
|
if (land == null || land.IsEitherBannedOrRestricted(UUID))
|
||||||
selected = false;
|
selected = false;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue