From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 4944E38582AE for ; Tue, 6 Sep 2022 11:42:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4944E38582AE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662464542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BZIp6JC2k1unqTh5Nz2GM+CQPfhbmt9sg3cb3H15+R8=; b=Mrxw7GulbOeaHh0/EpUaSEiePtdEMmpxU8MM+qpSfLmZ8rUBlChNz0GuRjJnqrH2UEunUt JQNtsCgeXsIf9CqjHuVqx/ntzcQZbPOxBYJ8iyFWAm6SHSJM5FHYCNE4TXm2eU3qXFXlY9 Hcp6jjT3WCLYqLAMqiru76E5KzfzbUY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-5-yFIGccmjNKGQOArK5H3AAw-1; Tue, 06 Sep 2022 07:42:21 -0400 X-MC-Unique: yFIGccmjNKGQOArK5H3AAw-1 Received: by mail-wm1-f70.google.com with SMTP id v67-20020a1cac46000000b003a615c4893dso6188525wme.3 for ; Tue, 06 Sep 2022 04:42:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=BZIp6JC2k1unqTh5Nz2GM+CQPfhbmt9sg3cb3H15+R8=; b=jrI4AhpXqEoj+Nu/IzLvE/CJjf7/emKGH+ny0zkezf8AkWx11MAx0I71Kbj+XFJ7kl xQ4lw4troWvJKKRlDA1sBUq47vY/Fo9FkpdcMJMs50sZT6y/zBnhRQAZj52g5mLiF2Xj VkwntJ11PzTRbLXGTsbvIZe11wB2ZsEGCWVwPCwTcm6nRQcZD8FI8fjVi5QjUnj+G9lt EhzAO+FSWWHb7nccF1GOhGA8XM0TAh8hl6hRgktNdOB60yKbFJvgIe+Mj4pwUZbWEhTo wIfGDyg2RQCwIdPw3jEA5Ng1p6AhjZ6jbnNMkT/DM3Up6jwx2mNL58vxw0a7Z0WoAU0+ TJdg== X-Gm-Message-State: ACgBeo2rp2pgNezdbcDQF/56QyuwURGNkYZYhp9+HWbjy8JBpmA1JDn3 Rm6kRKnzi8TLyvm5aGU65lhZT+6TC0x6m6HCz1QXpsptCVBJc9W82MVzVh9Th+wmbVuRdgYpEXk QYJOUSbuZuM+gYTC2Ow== X-Received: by 2002:a5d:47a1:0:b0:226:ebfc:f759 with SMTP id 1-20020a5d47a1000000b00226ebfcf759mr17284043wrb.636.1662464540538; Tue, 06 Sep 2022 04:42:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR4shYF0lj5/3GgCtJqzmFxdysyK3pdDN2q6MYGHB5/QGHq64p9/QdvlD3P5idBHqfyu4WFC6w== X-Received: by 2002:a5d:47a1:0:b0:226:ebfc:f759 with SMTP id 1-20020a5d47a1000000b00226ebfcf759mr17284036wrb.636.1662464540321; Tue, 06 Sep 2022 04:42:20 -0700 (PDT) Received: from [192.168.1.6] ([79.123.81.183]) by smtp.gmail.com with ESMTPSA id bg32-20020a05600c3ca000b003a536d5aa2esm15020989wmb.11.2022.09.06.04.42.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Sep 2022 04:42:19 -0700 (PDT) Message-ID: <2568a388-02a9-4beb-f20b-e2493cda4a64@redhat.com> Date: Tue, 6 Sep 2022 12:42:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH] ld: pe: Improve performance of object file exclude symbol directives To: Jan Beulich , =?UTF-8?Q?Martin_Storsj=c3=b6?= Cc: binutils@sourceware.org References: <20220902105903.2249507-1-martin@martin.st> <174963e9-fa71-b70e-7659-0f534db073f8@redhat.com> <242a402a-57be-0738-d7b8-c19e1a631bb7@suse.com> From: Nick Clifton In-Reply-To: <242a402a-57be-0738-d7b8-c19e1a631bb7@suse.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Jan, > On 05.09.2022 14:54, Nick Clifton via Binutils wrote: >>> + max_exclude_symbols = ROUND_UP(fdef->num_exclude_symbols + 1, 32); >> >> Given that the point of this patch is to improve performance when there >> are a large number of excluded symbols, incrementing the array by 32 slots >> at a time seems counter intuitive. I would suggest a bigger number, eg 1024 >> or 10240. > > Perhaps double the value, thus not overly much impacting the case of there > being a moderate number of excludes? To be honest I have no idea what a "large number of excludes" might look like. So maybe 32 is actually a sensible increment. Doubling the increment every time the limit is reached could lead to resource exhaustion issues in extreme cases, but I doubt if that will ever happen in real life, so that works for me too. Cheers Nick