From: Eero Tamminen Date: Wed, 5 Jul 2023 14:00:34 +0000 (+0300) Subject: gpu_sysman: fix initial min memory check value X-Git-Tag: 6.0.0-rc0~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efcd734c7d3adfb8e6ff4201d2e116e4a3ac9837;p=thirdparty%2Fcollectd.git gpu_sysman: fix initial min memory check value High end GPUs can have more memory than earlier initial dummy value. Reported-by: Valtteri Rantala Signed-off-by: Eero Tamminen --- diff --git a/src/gpu_sysman.c b/src/gpu_sysman.c index 9b0fa76fd..dc9a43df0 100644 --- a/src/gpu_sysman.c +++ b/src/gpu_sysman.c @@ -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;