Skip to content
Snippets Groups Projects
Commit 9281c57c authored by Chad Vizino's avatar Chad Vizino Committed by Alejandro Sanchez
Browse files

jobacct_gather/common - scale Pss to bytes before comparing with Rss.

Otherwise, when UsePss was set in JobAcctGatherParams, pss was still
holding the parsed value in kilobyes when compared to
prec->tres_data[TRES_ARRAY_MEM].size_read which holds rss in bytes.

Bug 8771
parent ee38c19a
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ documents those changes that are of interest to users and administrators.
were not counted against the job's memory allocation on some nodes.
-- Fix issue with select/cons_tres and the partition limit MaxCpusPerNode where
the limit was enforced for one less CPU than the configured value.
-- jobacct_gather/common - compare Pss to Rss after scaling Pss to Rss units.
 
* Changes in Slurm 21.08.3
==========================
......
......@@ -189,9 +189,10 @@ static int _get_pss(char *proc_smaps_file, jag_prec_t *prec)
fclose(fp);
/* Sanity checks */
if (pss > 0 && prec->tres_data[TRES_ARRAY_MEM].size_read > pss) {
if (pss > 0) {
pss *= 1024; /* Scale KB to B */
prec->tres_data[TRES_ARRAY_MEM].size_read = pss;
if (prec->tres_data[TRES_ARRAY_MEM].size_read > pss)
prec->tres_data[TRES_ARRAY_MEM].size_read = pss;
}
log_flag(JAG, "%s read pss %"PRIu64" for process %s",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment