Ticket #1550: 0004-Enhmt-1550-sge_sort_pending_job_nodes-sge_sort_job_n.patch

File 0004-Enhmt-1550-sge_sort_pending_job_nodes-sge_sort_job_n.patch, 3.7 KB (added by markdixon, 4 years ago)

4/6

  • source/libs/sched/sgeee.c

    From 2edf51c488934858a502e9c9cc913a946faf555f Mon Sep 17 00:00:00 2001
    From: Mark Dixon <m.c.dixon@leeds.ac.uk>
    Date: Thu, 13 Aug 2015 09:35:12 +0100
    Subject: [PATCH 4/6] Enhmt #1550 sge_sort_pending_job_nodes -> sge_sort_job_nodes, added arg
    
    Renamed sge_sort_pending_job_nodes to sge_sort_job_nodes
    Added job reference structure to sge_sort_job_nodes argument list
    ---
     source/libs/sched/sgeee.c |   25 +++++++++++++------------
     1 files changed, 13 insertions(+), 12 deletions(-)
    
    diff --git a/source/libs/sched/sgeee.c b/source/libs/sched/sgeee.c
    index 02013c2..f692305 100644
    a b static int sge_calc_tickets (scheduler_all_data_t *lists, 
    174174                      double *max_tickets);
    175175
    176176static lListElem *get_mod_share_tree(lListElem *node, lEnumeration *what, int seqno);
    177 static lList *sge_sort_pending_job_nodes(lListElem *root, lListElem *node,
    178                            double total_share_tree_tickets);
     177static lList *sge_sort_job_nodes(lListElem *root, lListElem *node,
     178                      double total_share_tree_tickets, sge_ref_t *job_ref);
    179179static int sge_calc_node_targets(lListElem *root, lListElem *node, scheduler_all_data_t *lists);
    180180static int sge_calc_sharetree_targets(lListElem *root, scheduler_all_data_t *lists,
    181181                           lList *decay_list, u_long curr_time,
    sge_calc_tickets( scheduler_all_data_t *lists, 
    30293029            }
    30303030         }
    30313031
    3032          if ((sorted_job_node_list = sge_sort_pending_job_nodes(root, root, total_share_tree_tickets))) {
     3032         if ((sorted_job_node_list = sge_sort_job_nodes(root, root, total_share_tree_tickets, job_ref))) {
    30333033            lListElem *job_node;
    30343034
    30353035            /*
    sge_calc_tickets( scheduler_all_data_t *lists, 
    33953395}
    33963396
    33973397
    3398 /*--------------------------------------------------------------------
    3399  * sge_sort_pending_job_nodes - return a sorted list of pending job
    3400  * nodes with the pending priority set in STN_sort.
    3401  *--------------------------------------------------------------------*/
     3398/*---------------------------------------------------
     3399 * sge_sort_job_nodes - return a sorted list of job
     3400 * nodes with the priority set in STN_sort.
     3401 *---------------------------------------------------*/
    34023402
    34033403static lList *
    3404 sge_sort_pending_job_nodes(lListElem *root,
    3405                            lListElem *node,
    3406                            double total_share_tree_tickets)
     3404sge_sort_job_nodes(lListElem *root,
     3405                   lListElem *node,
     3406                   double total_share_tree_tickets,
     3407                   sge_ref_t *job_ref)
    34073408{
    34083409   /* Prune sparsely populated sharetree */
    34093410   /* Dispose of uppermost levels without pending jobs */
    sge_sort_pending_job_nodes(lListElem *root, 
    34313432       * - It has only one child object that contains pending jobs
    34323433       */
    34333434      if (active_nodes == 1 && temp_root)
    3434          return sge_sort_pending_job_nodes(temp_root, temp_root, total_share_tree_tickets);
     3435         return sge_sort_job_nodes(temp_root, temp_root, total_share_tree_tickets, job_ref);
    34353436   }
    34363437
    34373438   /* get the child job nodes in a single list */
    sge_sort_pending_job_nodes(lListElem *root, 
    34493450      } else if ((lGetUlong(child, STN_job_ref_count)-lGetUlong(child, STN_active_job_ref_count))>0) {
    34503451         lList *child_job_node_list;
    34513452         /* recursively get all the child job nodes onto our list */
    3452          if ((child_job_node_list = sge_sort_pending_job_nodes(root, child, total_share_tree_tickets))) {
     3453         if ((child_job_node_list = sge_sort_job_nodes(root, child, total_share_tree_tickets, job_ref))) {
    34533454            if (job_node_list == NULL)
    34543455               job_node_list = child_job_node_list;
    34553456            else