]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
gpu_sysman: fix initial min memory check value
authorEero Tamminen <eero.t.tamminen@intel.com>
Wed, 5 Jul 2023 14:00:34 +0000 (17:00 +0300)
committerMatthias Runge <mrunge@matthias-runge.de>
Sun, 27 Aug 2023 19:03:51 +0000 (21:03 +0200)
High end GPUs can have more memory than earlier initial dummy value.

Reported-by: Valtteri Rantala <valtteri.rantala@intel.com>
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
src/gpu_sysman.c

index 9b0fa76fd043fa1376069357d3f0cfc6dc3754da..dc9a43df0782f39242bfffe1893bef480da72870 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * collectd - src/gpu_sysman.c
  *
- * Copyright(c) 2020-2022 Intel Corporation. All rights reserved.
+ * Copyright(c) 2020-2023 Intel Corporation. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -1163,7 +1163,7 @@ static bool gpu_mems(gpu_device_t *gpu, unsigned int cache_idx) {
       /* find min & max values for memory free from
        * (the configured number of) samples
        */
-      uint64_t free_min = (uint64_t)1024 * 1024 * 1024 * 1024;
+      uint64_t free_min = (uint64_t)0xffffffff;
       uint64_t free_max = 0, mem_free;
       for (uint32_t j = 0; j < config.samples; j++) {
         mem_free = gpu->memory[j][i].free;