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 5910B2BA62 for ; Wed, 24 Apr 2019 14:20:59 -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 u19hEWhtJznU for ; Wed, 24 Apr 2019 14:20:59 -0400 (EDT) Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 14DD82B9E2 for ; Wed, 24 Apr 2019 14:20:58 -0400 (EDT) Received: by mail-lf1-f68.google.com with SMTP id t11so15417183lfl.12 for ; Wed, 24 Apr 2019 11:20:58 -0700 (PDT) Date: Wed, 24 Apr 2019 21:20:55 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 01/10] Introduce a txn memory region Message-ID: <20190424182055.GA21344@atlas> References: <578b5150bc489f2839387f8b95c8068e6649d455.1555677159.git.georgy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <578b5150bc489f2839387f8b95c8068e6649d455.1555677159.git.georgy@tarantool.org> 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 Cc: Georgy Kirichenko * Georgy Kirichenko [19/04/19 19:59]: > Attach a separate memory region for each txn structure in order to store > all txn internal data until the transaction finished. This patch is a > preparation to detach a txn from a fiber and a fiber gc storage. The patch is OK to push. See two minor comments below. > struct txn { > + struct stailq_entry list; Please rename to in_txn_cache > + struct region region; Please provide meaningful comments for both members: e.g. say that we can have more than one transaction per an active fiber in case of parallel applier for replication changes plus we want to detach a transaction from a fiber to allow interactive transactions. In theory this patch increases the amount of memory locked to the runtime pool, but since this is O(1) right now I would ignore this. As a follow up patch please consider optimizing txn_new() for cases when txn is taken from the cache: some of the members are cleared by txn_commit()/txn_rollback() so do not need to be set again. This is a very hot path! -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov