Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Anton Blanchard <anton@samba.org>
Cc: netdev@vger.kernel.org
Subject: Re: Warning in net/ipv4/af_inet.c:154
Date: Wed, 26 May 2010 07:18:35 +0200	[thread overview]
Message-ID: <1274851115.25136.7.camel@edumazet-laptop> (raw)
In-Reply-To: <20100526031943.GA28295@kryten>

Le mercredi 26 mai 2010 à 13:19 +1000, Anton Blanchard a écrit :
> Hi,
> 
> > > Which is:
> > > 
> > >         WARN_ON(sk->sk_forward_alloc);
> > > 
> > 
> > Yes, the infamous one :)
> > 
> > Is it reproductible ? What kind of workload is it ?
> > What is the NIC involved ?
> 
> It was running sysbench against a postgresql database over localhost. In
> each case I checked, sk_forward_alloc was less than one page.

ok. I am a bit surprised postgresql uses UDP

> 
> I notice we update sk_forward_alloc in sk_mem_charge and sk_mem_uncharge.
> Since it isn't an atomic variable I went looking for a lock somewhere in
> the call chain (first thought was the socket lock). I couldn't find
> anything, but I could easily be missing something.
> 

UDP path uses socket lock indeed to protect sk_forward_alloc non atomic
updates.

Check skb_free_datagram_locked() for example : sk_mem_reclaim_partial()
is called inside the lock_sock_bh/unlock_sock_bh protected section, and
*after* the uncharge done by skb_orphan(). This function was changed
recently, so maybe your platform hit some bug somewhere.

In receive path, we hold the socket lock while calling
sock_queue_rcv_skb()




  reply	other threads:[~2010-05-26  5:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 11:58 Warning in net/ipv4/af_inet.c:154 Anton Blanchard
2010-05-25 15:27 ` Eric Dumazet
2010-05-26  3:19   ` Anton Blanchard
2010-05-26  5:18     ` Eric Dumazet [this message]
2010-05-26  7:56     ` David Miller
2010-05-26 10:12       ` Eric Dumazet
2010-05-27  3:56         ` Anton Blanchard
2010-05-27  4:06           ` David Miller
2010-05-27  4:21             ` Eric Dumazet
2010-05-27  4:18           ` Eric Dumazet
2010-05-27  4:21             ` David Miller
2010-05-27  5:06               ` [PATCH] net: fix lock_sock_bh/unlock_sock_bh Eric Dumazet
2010-05-27  5:20                 ` Eric Dumazet
2010-05-27  5:23                   ` David Miller
2010-05-27  6:09                     ` Anton Blanchard
2010-05-27  7:29                       ` David Miller
2010-05-29  7:21         ` Warning in net/ipv4/af_inet.c:154 David Miller
2010-05-31 16:02           ` [PATCH] net: sock_queue_err_skb() dont mess with sk_forward_alloc Eric Dumazet
2010-06-01  6:44             ` 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=1274851115.25136.7.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=anton@samba.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: 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