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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-6.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5DB121F8C8 for ; Mon, 27 Sep 2021 13:49:11 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 39D45385841D for ; Mon, 27 Sep 2021 13:49:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39D45385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632750550; bh=OpZB2njjsLREA7NRELEiAXD/84XChIpxTPS3FpsAon0=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RRHEjh5HZB9KAjZZW8k2FwPPQUKBVUTmkzvydv7fmqquYpnd4bpdHtYfnFOhk346R beJv2NfPtZtF3LFpbGIhYuRJpSGm+pwTlpqSRgiuL/i1+r6UnQCKzjpEUwmBOaTKv5 y2aYqq3H56GISdJCHuSlKay1ryRX6i5anuVnVUA8= Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 6C0FC3858D3C for ; Mon, 27 Sep 2021 13:48:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6C0FC3858D3C Received: by mail-qv1-xf30.google.com with SMTP id cv2so5087750qvb.5 for ; Mon, 27 Sep 2021 06:48:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OpZB2njjsLREA7NRELEiAXD/84XChIpxTPS3FpsAon0=; b=5ErYL4/1wQ7P25nAm+x7wE4wR/71cC7/ooGNv5ojnC24iBpQCC4GA1bHhAXVXnuyOf PFIWesxj2rUgrTjR9gbzMUOuoRClRs4Dbgw+zL1dikh3huC+qg4np2St9/M34xjELf7o 9lkKROMQ8AY891yd6FAV6nSAZYlw+LtSrD3sT5EYAc5vxZE1d0npT/w5qw4v2rxAYLEN FJRluv4T8cgIm5F2nGX2BIeLZlG7GFSMNjbSQW3LZKjNegy1vlcA36KtnRc5xUMB5dDU gAVzrrinOJ0oJEEMJNJ+HIPIi51zBM/+sIp9XkeAMIxRKmVpk/GjrlYkTo4+WuAkC3qK 4nyg== X-Gm-Message-State: AOAM5318PriHMmeC8nWN3GmJCmyvqqByJO/ay6Bi5aSXw0zCT789QJYn qplNz344CFgkThKoMYOd579L4oReX4/lxw== X-Google-Smtp-Source: ABdhPJz49LcF0RD8CVEBQmKl7WF+dhB1EBKxTVqYQGFj/oR/TfqA92SCiy03ed/X8kWuUdaNXTHcDw== X-Received: by 2002:ad4:49a7:: with SMTP id u7mr8877965qvx.51.1632750529619; Mon, 27 Sep 2021 06:48:49 -0700 (PDT) Received: from ?IPv6:2804:431:c7cb:b338:9c1f:21e4:d45:b086? ([2804:431:c7cb:b338:9c1f:21e4:d45:b086]) by smtp.gmail.com with ESMTPSA id z10sm11005303qtv.6.2021.09.27.06.48.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 06:48:49 -0700 (PDT) Subject: Re: [PATCH v3 0/4] Add CLOCK_MONOTONIC support for PI mutexes To: libc-alpha@sourceware.org References: <20210906204740.3988273-1-adhemerval.zanella@linaro.org> Message-ID: Date: Mon, 27 Sep 2021 10:48:47 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210906204740.3988273-1-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , From: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" Ping on the set. On 06/09/2021 17:47, Adhemerval Zanella wrote: > It adds support for CLOCK_MONOTONIC for PI mutexes by using the new > Linux v5.14 FUTEX_LOCK_PI2 operation. Similar to current approach, > pthread_mutex_clocklock might return EINVAL if the underlying kernel > has no support for the futex operation. > > Changes since v2: > > * Renamed xpthread_mutex_pi_support_monotonic to > support_mutex_pi_monotonic. > > Changes since v1: > > * Refactor futex_lock_pi64 and avoid adding futex_lock_pi2. The > FUTEX_LOCK_PI2 logic is done at only one place, so the code change > on pthread routines are minimal. Also, FUTEX_LOCK_PI2 is only > used if it is really required, i.e, when a timeout against > CLOCK_MONOTONIC is used. > * Do not remove nptl/tst-mutexpi10.c, but instead adjust it to new > FUTEX_LOCK_PI2 support. > * Add pthread_mutex_pi_support_monotonic() to check if monotonic > clock with PI mutexes are supported and use on test to check for > the expected result. > > Adhemerval Zanella (3): > nptl: Use FUTEX_LOCK_PI2 when available > support: Add support_mutex_pi_monotonic > nptl: Add CLOCK_MONOTONIC support for PI mutexes > > Kurt Kanzenbach (1): > Linux: Add FUTEX_LOCK_PI2 > > nptl/futex-internal.c | 63 +++++++++++++++++++++++ > nptl/pthread_mutex_lock.c | 3 +- > nptl/pthread_mutex_timedlock.c | 10 +--- > nptl/tst-mutexpi10.c | 42 +++++++++------ > support/Makefile | 1 + > support/support_mutex_pi_monotonic.c | 33 ++++++++++++ > support/xthread.h | 4 ++ > sysdeps/nptl/futex-internal.h | 58 ++------------------- > sysdeps/nptl/lowlevellock-futex.h | 1 + > sysdeps/pthread/tst-mutex5.c | 23 ++++++--- > sysdeps/pthread/tst-mutex9.c | 20 ++++--- > sysdeps/unix/sysv/linux/kernel-features.h | 8 +++ > 12 files changed, 172 insertions(+), 94 deletions(-) > create mode 100644 support/support_mutex_pi_monotonic.c >