Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238627

Re: Soft lockup issue in Linux 4.1.9

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: Soft lockup issue in Linux 4.1.9
Date 2015-10-02 23:40 +0200
Message-ID <qfgdA-78j-3@gated-at.bofh.it> (permalink)
References (3 earlier) <qeKx5-2WG-27@gated-at.bofh.it> <qeKGL-383-33@gated-at.bofh.it> <qfeOu-5fB-7@gated-at.bofh.it> <qffAS-6a6-17@gated-at.bofh.it> <qffKx-6Av-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2015-10-02 at 23:04 +0200, Thomas Gleixner wrote:
> On Fri, 2 Oct 2015, Eric Dumazet wrote:
> > On Fri, 2015-10-02 at 22:04 +0200, Thomas Gleixner wrote:
> > 
> > > What makes sure, that the timer cannot be readded while that timer
> > > callback is running?
> > 
> > What is exactly your question ?
> 
> CPU0   	  	       		CPU1
> 
> timer expires
>   callback
> 				add timer
>   timer_pending() == true
>   ===> del_timer_sync()
> 
> I was just curious how this is prevented as I got lost in the
> networking code as usual :)

Sure ;)

I believe this can not happen for following reasons :

mod_timer_pinned() is used only when req is created, while timer cannot
possibly be running on the same req. The _pinned part is critical
because we set the req->refcnt _after_ starting the timer,
to avoid being visible and caught from rcu lookups in hash tables.

Then, timer might be modified only by mod_timer_pending() from
tcp_check_req() : This should not re-start timer if another cpu is in
the timer callback.

Thanks



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Soft lockup issue in Linux 4.1.9 Holger Hoffstätte   <holger.hoffstaette@googlemail.com> - 2015-10-01 13:50 +0200
  Re: Soft lockup issue in Linux 4.1.9 Eric Dumazet <edumazet@google.com> - 2015-10-01 14:00 +0200
    Re: Soft lockup issue in Linux 4.1.9 Andre Tomt <andre@tomt.net> - 2015-10-02 09:00 +0200
      Re: Soft lockup issue in Linux 4.1.9 Holger Hoffstätte   <holger.hoffstaette@googlemail.com> - 2015-10-02 09:20 +0200
        Re: Soft lockup issue in Linux 4.1.9 Wolfgang Walter <linux@stwm.de> - 2015-10-02 21:30 +0200
        Re: Soft lockup issue in Linux 4.1.9 "Thomas D." <whissi@whissi.de> - 2015-10-03 21:30 +0200
    Re: Soft lockup issue in Linux 4.1.9 Thomas Gleixner <tglx@linutronix.de> - 2015-10-02 22:10 +0200
      Re: Soft lockup issue in Linux 4.1.9 Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-02 23:00 +0200
        Re: Soft lockup issue in Linux 4.1.9 Thomas Gleixner <tglx@linutronix.de> - 2015-10-02 23:10 +0200
          Re: Soft lockup issue in Linux 4.1.9 Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-02 23:40 +0200

csiph-web