Use of spinlocks for TCP callouts

Vijay Singh vijju.singh at gmail.com
Tue Jan 3 04:35:32 UTC 2012


I have see the following call sequence in profiles:


                                  called/total       parents
index  %time    self descendents  called+self    name    	index
                                  called/total       children

                     0.02        1.14 3822699/7559737     tcp_do_segment
[154]    0.5    0.03        2.26 7559737                    callout_reset_on
                     2.19        0.02 7573352/94883048   spinlock_exit
                     0.01        0.04 7573352/11975031   callout_lock

It is my perception that spinlocks are expensive. Since general TCP
locks are sleep mutexes, would there be any merit in building a TCP
callout facility using sleep mutexes? I can hack something up and
share here but wanted to check if people know of an existing facility
that might be used here?

-vijay


More information about the freebsd-net mailing list