diff mbox

rtlwifi: ratelimit skb allocation failure message

Message ID 1423558471-27278-1-git-send-email-colin.king@canonical.com (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show

Commit Message

Colin King Feb. 10, 2015, 8:54 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

when running low on memory I noticed rtlwifi was producing a large
quantity of repeated skb allocation failures messages.  This should
be ratelimited to reduce the noise.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/rtlwifi/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Dumazet Feb. 10, 2015, 1:17 p.m. UTC | #1
On Tue, 2015-02-10 at 08:54 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> when running low on memory I noticed rtlwifi was producing a large
> quantity of repeated skb allocation failures messages.  This should
> be ratelimited to reduce the noise.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/wireless/rtlwifi/pci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
> index c70efb9..ca0fd50 100644
> --- a/drivers/net/wireless/rtlwifi/pci.c
> +++ b/drivers/net/wireless/rtlwifi/pci.c
> @@ -817,7 +817,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
>  		/* get a new skb - if fail, old one will be reused */
>  		new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
>  		if (unlikely(!new_skb)) {
> -			pr_err("Allocation of new skb failed in %s\n",
> +			pr_err_ratelimited("Allocation of new skb failed in %s\n",
>  			       __func__);

Or even better, remove the message.


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kalle Valo Feb. 10, 2015, 1:48 p.m. UTC | #2
Eric Dumazet <eric.dumazet@gmail.com> writes:

> On Tue, 2015-02-10 at 08:54 +0000, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>> 
>> when running low on memory I noticed rtlwifi was producing a large
>> quantity of repeated skb allocation failures messages.  This should
>> be ratelimited to reduce the noise.
>> 
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>  drivers/net/wireless/rtlwifi/pci.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
>> index c70efb9..ca0fd50 100644
>> --- a/drivers/net/wireless/rtlwifi/pci.c
>> +++ b/drivers/net/wireless/rtlwifi/pci.c
>> @@ -817,7 +817,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
>>  		/* get a new skb - if fail, old one will be reused */
>>  		new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
>>  		if (unlikely(!new_skb)) {
>> -			pr_err("Allocation of new skb failed in %s\n",
>> +			pr_err_ratelimited("Allocation of new skb failed in %s\n",
>>  			       __func__);
>
> Or even better, remove the message.

There's actually a pending patch for that, I'll send it to Dave ASAP:

https://patchwork.kernel.org/patch/5671121/
Colin King Feb. 10, 2015, 1:52 p.m. UTC | #3
On 10/02/15 13:48, Kalle Valo wrote:
> Eric Dumazet <eric.dumazet@gmail.com> writes:
> 
>> On Tue, 2015-02-10 at 08:54 +0000, Colin King wrote:
>>> From: Colin Ian King <colin.king@canonical.com>
>>>
>>> when running low on memory I noticed rtlwifi was producing a large
>>> quantity of repeated skb allocation failures messages.  This should
>>> be ratelimited to reduce the noise.
>>>
>>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>>> ---
>>>  drivers/net/wireless/rtlwifi/pci.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
>>> index c70efb9..ca0fd50 100644
>>> --- a/drivers/net/wireless/rtlwifi/pci.c
>>> +++ b/drivers/net/wireless/rtlwifi/pci.c
>>> @@ -817,7 +817,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
>>>  		/* get a new skb - if fail, old one will be reused */
>>>  		new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
>>>  		if (unlikely(!new_skb)) {
>>> -			pr_err("Allocation of new skb failed in %s\n",
>>> +			pr_err_ratelimited("Allocation of new skb failed in %s\n",
>>>  			       __func__);
>>
>> Or even better, remove the message.
> 
> There's actually a pending patch for that, I'll send it to Dave ASAP:
> 
> https://patchwork.kernel.org/patch/5671121/
> 
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index c70efb9..ca0fd50 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -817,7 +817,7 @@  static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
 		/* get a new skb - if fail, old one will be reused */
 		new_skb = dev_alloc_skb(rtlpci->rxbuffersize);
 		if (unlikely(!new_skb)) {
-			pr_err("Allocation of new skb failed in %s\n",
+			pr_err_ratelimited("Allocation of new skb failed in %s\n",
 			       __func__);
 			goto no_new;
 		}