From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id 1DE1E3857001 for ; Wed, 27 Jul 2022 12:29:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1DE1E3857001 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-10cf9f5b500so22358521fac.2 for ; Wed, 27 Jul 2022 05:29:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=tOKRtZR9rLdEJlA8971Xgm3o5k3jw6HOeJSAPBcuwOk=; b=O7on5xTA9aHk08G4LZ+ziATH3c36tfzxped7281e5a0qs82TBTnZy5Z+ictbSeiLNI hzXpvFV4MOiyzMPAhDWw64D2tmfb6ICn+J4mztNcth2OPnKZ94IwGB+F2nJmyCwOSlEe VoZix6cT8F026MDrlTWwKVY9qms+ce4M/zd96z5TKZ0vEL96qqTZj09xRxtegq1F9pR8 PQThvl3z1QzX3bYAYw+BHV6ZG70RBDeMbd8gs0TW9v+FDymOdevIoSs8yU43ci/Wi6pD +CmDm/JcMt09fiCwmMw+8KLeaVvdBhn469GsB4sgqJgmuy6iM04ieqTtQ7SruQEEdCNS rJHw== X-Gm-Message-State: AJIora9VvMoHkiG8AZXIlBHN0lzzZF0iRWgtbsqy71LCUEuxJSUvFIbY 3EY8DC42xumrSaUyMlAd39BrDA== X-Google-Smtp-Source: AGRyM1uydoI16/e3IU+Tvq6eFJC1LfIYzop/XRX3hXS1yUm5ZVLQDoSMFscWs5lHjX8MAaPK+ecR8g== X-Received: by 2002:a05:6870:c0ca:b0:10d:cc1e:5c4c with SMTP id e10-20020a056870c0ca00b0010dcc1e5c4cmr1999070oad.132.1658924997419; Wed, 27 Jul 2022 05:29:57 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:8ded:8925:49f1:c550:ee7d? ([2804:431:c7cb:8ded:8925:49f1:c550:ee7d]) by smtp.gmail.com with ESMTPSA id q206-20020acaf2d7000000b0033a3e6e7ce9sm7193366oih.10.2022.07.27.05.29.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jul 2022 05:29:56 -0700 (PDT) Message-ID: <66576e3c-acbf-7c02-f47b-6fccb71f756b@linaro.org> Date: Wed, 27 Jul 2022 09:29:53 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH] stdlib: Tuned down tst-arc4random-thread internal parameters Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org, "Jason A . Donenfeld" , Carlos O'Donell References: <20220727120600.2003708-1-adhemerval.zanella@linaro.org> <878roeeo8t.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <878roeeo8t.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2022 12:29:59 -0000 On 27/07/22 09:25, Florian Weimer wrote: > * Adhemerval Zanella: > >> static int >> do_test (void) >> { >> + /* Do not run more threads than the maximum of online CPUs. */ >> + long int cpus = sysconf (_SC_NPROCESSORS_ONLN); >> + if (cpus != -1) >> + /* Limit the number to not overload the system. */ >> + outer_threads = (cpus / 2) / inner_threads; > > Doesn't this make outer_threads on many systems? I did not quite follow, make outer_threads large do you mean? > > By the way, I think we should switch to the standard arc4random_uniform > implementation that doesn't try to conserve bits. It's cheaper to get a > larger number of bits once instead of obtaining 24 bits first, then 8 > bits. Yeah, it should simpler indeed. But I do not consider this urgent for 2.36.