linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 22/36] iwlwifi: mvm: add some debugging to quota allocation
Date: Wed,  3 Sep 2014 22:56:10 +0300	[thread overview]
Message-ID: <1409774184-24665-22-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <540771E5.6080908@gmail.com>

From: Johannes Berg <johannes.berg@intel.com>

In order to follow more easily what's going on, add some
debug statements to the quota allocation algorithm.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-debug.h |  2 ++
 drivers/net/wireless/iwlwifi/mvm/quota.c | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
index 2950835..0a70bcd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debug.h
+++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
@@ -145,6 +145,7 @@ do {                                            			\
 #define IWL_DL_HCMD		0x00000004
 #define IWL_DL_STATE		0x00000008
 /* 0x000000F0 - 0x00000010 */
+#define IWL_DL_QUOTA		0x00000010
 #define IWL_DL_TE		0x00000020
 #define IWL_DL_EEPROM		0x00000040
 #define IWL_DL_RADIO		0x00000080
@@ -189,6 +190,7 @@ do {                                            			\
 #define IWL_DEBUG_LED(p, f, a...)	IWL_DEBUG(p, IWL_DL_LED, f, ## a)
 #define IWL_DEBUG_WEP(p, f, a...)	IWL_DEBUG(p, IWL_DL_WEP, f, ## a)
 #define IWL_DEBUG_HC(p, f, a...)	IWL_DEBUG(p, IWL_DL_HCMD, f, ## a)
+#define IWL_DEBUG_QUOTA(p, f, a...)	IWL_DEBUG(p, IWL_DL_QUOTA, f, ## a)
 #define IWL_DEBUG_TE(p, f, a...)	IWL_DEBUG(p, IWL_DL_TE, f, ## a)
 #define IWL_DEBUG_EEPROM(d, f, a...)	IWL_DEBUG_DEV(d, IWL_DL_EEPROM, f, ## a)
 #define IWL_DEBUG_CALIB(p, f, a...)	IWL_DEBUG(p, IWL_DL_CALIB, f, ## a)
diff --git a/drivers/net/wireless/iwlwifi/mvm/quota.c b/drivers/net/wireless/iwlwifi/mvm/quota.c
index 4e20b3c..300639c 100644
--- a/drivers/net/wireless/iwlwifi/mvm/quota.c
+++ b/drivers/net/wireless/iwlwifi/mvm/quota.c
@@ -161,6 +161,9 @@ static void iwl_mvm_adjust_quota_for_noa(struct iwl_mvm *mvm,
 		quota *= (beacon_int - mvm->noa_duration);
 		quota /= beacon_int;
 
+		IWL_DEBUG_QUOTA(mvm, "quota: adjust for NoA from %d to %d\n",
+				le32_to_cpu(cmd->quotas[i].quota), quota);
+
 		cmd->quotas[i].quota = cpu_to_le32(quota);
 	}
 #endif
@@ -222,6 +225,9 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm,
 		quota = (QUOTA_100 - QUOTA_LOWLAT_MIN) / n_non_lowlat;
 		quota_rem = QUOTA_100 - n_non_lowlat * quota -
 			    QUOTA_LOWLAT_MIN;
+		IWL_DEBUG_QUOTA(mvm,
+				"quota: low-latency binding active, remaining quota per other binding: %d\n",
+				quota);
 	} else if (num_active_macs) {
 		/*
 		 * There are 0 or more than 1 low latency bindings, or all the
@@ -230,6 +236,9 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm,
 		 */
 		quota = QUOTA_100 / num_active_macs;
 		quota_rem = QUOTA_100 % num_active_macs;
+		IWL_DEBUG_QUOTA(mvm,
+				"quota: splitting evenly per binding: %d\n",
+				quota);
 	} else {
 		/* values don't really matter - won't be used */
 		quota = 0;
@@ -271,6 +280,9 @@ int iwl_mvm_update_quotas(struct iwl_mvm *mvm,
 	for (i = 0; i < MAX_BINDINGS; i++) {
 		if (le32_to_cpu(cmd.quotas[i].quota) != 0) {
 			le32_add_cpu(&cmd.quotas[i].quota, quota_rem);
+			IWL_DEBUG_QUOTA(mvm,
+					"quota: giving remainder of %d to binding %d\n",
+					quota_rem, i);
 			break;
 		}
 	}
-- 
1.9.1


  parent reply	other threads:[~2014-09-03 19:57 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 19:54 pull request: iwlwifi-next 2014-09-03 Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 01/36] iwlwifi: mvm: Add set NIC temperature debug option Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 02/36] iwlwifi: mvm: reduce the AMPDU size in low latency mode Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 03/36] iwlwifi: mvm: use dynamic SMPS for P2P Client Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 04/36] iwlwifi: mvm: add use_ps-poll debugfs power option Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 05/36] iwlwifi: mvm: force protection for P2P Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 06/36] iwlwifi: mvm: reset the temperature when temperature test is disabled Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 07/36] iwlwifi: mvm: don't run automatic checks if CT was caused by debugfs Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 08/36] iwlwifi: mvm: Add marker command 0xcb Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 09/36] iwlwifi: mvm: fix the dump_umac_error_log Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 10/36] iwlwifi: make U-APSD default configurable at compile time Emmanuel Grumbach
2014-09-03 19:55 ` [PATCH 11/36] iwlwifi: mvm: add debugfs entry for ps_disabled Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 12/36] iwlwifi: mvm: disable tx aggregation on low latency vifs Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 13/36] iwlwifi: mvm: clear d0i3 state on recovery Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 14/36] iwlwifi: mvm: re-enable ps when monitor interfaces are removed Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 15/36] iwlwifi: mvm: refactor iwl_mvm_power_set_pm() to spin the ps part off Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 16/36] iwlwifi: mvm: add function to update only ps Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 17/36] iwlwifi: mvm: add option that allows a vif to disable PS Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 18/36] iwlwifi: mvm: wait for TE notif when protecting TDLS session Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 19/36] iwlwifi: consolidate hw scheduler configuration code Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 20/36] iwlwifi: trans: refactor txq_enable arguments Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 21/36] iwlwifi: mvm: enable passive fragmented scan changes Emmanuel Grumbach
2014-09-03 19:56 ` Emmanuel Grumbach [this message]
2014-09-03 19:56 ` [PATCH 23/36] iwlwifi: don't export tracepoints unnecessarily Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 24/36] iwlwifi: mvm: fix comment typo Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 25/36] iwlwifi: trans: allow skipping scheduler hardware config Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 26/36] iwlwifi: trans: make aggregation explicit for TX queue handling Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 27/36] iwlwifi: trans: configure the scheduler enable register Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 28/36] iwlwifi: add Intel Mobile Communications copyright Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 29/36] iwlwifi: mvm: set the TX disable bit when doing a chanctx switch Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 30/36] iwlwifi: mvm: correct firmware disassoc command sequence Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 31/36] iwlwifi: mvm: clean up FIFO definitions Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 32/36] iwlwifi: mvm: clarify stop_count, remove transport_stopped Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 33/36] iwlwifi: mvm: use tdls indication from mac80211 Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 34/36] iwlwifi: mvm: use iwl_mvm_mac_get_queues_mask() more Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 35/36] iwlwifi: mvm: clean up broadcast station handling Emmanuel Grumbach
2014-09-03 19:56 ` [PATCH 36/36] iwlwifi: mvm: clean up AUX " Emmanuel Grumbach
2014-09-04 18:05 ` pull request: iwlwifi-next 2014-09-03 John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409774184-24665-22-git-send-email-egrumbach@gmail.com \
    --to=egrumbach@gmail.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).