From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D496F2C170 for ; Thu, 18 Apr 2019 14:34:34 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JkTFsne7OaEU for ; Thu, 18 Apr 2019 14:34:34 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 9386E2C167 for ; Thu, 18 Apr 2019 14:34:34 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 4/4] swim: do not rebuild packet meta multiple times References: <11325bc37ed084aac81f9bcdb8b8a041f43e08e4.1555530516.git.v.shpilevoy@tarantool.org> <20190418172348.GF13022@chai> From: Vladislav Shpilevoy Message-ID: <5e541cb7-400d-afa9-1cde-e24fa5f63a75@tarantool.org> Date: Thu, 18 Apr 2019 21:34:31 +0300 MIME-Version: 1.0 In-Reply-To: <20190418172348.GF13022@chai> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org, Konstantin Osipov Pushed into the master. On 18/04/2019 20:23, Konstantin Osipov wrote: > * Vladislav Shpilevoy [19/04/18 09:03]: >> Before the patch there were 2 cases when an unchanged packet was >> rebuilt partially on each send: >> >> - cached round message's meta section was rebuilt on each >> EV_WRITE event in swim_scheduler_on_output() function; >> >> - broadcast message's meta section was rebuilt too even though >> its content does not depend on a broadcast interface. >> >> The third case appears with indirect pings patch which aggravates >> meta building business by routing and packet forwarding. When a >> packet needs to be forwarded farther, its meta is built in a >> special manner preserving the route before EV_WRITE appears, and >> on_output should not touch that meta. >> >> This patch adds a check preventing unnecessary meta rebuilds. >> Besides, the check and the meta building code are moved into a >> dedicated function out of swim_scheduler_on_output() - it allows >> to completely split logic of packing a message and sending it. >> Separated logic helps a lot when indirect pings are introduced. >> > > ok to push. > > > -- > Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 > http://tarantool.io - www.twitter.com/kostja_osipov >