From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 To: sisyphus@lists.altlinux.org References: <20210409105728.2161040c@tower> <25361457-7a9a-83b2-a40c-b81b0bd71297@dumalogiya.ru> <20210409132712.41047a1f@tower> From: Anton Gorlov Message-ID: Date: Sat, 10 Apr 2021 19:44:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210409132712.41047a1f@tower> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Language: ru Content-Transfer-Encoding: 8bit X-Authenticated-As: stalker@locum.ru Subject: Re: [sisyphus] =?utf-8?b?0J7QsdC90L7QstC70LXQvdC40LUg0Y/QtNGA0LAgc3Rk?= =?utf-8?b?LWRlZiDQtNC+IDUuMTA=?= X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Sisyphus discussions List-Id: ALT Linux Sisyphus discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2021 16:45:17 -0000 Archived-At: List-Archive: List-Post: На 5.x ещё есть жалобы на производительность модуля virtio для сетевых карт. не так давно обсуждалось в канале разработчиков accel-ppp Пока склоняются, что сломано вот в этом коммите ==== From: Eric Dumazet Xuan Zhuo reported that commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs") brought a ~10% performance drop. The reason for the performance drop was that GRO was forced to chain sk_buff (using skb_shinfo(skb)->frag_list), which uses more memory but also cause packet consumers to go over a lot of overhead handling all the tiny skbs. It turns out that virtio_net page_to_skb() has a wrong strategy : It allocates skbs with GOOD_COPY_LEN (128) bytes in skb->head, then copies 128 bytes from the page, before feeding the packet to GRO stack. This was suboptimal before commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny skbs") because GRO was using 2 frags per MSS, meaning we were not packing MSS with 100% efficiency. Fix is to pull only the ethernet header in page_to_skb() Then, we change virtio_net_hdr_to_skb() to pull the missing headers, instead of assuming they were already pulled by callers. This fixes the performance regression, but could also allow virtio_net to accept packets with more than 128bytes of headers. Many thanks to Xuan Zhuo for his report, and his tests/help. [PATCH net] virtio_net: Do not pull payload in skb->head