lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1431795011.27831.122.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Sat, 16 May 2015 09:50:11 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...hat.com>
Cc:	herbert@...dor.apana.org.au, tgraf@...g.ch, netdev@...r.kernel.org,
	ying.xue@...driver.com
Subject: Re: netlink: Kill bogus lock_sock in netlink_insert

On Fri, 2015-05-15 at 11:01 -0700, Eric Dumazet wrote:
> On Fri, 2015-05-15 at 12:49 -0400, David Miller wrote:
> > From: Herbert Xu <herbert@...dor.apana.org.au>
> > Date: Thu, 14 May 2015 14:02:30 +0800
> > 
> > > On Thu, May 14, 2015 at 01:58:24PM +0800, Herbert Xu wrote:
> > >> 
> > >> This patch also removes a bogus socket lock introduced by that
> > >> very same patch.
> > > 
> > > This bogus socket lock is still there in the current tree.
> > > 
> > > ---8<---
> > > The commit c5adde9468b0714a051eac7f9666f23eb10b61f7 ("netlink:
> > > eliminate nl_sk_hash_lock") added a lock_sock to netlink_insert
> > > with no justifications whatsoever.
> > > 
> > > This patch kills it.
> > > 
> > > Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
> > 
> > Eric, does this improve your benchmark?
> 
> I don't think so, but I can test this in about one hour.

Maybe the difference between 3.15 and 4.1 is not coming from
rhashtable/netlink but other core stuff, like mutex code.

The workload is largely dominated by mutex acquisition anyway.

    88.42%  [kernel]          [k] osq_lock                      
     1.91%  [kernel]          [k] mutex_spin_on_owner.isra.4    
     0.46%  [kernel]          [k] mutex_optimistic_spin         
     0.33%  [kernel]          [k] _raw_spin_lock                
     0.32%  [kernel]          [k] inet_dump_ifaddr              
     0.31%  [kernel]          [k] inet6_dump_addr               
     0.23%  [kernel]          [k] mutex_unlock                  
     0.23%  [kernel]          [k] _raw_read_lock_bh             
     0.21%  [kernel]          [k] _raw_spin_lock_irqsave        
     0.20%  perf              [.] 0x0000000000046273            

-  88.49%      getaddrinfo  [kernel.kallsyms]    [k] osq_lock                                                                                                         ◆
   - osq_lock                                                                                                                                                         ▒
      - 100.00% mutex_optimistic_spin                                                                                                                                 ▒
           __mutex_lock_slowpath                                                                                                                                      ▒
         - mutex_lock                                                                                                                                                 ▒
            - 45.48% netlink_dump                                                                                                                                     ▒
               + 87.27% netlink_recvmsg                                                                                                                               ▒
               + 12.73% __netlink_dump_start                                                                                                                          ▒
            - 38.93% rtnl_lock                                                                                                                                        ▒
               + 52.52% rtnetlink_rcv                                                                                                                                 ▒
               + 47.48% rtnetlink_rcv_msg                                                                                                                             ▒
            - 15.59% __netlink_dump_start                                                                                                                             ▒
                 rtnetlink_rcv_msg                                                                                                                                    ▒
                 netlink_rcv_skb                                                                                                                                      ▒
                 rtnetlink_rcv                                                                                                                                        ▒
                 netlink_unicast                                                                                                                                      ▒
                 netlink_sendmsg                                                                                                                                      ▒
                 sock_sendmsg                                                                                                                                         ▒
                 SYSC_sendto                                                                                                                                          ▒
                 sys_sendto                                                                                                                                           ▒
                 system_call_fastpath                                                                                                                                 ▒
               + __sendto_nocancel                                                                                                                                    ▒
+   1.96%      getaddrinfo  [kernel.kallsyms]    [k] mutex_spin_on_owner.isra.4     


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ