aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_private.h
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2017-01-09 18:18:15 +0000
committerAlexander Motin <mav@FreeBSD.org>2017-01-09 18:18:15 +0000
commitbb8f9017b30a4631b323bc30e08aa97756c4094e (patch)
tree2020db09bc9e3a4045e64b66128e9125bb3514d1 /sys/cam/ctl/ctl_private.h
parentb8bf08b1fa2b230bbbc1b1d1ec68d27ad4e21b65 (diff)
downloadsrc-bb8f9017b30a4631b323bc30e08aa97756c4094e.tar.gz
src-bb8f9017b30a4631b323bc30e08aa97756c4094e.zip
Rewrite CTL statistics in more simple and scalable way.
Instead of collecting statistics for each combination of ports and logical units, that consumed ~45KB per LU with present number of ports, collect separate statistics for every port and every logical unit separately, that consume only 176 bytes per each single LU/port. This reduces struct ctl_lun size down to just 6KB. Also new IOCTL API/ABI does not hardcode number of LUs/ports, and should allow handling of very large quantities. MFC after: 2 weeks (probably keeping old API enabled for some time)
Notes
Notes: svn path=/head/; revision=311804
Diffstat (limited to 'sys/cam/ctl/ctl_private.h')
-rw-r--r--sys/cam/ctl/ctl_private.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h
index 5b71f9a0eff2..3f46769806b1 100644
--- a/sys/cam/ctl/ctl_private.h
+++ b/sys/cam/ctl/ctl_private.h
@@ -1,6 +1,6 @@
/*-
* Copyright (c) 2003, 2004, 2005, 2008 Silicon Graphics International Corp.
- * Copyright (c) 2014-2015 Alexander Motin <mav@FreeBSD.org>
+ * Copyright (c) 2014-2017 Alexander Motin <mav@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -404,7 +404,10 @@ struct ctl_lun {
struct callout ie_callout; /* INTERVAL TIMER */
struct ctl_mode_pages mode_pages;
struct ctl_log_pages log_pages;
- struct ctl_lun_io_stats stats;
+#ifdef CTL_LEGACY_STATS
+ struct ctl_lun_io_stats legacy_stats;
+#endif /* CTL_LEGACY_STATS */
+ struct ctl_io_stats stats;
uint32_t res_idx;
uint32_t pr_generation;
uint64_t *pr_keys[CTL_MAX_PORTS];