From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B3D3B1F934 for ; Fri, 24 Sep 2021 23:53:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344407AbhIXXzO (ORCPT ); Fri, 24 Sep 2021 19:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245437AbhIXXzJ (ORCPT ); Fri, 24 Sep 2021 19:55:09 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FB7DC0614ED for ; Fri, 24 Sep 2021 16:53:35 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id d6so31935818wrc.11 for ; Fri, 24 Sep 2021 16:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=Wx/NRBAYoIBhOKGldB61QZt0lf65wQv8k/Ky8embUfk=; b=bDcdRT/gXz5c864Jhg09hYknmkBjA2X5VKTssYJzYp6nmEiTWCI8OfAsniP2pDUWK7 WJggUsdixyN6dDiclkCWINPmAWGQQdySp3N3rxHmLktoOMj1O4djxsPcucuPDr4Uvf93 SjRaGVoUkDV7445NWA4GlYM8WEP6tpRkwSK+a1VyqFC7W4HqL/AD8czSpEUsyd+HClvx 8PQLS0P3jg9vY6TZLbTqLkrUBgz+3/JTL617YhmfcT9CVTV5P5ibrUDBf4XdjuOaNISy 5psbpzxY6morA8uWksxy05hckS4ziCbueullRTlYxxbYmXgPAu9pW5dxvY3QcNL2fkIW s0eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=Wx/NRBAYoIBhOKGldB61QZt0lf65wQv8k/Ky8embUfk=; b=Kc1aAMaVc03fCf/Bw6te632dm4OLbQemxd7wH2HMwR4bf1rtKkh51PDj4To89d/nRL QrSMQF8gZXybY8wX/Q4zCiugNUXhvY9/kpinSqIhGP51LqSlIM/D5+dxBzfPFnOr2BPq 2AVk4syGq/CNCNND6XxaGCqM1qTQUtFuSruMf6LAPKDePbxsFXr+MX6HJMcoKIp1Eubo 5VW92xtMZJx8SA+VP9jB9TxXK/KK73eNqzYG4wljVBFlZmGYzcFXQ+9ayJjO/iETHd4Q RaWmR3D9aUNZfDEDzgArW8OEyuX5yLU54VWlMXNNVCozjIMSdkhsBwW1lcAZMAjRL6Mr 23Ug== X-Gm-Message-State: AOAM530NqoAtSF/Q2Wtb/uskjU3m+BCTb2NcOvRCEk/LEwiDsy4WwJK/ gm9W/hajW3bawAkGx5h10oYuiHYk0Cg= X-Google-Smtp-Source: ABdhPJyqDzEdqXe8tP0ZlXoihOsKGwYCWlZL4iXBvxLQ9Rz654ianflZrnAonwSPsWNQ4OGLJmPxJQ== X-Received: by 2002:a5d:598c:: with SMTP id n12mr13779371wri.391.1632527613677; Fri, 24 Sep 2021 16:53:33 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 135sm14561510wma.32.2021.09.24.16.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 16:53:33 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Neeraj Singh via GitGitGadget" Date: Fri, 24 Sep 2021 23:53:27 +0000 Subject: [PATCH v6 6/8] unpack-objects: use the bulk-checkin infrastructure Fcc: Sent Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 To: git@vger.kernel.org Cc: Neeraj-Personal , Johannes Schindelin , Jeff King , Jeff Hostetler , Christoph Hellwig , =?UTF-8?Q?=C3=86var_Arnfj=C3=B6r=C3=B0?= Bjarmason , "Randall S. Becker" , Bagas Sanjaya , "Neeraj K. Singh" , Neeraj Singh Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Neeraj Singh The unpack-objects functionality is used by fetch, push, and fast-import to turn the transfered data into object database entries when there are fewer objects than the 'unpacklimit' setting. By enabling bulk-checkin when unpacking objects, we can take advantage of batched fsyncs. Signed-off-by: Neeraj Singh --- builtin/unpack-objects.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 4a9466295ba..51eb4f7b531 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -1,5 +1,6 @@ #include "builtin.h" #include "cache.h" +#include "bulk-checkin.h" #include "config.h" #include "object-store.h" #include "object.h" @@ -503,10 +504,12 @@ static void unpack_all(void) if (!quiet) progress = start_progress(_("Unpacking objects"), nr_objects); CALLOC_ARRAY(obj_list, nr_objects); + plug_bulk_checkin(); for (i = 0; i < nr_objects; i++) { unpack_one(i); display_progress(progress, i + 1); } + unplug_bulk_checkin(); stop_progress(&progress); if (delta_list) -- gitgitgadget