]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix mgr:info report 'Largest file desc currently in use' with SMP
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Jul 2013 03:42:06 +0000 (21:42 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Jul 2013 03:42:06 +0000 (21:42 -0600)
The biggest FD in use should not be the sum of biggest FD in each worker,
but the maximum across all workers.

src/mgr/InfoAction.cc

index 09fb699df0e61af2c7fd32d549b52335f3abf297..dc9e6c1df184d4fea6d1e7008f596ba9feb26bca 100644 (file)
@@ -115,7 +115,7 @@ Mgr::InfoActionData::operator += (const InfoActionData& stats)
     gb_saved_count += stats.gb_saved_count;
     gb_freed_count += stats.gb_freed_count;
     max_fd += stats.max_fd;
-    biggest_fd += stats.biggest_fd;
+    biggest_fd = max(biggest_fd, stats.biggest_fd);
     number_fd += stats.number_fd;
     opening_fd += stats.opening_fd;
     num_fd_free += stats.num_fd_free;