[vz7] drivers/net/ixgbe: Suppress warnings on page allocation failure.

Submitted by Oleg Babin on March 12, 2018, 6 p.m.

Details

Message ID 1520877625-16719-1-git-send-email-obabin@virtuozzo.com
State New
Series "drivers/net/ixgbe: Suppress warnings on page allocation failure."
Headers show

Commit Message

Oleg Babin March 12, 2018, 6 p.m.
The ixgbe driver can produce a lot of page allocation warnings to dmesg
during IRQ servicing. These warnings can slow down a whole system while
not being very usefull as the user can obtain the same information from
the driver's stats counter 'alloc_rx_buff_failed' using ethtool.

Suppress this warnings using __GFP_NOWARN flag.

https://jira.sw.ru/browse/PSBM-82315
Signed-off-by: Oleg Babin <obabin@virtuozzo.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 0afaf44..0b235d1 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -2031,8 +2031,9 @@  static struct sk_buff *ixgbe_fetch_rx_buffer(struct ixgbe_ring *rx_ring,
 #endif
 
 		/* allocate a skb to store the frags */
-		skb = napi_alloc_skb(&rx_ring->q_vector->napi,
-				     IXGBE_RX_HDR_SIZE);
+		skb = __napi_alloc_skb(&rx_ring->q_vector->napi,
+				       IXGBE_RX_HDR_SIZE,
+				       GFP_ATOMIC | __GFP_NOWARN);
 		if (unlikely(!skb)) {
 			rx_ring->rx_stats.alloc_rx_buff_failed++;
 			return NULL;

Comments

Kirill Tkhai March 13, 2018, 9:35 a.m.
On 12.03.2018 21:00, Oleg Babin wrote:
> The ixgbe driver can produce a lot of page allocation warnings to dmesg
> during IRQ servicing. These warnings can slow down a whole system while
> not being very usefull as the user can obtain the same information from
> the driver's stats counter 'alloc_rx_buff_failed' using ethtool.
> 
> Suppress this warnings using __GFP_NOWARN flag.
> 
> https://jira.sw.ru/browse/PSBM-82315
> Signed-off-by: Oleg Babin <obabin@virtuozzo.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 0afaf44..0b235d1 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -2031,8 +2031,9 @@ static struct sk_buff *ixgbe_fetch_rx_buffer(struct ixgbe_ring *rx_ring,
>  #endif
>  
>  		/* allocate a skb to store the frags */
> -		skb = napi_alloc_skb(&rx_ring->q_vector->napi,
> -				     IXGBE_RX_HDR_SIZE);
> +		skb = __napi_alloc_skb(&rx_ring->q_vector->napi,
> +				       IXGBE_RX_HDR_SIZE,
> +				       GFP_ATOMIC | __GFP_NOWARN);

Oleg, could we add this flag to napi_alloc_skb() instead, to make all network drivers not warn
in such situations?

>  		if (unlikely(!skb)) {
>  			rx_ring->rx_stats.alloc_rx_buff_failed++;
>  			return NULL;
> 

Kirill