enable PercentBasedFS
git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@67 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
parent
6ce33ce9fd
commit
8f1cc9886a
@ -2160,6 +2160,7 @@ typedef struct {
|
||||
int SPVJobIsPreemptible; /* (config boolean) */
|
||||
|
||||
mbool_t EnableEncryption;
|
||||
mbool_t PercentBasedFS;
|
||||
|
||||
char *Argv[MAX_MARG];
|
||||
|
||||
|
@ -886,6 +886,9 @@ int MFSProcessOConfig(
|
||||
|
||||
case pFSPolicy:
|
||||
|
||||
if (strchr(SVal,'*'))
|
||||
MSched.PercentBasedFS = TRUE;
|
||||
|
||||
if (MUBoolFromString(SVal,FALSE) == TRUE)
|
||||
{
|
||||
/* enable backlevel support */
|
||||
|
@ -2462,6 +2462,11 @@ int MParConfigShow(
|
||||
|
||||
sprintf(Buffer,"%s%-30s %s\n",Buffer,MParam[pFSPolicy],MFSPolicyType[F->FSPolicy]);
|
||||
|
||||
sprintf(Buffer,"%s%-30s %s%s\n",
|
||||
Buffer,
|
||||
MParam[pFSPolicy],MFSPolicyType[F->FSPolicy],
|
||||
(MSched.PercentBasedFS == TRUE) ? "%" : "");
|
||||
|
||||
if ((F->FSPolicy == fspNONE) || (VFlag || (PIndex == -1) || (PIndex == pFSPolicy)))
|
||||
{
|
||||
sprintf(Buffer,"%s%-30s %s\n",Buffer,MParam[pFSInterval],MULToTString(F->FSInterval));
|
||||
|
@ -761,9 +761,18 @@ int MJobGetStartPriority(
|
||||
|
||||
if (FSTargetUsage > 0.0)
|
||||
{
|
||||
SFactor[mpsFU] = FSTargetUsage -
|
||||
(J->Cred.U->F.FSUsage[0] + J->Cred.U->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
if (MSched.PercentBasedFS == TRUE)
|
||||
{
|
||||
SFactor[mpsFU] = 1.0 -
|
||||
(((J->Cred.U->F.FSUsage[0] + J->Cred.U->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0)/FSTargetUsage);
|
||||
}
|
||||
else
|
||||
{
|
||||
SFactor[mpsFU] = FSTargetUsage -
|
||||
(J->Cred.U->F.FSUsage[0] + J->Cred.U->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
}
|
||||
|
||||
switch(FSMode)
|
||||
{
|
||||
@ -797,9 +806,18 @@ int MJobGetStartPriority(
|
||||
|
||||
if (FSTargetUsage > 0.0)
|
||||
{
|
||||
SFactor[mpsFG] = FSTargetUsage -
|
||||
(J->Cred.G->F.FSUsage[0] + J->Cred.G->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
if (MSched.PercentBasedFS == TRUE)
|
||||
{
|
||||
SFactor[mpsFU] = 1.0 -
|
||||
(((J->Cred.G->F.FSUsage[0] + J->Cred.G->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0)/FSTargetUsage);
|
||||
}
|
||||
else
|
||||
{
|
||||
SFactor[mpsFG] = FSTargetUsage -
|
||||
(J->Cred.G->F.FSUsage[0] + J->Cred.G->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
}
|
||||
|
||||
switch(FSMode)
|
||||
{
|
||||
@ -833,9 +851,18 @@ int MJobGetStartPriority(
|
||||
{
|
||||
if (J->Cred.A != NULL)
|
||||
{
|
||||
SFactor[mpsFA] = FSTargetUsage -
|
||||
(J->Cred.A->F.FSUsage[0] + J->Cred.A->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
if (MSched.PercentBasedFS == TRUE)
|
||||
{
|
||||
SFactor[mpsFA] = 1.0 -
|
||||
(((J->Cred.A->F.FSUsage[0] + J->Cred.A->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0)/FSTargetUsage);
|
||||
}
|
||||
else
|
||||
{
|
||||
SFactor[mpsFA] = FSTargetUsage -
|
||||
(J->Cred.A->F.FSUsage[0] + J->Cred.A->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -873,9 +900,18 @@ int MJobGetStartPriority(
|
||||
{
|
||||
if (J->Cred.C != NULL)
|
||||
{
|
||||
SFactor[mpsFC] = FSTargetUsage -
|
||||
(J->Cred.C->F.FSUsage[0] + J->Cred.C->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
if (MSched.PercentBasedFS == TRUE)
|
||||
{
|
||||
SFactor[mpsFC] = 1.0 -
|
||||
(((J->Cred.C->F.FSUsage[0] + J->Cred.C->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0)/FSTargetUsage);
|
||||
}
|
||||
else
|
||||
{
|
||||
SFactor[mpsFC] = FSTargetUsage -
|
||||
(J->Cred.C->F.FSUsage[0] + J->Cred.C->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -913,9 +949,18 @@ int MJobGetStartPriority(
|
||||
{
|
||||
if (J->Cred.Q != NULL)
|
||||
{
|
||||
SFactor[mpsFQ] = FSTargetUsage -
|
||||
(J->Cred.Q->F.FSUsage[0] + J->Cred.Q->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
if (MSched.PercentBasedFS == TRUE)
|
||||
{
|
||||
SFactor[mpsFQ] = 1.0 -
|
||||
(((J->Cred.Q->F.FSUsage[0] + J->Cred.Q->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0)/FSTargetUsage);
|
||||
}
|
||||
else
|
||||
{
|
||||
SFactor[mpsFQ] = FSTargetUsage -
|
||||
(J->Cred.Q->F.FSUsage[0] + J->Cred.Q->F.FSFactor) /
|
||||
(GP->F.FSUsage[0] + GP->F.FSFactor) * 100.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user