Skip to content

0.30.3 #126

Merged
merged 16 commits into from
Mar 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mxqd_control: Add new users at tail of user list
We are going to rely on the stability of the user list as a secondary
preference criteria to the number of jobs running in the cluster.

Put new user at the end of the user list so they start behind other
waiting users and will stay behing them if the main crtieria
(running_global_slot_count) is equal (e.g. zero).
  • Loading branch information
donald committed Mar 20, 2022
commit cf985929853ddf44c2b1263f8fc0d088b04434f6
7 changes: 5 additions & 2 deletions mxqd_control.c
Original file line number Diff line number Diff line change
@@ -435,8 +435,11 @@ struct mxq_group_list *_server_add_group(struct mxq_server *server, struct mxq_g

ulist->server = server;

ulist->next = server->users;
server->users = ulist;
/* add new user at tail, so longer waiting users are preferred */
struct mxq_user_list **lastptr = &server->users;
while (*lastptr)
lastptr = &(*lastptr)->next;
*lastptr = ulist;

server->user_cnt++;