From: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
To: sathya.perla@broadcom.com, ajit.khaparde@broadcom.com,
padmanabh.ratnakar@broadcom.com,
sriharsha.basavapatna@broadcom.com, somnath.kotur@broadcom.com
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 2/2] be2net: query temperature on probe and decrease its frequency on be_worker()
Date: Fri, 22 Jul 2016 22:29:55 -0300 [thread overview]
Message-ID: <1469237395-11501-2-git-send-email-gpiccoli@linux.vnet.ibm.com> (raw)
In-Reply-To: <1469237395-11501-1-git-send-email-gpiccoli@linux.vnet.ibm.com>
Currently the be2net driver queries the temperature from fw in regular
intervals on be_worker(), which is a delayed work procedure that
reschedules itself to run in next second. The interval for temperature
query is currently set to 64, meaning at each 64 seconds the query will
happen on be_worker().
This patch adds a temperature fw query on be_probe() and increase the
current query timeout of 64 to 128, lowering the frequency of the
temperature fw queries in be_worker() by half. In our experiments, the
probing time got increased by 8.7% (from 11.62s to 12.63s) for a
4-function Lancer adapter (PCI Vid:Did == 10df:e220).
This aims to solve the problem of userspace temperature request right after
be2net probing shows inconsistent values because be_worker() didn't perform
the first temperature query yet. Besides, this patch aims to reduce the
overhead of querying fw each minute for temperature information.
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 9f44a00..0e23ab2 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5232,7 +5232,7 @@ static int be_drv_init(struct be_adapter *adapter)
adapter->tx_fc = true;
/* Must be a power of 2 or else MODULO will BUG_ON */
- adapter->be_get_temp_freq = 64;
+ adapter->be_get_temp_freq = 128;
return 0;
@@ -5445,6 +5445,7 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
adapter,
be_hwmon_groups);
adapter->hwmon_info.be_on_die_temp = BE_INVALID_DIE_TEMP;
+ be_cmd_get_die_temperature(adapter);
}
dev_info(&pdev->dev, "%s: %s %s port %c\n", nic_name(pdev),
--
2.1.0
next prev parent reply other threads:[~2016-07-23 1:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-23 1:29 [PATCH net-next 1/2] be2net: set temperature value for all adapter's functions Guilherme G. Piccoli
2016-07-23 1:29 ` Guilherme G. Piccoli [this message]
2016-07-25 10:48 ` Sathya Perla
2016-07-25 12:53 ` Guilherme G. Piccoli
2016-07-26 8:26 ` Sathya Perla
2016-07-26 20:31 ` Guilherme G. Piccoli
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=1469237395-11501-2-git-send-email-gpiccoli@linux.vnet.ibm.com \
--to=gpiccoli@linux.vnet.ibm.com \
--cc=ajit.khaparde@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=padmanabh.ratnakar@broadcom.com \
--cc=sathya.perla@broadcom.com \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.com \
/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).