From patchwork Mon May 9 18:28:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noah Sanci X-Patchwork-Id: 53682 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2265438346A7 for ; Mon, 9 May 2022 18:29:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2265438346A7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652120953; bh=2mtC3HMadAMn1m1Q48GL8wZdvGtGTkCySFe4pW0q/ic=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=QlLkRMXCWjpajfoEb7Y1dzAR31kbZ9h2pO6PDmgpUhR51MCwpyxbFrrhoAIt+JK+H tjvau8t7kkGv+rFhL/XXq+JyS7wQ9QILqVRmva1NOkn7H9RjDtRAc0OTW5YDnfyIaP l7CQUw37xoHV5BGAvOm0UcttuNStnS1UgMmlRnS4= X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id BBA8E38346A6 for ; Mon, 9 May 2022 18:28:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BBA8E38346A6 Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-237-MN2eHyZ7Pzmq-NYOdjL60g-1; Mon, 09 May 2022 14:28:46 -0400 X-MC-Unique: MN2eHyZ7Pzmq-NYOdjL60g-1 Received: by mail-il1-f198.google.com with SMTP id i24-20020a056e021d1800b002cf0541f514so8074788ila.13 for ; Mon, 09 May 2022 11:28:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2mtC3HMadAMn1m1Q48GL8wZdvGtGTkCySFe4pW0q/ic=; b=eA/WqjaJv7cGeL7q8MPLLdQLixk44OpiB1g0n9r0pbJxZQG6hGALF3kwvmYaIBEgTq 8Nc+iOYWy3Hn8Hevk+24Cpc0L6aqfk0K2FzYjDyuxkDAMeeaiUW4mllUZ1FoqKYc7dqR o38pDGckQBs6gzUiypJ0Toh2tn4koARQkLRmc7B3nuyNgPVcAHSStVeJpIiye0bV+Pj/ TVi5QTtsV1MGNRs4XE7WBuupNROjkbp0K8hH9jiWe6tYpwOEvMj9T8WBv1CzoUKQEICM k6zShwArYkfOtO/T8FvjU0jatidlv0Ync3Sn/FJZkb80LT7VyzwltdC0b+eRModSoJZP eMog== X-Gm-Message-State: AOAM531YhQfvehKgNOp6Xe/uaygYpjDqFpYhZxJRWYX0OQIWxYhLsjLu H25Fp09LgecYhSmUq6Z3b6InN/Flr4hV+FQHhbxysTyF1K+qYv6GIglJj/FY41Ipb7MGpvgRWr1 nzH+lrWcWIFXl7QHnMDcyVa6Ni9gvslGM0p4f2zM3nQ== X-Received: by 2002:a02:ca17:0:b0:32a:ed5b:c711 with SMTP id i23-20020a02ca17000000b0032aed5bc711mr8202185jak.230.1652120926154; Mon, 09 May 2022 11:28:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3ShJ3N7/w4QYHDuAiRwWKCpL7S53sNImmV1XyUyUJKMhWv1lQVhw7EYtoFx45DVjHqpic0kO2UN3RXipX1GI= X-Received: by 2002:a02:ca17:0:b0:32a:ed5b:c711 with SMTP id i23-20020a02ca17000000b0032aed5bc711mr8202178jak.230.1652120925902; Mon, 09 May 2022 11:28:45 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 9 May 2022 14:28:35 -0400 Message-ID: Subject: [Bug debuginfod/29098] set default prefetch limits to >0 To: elfutils-devel@sourceware.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Noah Sanci via Elfutils-devel From: Noah Sanci Reply-To: Noah Sanci Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" debuginfod/debuginfod.cxx: - Added default value to fdcache_prefetch_mds and fdcache_prefetch_fds when -R is specified. Defaults to one half of fdcache's values for those respective variables. These values are only set when -R is specified Note: the ratio of prefetch:fdcache file descriptors and MBs is set to 1:2 since the fdcache seems to be used less than the standard fdcache. From caa420f97225c5cc31c3fa0650cc7e25af3b4e91 Mon Sep 17 00:00:00 2001 From: Noah Sanci Date: Mon, 9 May 2022 13:15:04 -0400 Subject: [PATCH] PR29098: debuginfod - set default prefetch limits to >0 debuginfod/debuginfod.cxx: - Added default value to fdcache_prefetch_mds and fdcache_prefetch_fds when -R is specified. Defaults to one half of fdcache's values for those respective variables. These values are only set when -R is specified Signed-off-by: Noah Sanci --- debuginfod/debuginfod.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 4aaf41c0..b2fb2afb 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -3826,6 +3826,18 @@ main (int argc, char *argv[]) error (EXIT_FAILURE, 0, "unexpected argument: %s", argv[remaining]); + // Make the prefetch cache spaces smaller than the normal + // fd cache if rpm scanning is on. This is to not waste memory + // since the prefetch cache isn't used when -R isn't specified + // Set to 1/2 arbitrarily + if ( scan_archives[".rpm"] == "cat" ) + { + if ( fdcache_prefetch_fds == 0 ) + fdcache_prefetch_fds = fdcache_fds * .5; + if ( fdcache_prefetch_mbs == 0 ) + fdcache_prefetch_mbs = fdcache_mbs * .5; + } + if (scan_archives.size()==0 && !scan_files && source_paths.size()>0) obatched(clog) << "warning: without -F -R -U -Z, ignoring PATHs" << endl; -- 2.31.1