Re: svn commit: r304218 - head/sys/netinet

2017-01-13 Thread Julien Charbon
Hi, On 8/16/16 3:21 PM, Randall Stewart via svn-src-all wrote: > > In theory it *could* be MFC’d to stable-10 and 11 but I am not sure we want > to do that. I am > told by Drew that it does improve performance since in stable-10 you are > getting the INFO_WLOCK() > but I am not sure if folks

Re: svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Slawa Olhovchenkov
On Tue, Aug 16, 2016 at 06:21:14AM -0700, Randall Stewart via svn-src-all wrote: > > In theory it *could* be MFC’d to stable-10 and 11 but I am not sure we want > to do that. I am > told by Drew that it does improve performance since in stable-10 you are > getting the INFO_WLOCK() > but I am

Re: svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Randall Stewart via svn-src-head
In theory it *could* be MFC’d to stable-10 and 11 but I am not sure we want to do that. I am told by Drew that it does improve performance since in stable-10 you are getting the INFO_WLOCK() but I am not sure if folks want it MFC’d… One thing that this code leads us towards is we *in theory*

Re: svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Slawa Olhovchenkov
On Tue, Aug 16, 2016 at 12:40:56PM +, Randall Stewart wrote: > Author: rrs > Date: Tue Aug 16 12:40:56 2016 > New Revision: 304218 > URL: https://svnweb.freebsd.org/changeset/base/304218 > > Log: > This cleans up the timer code in TCP and also makes it so we do not > take the INFO lock

Re: svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Randall Stewart via svn-src-head
Hans: Take a look at the comments maybe they will help you understand whats going on. The idea of it is that you *only* need the INFO_RLOCK when the timer function wants to destroy the tcb (not all timers do this).. and yes usually the timer function is going to call the drop/close path to

Re: svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Hans Petter Selasky
On 08/16/16 15:01, Randall Stewart wrote: Sure Let me add some comments for you. The idea her is that you pick-up a reference to the PCB.. so it can’t be removed. Thus when you re-lock the INP you check the dropped flag (just in case someone did get in). And this code is only used before

Re: svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Randall Stewart via svn-src-head
Sure Let me add some comments for you. The idea her is that you pick-up a reference to the PCB.. so it can’t be removed. Thus when you re-lock the INP you check the dropped flag (just in case someone did get in). Let me get that in comments.. (note thats also why when using this function you

Re: svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Hans Petter Selasky
On 08/16/16 14:40, Randall Stewart wrote: +int +tcp_inpinfo_lock_add(struct inpcb *inp) +{ + in_pcbref(inp); + INP_WUNLOCK(inp); + INP_INFO_RLOCK(_tcbinfo); + INP_WLOCK(inp); + if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + return(1); + }

svn commit: r304218 - head/sys/netinet

2016-08-16 Thread Randall Stewart
Author: rrs Date: Tue Aug 16 12:40:56 2016 New Revision: 304218 URL: https://svnweb.freebsd.org/changeset/base/304218 Log: This cleans up the timer code in TCP and also makes it so we do not take the INFO lock *unless* we are really going to delete the TCB. Differential Revision: