[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0906171326120.4786@chino.kir.corp.google.com>
Date: Wed, 17 Jun 2009 13:33:25 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: "David S. Miller" <davem@...emloft.net>,
Justin Piszcz <jpiszcz@...idpixels.com>,
linux-kernel@...r.kernel.org
Subject: Re: [patch] ipv4: don't warn about skb ack allocation failures
On Wed, 17 Jun 2009, Eric Dumazet wrote:
> > ipv4: don't warn about skb ack allocation failures
> >
> > tcp_send_ack() will recover from alloc_skb() allocation failures, so avoid
> > emitting warnings.
> >
> > Signed-off-by: David Rientjes <rientjes@...gle.com>
> > ---
> > diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> > --- a/net/ipv4/tcp_output.c
> > +++ b/net/ipv4/tcp_output.c
> > @@ -2442,7 +2442,7 @@ void tcp_send_ack(struct sock *sk)
> > * tcp_transmit_skb() will set the ownership to this
> > * sock.
> > */
> > - buff = alloc_skb(MAX_TCP_HEADER, GFP_ATOMIC);
> > + buff = alloc_skb(MAX_TCP_HEADER, GFP_ATOMIC | __GFP_NOWARN);
> > if (buff == NULL) {
> > inet_csk_schedule_ack(sk);
> > inet_csk(sk)->icsk_ack.ato = TCP_ATO_MIN;
>
> I count more than 800 GFP_ATOMIC allocations in net/ tree.
>
> Most (if not all) of them can recover in case of failures.
>
> Should we add __GFP_NOWARN to all of them ?
>
Yes, if they are recoverable without any side effects. Otherwise, they
will continue to emit page allocation failure messages which cause users
to waste their time when they recognize a problem of an unknown
seriousness level in both reporting the issue and looking for resulting
corruption. The __GFP_NOWARN annotation suppresses such warnings for
those very reasons.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists