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.133.124]) by sourceware.org (Postfix) with ESMTPS id 2423C3858C2C for ; Fri, 22 Apr 2022 13:32:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2423C3858C2C Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-T7NyfHG3Oiqp6cUp_C4F9Q-1; Fri, 22 Apr 2022 09:32:35 -0400 X-MC-Unique: T7NyfHG3Oiqp6cUp_C4F9Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C74E811E83; Fri, 22 Apr 2022 13:32:35 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E54C5414A7EA; Fri, 22 Apr 2022 13:32:34 +0000 (UTC) From: Florian Weimer To: Yann Droneaud Cc: Adhemerval Zanella via Libc-alpha , Wangyang Guo Subject: Re: [PATCH v2] nptl: Add backoff mechanism to spinlock loop References: <20220328084705.468207-1-wangyang.guo@intel.com> <97b1105f-42e8-a347-f82e-c81e548f0c2f@linaro.org> <82d5d195-aea0-f817-bfc1-5822829728c7@linaro.org> <87wnfufrh2.fsf@oldenburg.str.redhat.com> <6d934a2c-8f89-50ca-11b8-e2eaeb046add@opteya.com> Date: Fri, 22 Apr 2022 15:32:33 +0200 In-Reply-To: <6d934a2c-8f89-50ca-11b8-e2eaeb046add@opteya.com> (Yann Droneaud's message of "Fri, 22 Apr 2022 15:30:22 +0200") Message-ID: <87o80ts0pa.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP 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: 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: Fri, 22 Apr 2022 13:32:39 -0000 * Yann Droneaud: > Le 12/04/2022 =C3=A0 13:53, Florian Weimer via Libc-alpha a =C3=A9crit=C2= =A0: >> * Adhemerval Zanella via Libc-alpha: >> >>> On 30/03/2022 14:07, Noah Goldstein wrote: >>>> What would be the best init jitter for arch w/ only syscall timers? TI= D? Or >>>> something else? >>> We don't cached the TID anymore, so it would still generate syscalls. >> We do have the TID for the running process in the TCB. We need it (or >> something like it) for recursive locks. >> >> Maybe for this application, we should use some number of upper bits from >> a per-thread linear consequential generator, initialized to a random >> value at thread start? > As each running threads has its own stack, thread' stack address can > be used as a seed for such PRNG. We would broadcast the stack address though, which is generally fround upon. Thanks, Florian