From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next 0/2] inet: factorize sk_wmem_alloc updates Date: Sun, 01 Apr 2018 14:09:07 -0400 (EDT) Message-ID: <20180401.140907.1671282204904065268.davem@davemloft.net> References: <20180331201626.186789-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:56862 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753742AbeDASJI (ORCPT ); Sun, 1 Apr 2018 14:09:08 -0400 In-Reply-To: <20180331201626.186789-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Sat, 31 Mar 2018 13:16:24 -0700 > While testing my inet defrag changes, I found that senders > could spend ~20% of cpu cycles in skb_set_owner_w() updating > sk->sk_wmem_alloc for every fragment they cook, competing > with TX completion of prior skbs possibly happening on another cpus. > > One solution to this problem is to use alloc_skb() instead > of sock_wmalloc() and manually perform a single sk_wmem_alloc change. > > This greatly increases speed for applications sending big UDP datagrams. Looks good, series applied, thanks.