From: Igor Russkikh <Igor.Russkikh@aquantia.com> To: Andrew Lunn <andrew@lunn.ch> Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "davem@davemloft.net" <davem@davemloft.net>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, Dmitry Bezrukov <Dmitry.Bezrukov@aquantia.com> Subject: Re: [PATCH net 2/2] net: usb: aqc111: Support for thermal throttling feature Date: Wed, 12 Dec 2018 19:34:00 +0000 [thread overview] Message-ID: <5d4ff54b-5920-7da9-9c02-e4bd41eae66a@aquantia.com> (raw) In-Reply-To: <20181212160811.GF1549@lunn.ch> Hi Andrew, >> When the PHY's temparature is back to normal (low threshold, it is >> 85 degrees) it restores user/default link speed settings. > > Hi Igor > > Please could you also export the temperature using HWMON. The Marvell > PHY drivers are good examples. > > I also have a patch for driver/net/phy/aquantia.c which adds HWMON > support to that PHY. We actually have almost ready patches to submit hwmon support separately for both AQC USB and AQC PCI MAC drivers. Will do that in near time. >> + if (aqc111_data->thermal_throttling) >> + speed = SPEED_100; >> + > > That is a big jump. Do you need to cool is down quickly, or would > 1Gbps be sufficient? I think as a user, i would prefer it ping-pongs > between 5G and 1G, not 5G and 100M. In case overheat happens that really means something bad is happening outside, or heatsink is bad/detached. I'll consult our HW team once again, but 100M was the original request from our phy/hw team. It seems it really much less on power and 1G may not be enough. > >> if (autoneg == AUTONEG_ENABLE) { >> switch (speed) { >> case SPEED_5000: > > It looks like this only works when auto-neg is enabled. If i've fixed > configured it i don't think this works? Looks you are right, will check this. >> + if (aqc111_data->thermal_throttling && >> + temperature <= AQ_NORMAL_TEMP_THRESHOLD) { >> + netdev_info(dev->net, "The temperature is back to normal(%u)", >> + AQ_NORMAL_TEMP_THRESHOLD / 100); > > How often do you see these messages? I'm wondering if they need to be > rate limited? In worst case that will be at least limited by link down/up internal, which in case of 5G normally takes 3-5secs. >> + if (!aqc111_data->thermal_throttling && >> + temperature >= AQ_CRITICAL_TEMP_THRESHOLD) { > > Should there be some hysteresis in here? In fact, if temperature is > AQ_CRITICAL_TEMP_THRESHOLD it is both back to normal, and throttled at > the same time! NORMAL_TEMP and CRITICAL_TEMP values are actually a hysteresis. In cool down case only after TEMP_NORMAL temperature link will be flipped back again. > >> + netdev_warn(dev->net, "Critical temperature(%u) is reached", >> + AQ_CRITICAL_TEMP_THRESHOLD / 100); >> + aqc111_data->thermal_throttling = 1; >> + reset_speed = 1; > > update_speed might be a better name, since you are not always > resetting it. Agreed. Regards, Igor
WARNING: multiple messages have this Message-ID (diff)
From: Igor Russkikh <igor.russkikh@aquantia.com> To: Andrew Lunn <andrew@lunn.ch> Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "davem@davemloft.net" <davem@davemloft.net>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, Dmitry Bezrukov <Dmitry.Bezrukov@aquantia.com> Subject: [net,2/2] net: usb: aqc111: Support for thermal throttling feature Date: Wed, 12 Dec 2018 19:34:00 +0000 [thread overview] Message-ID: <5d4ff54b-5920-7da9-9c02-e4bd41eae66a@aquantia.com> (raw) Hi Andrew, >> When the PHY's temparature is back to normal (low threshold, it is >> 85 degrees) it restores user/default link speed settings. > > Hi Igor > > Please could you also export the temperature using HWMON. The Marvell > PHY drivers are good examples. > > I also have a patch for driver/net/phy/aquantia.c which adds HWMON > support to that PHY. We actually have almost ready patches to submit hwmon support separately for both AQC USB and AQC PCI MAC drivers. Will do that in near time. >> + if (aqc111_data->thermal_throttling) >> + speed = SPEED_100; >> + > > That is a big jump. Do you need to cool is down quickly, or would > 1Gbps be sufficient? I think as a user, i would prefer it ping-pongs > between 5G and 1G, not 5G and 100M. In case overheat happens that really means something bad is happening outside, or heatsink is bad/detached. I'll consult our HW team once again, but 100M was the original request from our phy/hw team. It seems it really much less on power and 1G may not be enough. > >> if (autoneg == AUTONEG_ENABLE) { >> switch (speed) { >> case SPEED_5000: > > It looks like this only works when auto-neg is enabled. If i've fixed > configured it i don't think this works? Looks you are right, will check this. >> + if (aqc111_data->thermal_throttling && >> + temperature <= AQ_NORMAL_TEMP_THRESHOLD) { >> + netdev_info(dev->net, "The temperature is back to normal(%u)", >> + AQ_NORMAL_TEMP_THRESHOLD / 100); > > How often do you see these messages? I'm wondering if they need to be > rate limited? In worst case that will be at least limited by link down/up internal, which in case of 5G normally takes 3-5secs. >> + if (!aqc111_data->thermal_throttling && >> + temperature >= AQ_CRITICAL_TEMP_THRESHOLD) { > > Should there be some hysteresis in here? In fact, if temperature is > AQ_CRITICAL_TEMP_THRESHOLD it is both back to normal, and throttled at > the same time! NORMAL_TEMP and CRITICAL_TEMP values are actually a hysteresis. In cool down case only after TEMP_NORMAL temperature link will be flipped back again. > >> + netdev_warn(dev->net, "Critical temperature(%u) is reached", >> + AQ_CRITICAL_TEMP_THRESHOLD / 100); >> + aqc111_data->thermal_throttling = 1; >> + reset_speed = 1; > > update_speed might be a better name, since you are not always > resetting it. Agreed. Regards, Igor
next prev parent reply other threads:[~2018-12-12 19:34 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-12 13:50 [PATCH net 0/2] aqc111: Thermal throttling feature Igor Russkikh 2018-12-12 13:50 ` [PATCH net 1/2] net: usb: aqc111: Add read_mdio operation Igor Russkikh 2018-12-12 13:50 ` [net,1/2] " Igor Russkikh 2018-12-12 16:11 ` [PATCH net 1/2] " Andrew Lunn 2018-12-12 16:11 ` [net,1/2] " Andrew Lunn 2018-12-12 19:38 ` [PATCH net 1/2] " Igor Russkikh 2018-12-12 19:38 ` [net,1/2] " Igor Russkikh 2018-12-12 13:50 ` [PATCH net 2/2] net: usb: aqc111: Support for thermal throttling feature Igor Russkikh 2018-12-12 13:50 ` [net,2/2] " Igor Russkikh 2018-12-12 16:08 ` [PATCH net 2/2] " Andrew Lunn 2018-12-12 16:08 ` [net,2/2] " Andrew Lunn 2018-12-12 19:34 ` Igor Russkikh [this message] 2018-12-12 19:34 ` Igor Russkikh 2018-12-12 20:28 ` [PATCH net 2/2] " Andrew Lunn 2018-12-12 20:28 ` [net,2/2] " Andrew Lunn 2018-12-12 13:54 ` [PATCH net 0/2] aqc111: Thermal " Igor Russkikh 2018-12-12 18:15 ` Florian Fainelli 2018-12-12 20:08 ` Igor Russkikh 2018-12-12 20:28 ` Florian Fainelli 2018-12-12 20:38 ` Andrew Lunn 2018-12-13 0:43 ` David Miller 2018-12-14 11:43 ` Igor Russkikh 2018-12-13 0:18 ` David Miller
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=5d4ff54b-5920-7da9-9c02-e4bd41eae66a@aquantia.com \ --to=igor.russkikh@aquantia.com \ --cc=Dmitry.Bezrukov@aquantia.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=linux-usb@vger.kernel.org \ --cc=netdev@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.