Skip to content

Commit

Permalink
More Intel Architecture codes. Timeout for Labee module
Browse files Browse the repository at this point in the history
  • Loading branch information
Alcpz committed Sep 20, 2018
1 parent dac5d20 commit 56cc18f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/driver-labee.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#include "error.h"
#include "timer.h"

// CURL Options
#define CURLOPT_DEFAULT_TIMEOUT_MS 500L

// Confuse CFG options
#define LABEE_HOSTNAME_CFG "hostname"
#define LABEE_NODELIST_FILENAME_CFG "nodelist_file"
Expand Down Expand Up @@ -109,6 +112,7 @@ static enum emlError get_xml(struct xml_content * xc) {
curl_easy_setopt(curl, CURLOPT_URL, labee_api_url);
curl_easy_setopt(curl, CURLOPT_USERNAME, api_user);
curl_easy_setopt(curl, CURLOPT_PASSWORD, api_passwd);
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, CURLOPT_DEFAULT_TIMEOUT_MS);

struct curl_slist * list = 0;
list = curl_slist_append(list, "Content-type: application/xml");
Expand Down
18 changes: 18 additions & 0 deletions src/driver-rapl.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ static int is_cpu_model_supported(int model) {
CPU_HASWELL_2 = 69,
CPU_HASWELL_3 = 70,
CPU_HASWELL_EP = 63,
CPU_BROADWELL_1 = 61,
CPU_BROADWELL_2 = 71,
CPU_BROADWELL_EP = 79,
CPU_BROADWELL_DE = 86,
CPU_SKYLAKE_1 = 78,
CPU_SKYLAKE_2 = 94,
CPU_SKYLAKE_3 = 85,
CPU_KABYLAKE_1 = 142,
CPU_KABYLAKE_2 = 158,
};

switch(model) {
Expand All @@ -168,6 +177,15 @@ static int is_cpu_model_supported(int model) {
case CPU_HASWELL_2:
case CPU_HASWELL_3:
case CPU_HASWELL_EP:
case CPU_BROADWELL_1:
case CPU_BROADWELL_2:
case CPU_BROADWELL_EP:
case CPU_BROADWELL_DE:
case CPU_SKYLAKE_1:
case CPU_SKYLAKE_2:
case CPU_SKYLAKE_3:
case CPU_KABYLAKE_1:
case CPU_KABYLAKE_2:
return 1;
default:
return 0;
Expand Down

0 comments on commit 56cc18f

Please sign in to comment.