Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1443256pxb; Thu, 4 Mar 2021 11:22:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/6N9Uz32VW9EqmCqA9oZQmej56Bvn3WF5X5snJPwSik82vaJ75rv4v61foBSTrrM38LuG X-Received: by 2002:a17:906:3899:: with SMTP id q25mr5959745ejd.157.1614885768274; Thu, 04 Mar 2021 11:22:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614885768; cv=none; d=google.com; s=arc-20160816; b=wVNjrNKg0H9VoWZsoTzeO6WlwndtyuPuJsl2uurqGSjbwkdCPeE30kTAhZTHnpD9l0 R1aqcxbiEjd5+6NxhrW3KqceF1dWDLhdyyGjhKmOSLIvtDiQN0QRGIvd53WR/WngE/5J KG1XmG7rqBcVilxDmNDzpFpV4MpH06s/j4y7wu1TPmrUnvOtoLQYxLsBW6od7Uhm900m 8f5xIPIpv1gxjVEcEr2b7i1TcqJR6He8a4rpJKy2Aap22TIuPfvnOm4yyNQ8Q3U83eDt LR6HBXIuQXDGhKlddblqpq05cHEXDc68ewCNq7grPRevQbQ+S/6mScH/nJZyVeVp7zBd edFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=eiwGvUDgDgtaDf2a3gkEMG86V3DasPfi0y7Q6LB4Xuo=; b=to8aBhDC9SCC9Vh7S2728bvkUA5qRyHSGVndVQqRycxMRIz+bQadmSb/EpahhP7A1X isPFClXxgCPsy/g1wnFbpXwXC4u1ZeAgD9rIzhG4rwEwlWr79eITyfK6z3o7nm/Wfsjx GlOWnQOrUBzuEUIvOJsLYLlGPdsqzNT65kdjXtvXgkK2dMHh4bYIwXft9fK3I7NP2TVf masq5URgtzxvqlGrqwM5dL+bARU8hoUgcpK5UYDR9leBAAXWWFXWcO0p+QRExh/8irCr OEc6SgvXBqmt19HoOwZLNyejzzZd+dQpVHYTrT+4VHv6ztDhMT5sVbjspRDHZMyoboOU dA5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si227626edp.366.2021.03.04.11.22.25; Thu, 04 Mar 2021 11:22:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234257AbhCDTQh (ORCPT + 99 others); Thu, 4 Mar 2021 14:16:37 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:55008 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232200AbhCDTQM (ORCPT ); Thu, 4 Mar 2021 14:16:12 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 5B4931F46668 Subject: Re: [RFC PATCH v2 00/13] Add futex2 syscall To: Theodore Ts'o Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , linux-kernel@vger.kernel.org, Steven Rostedt , Sebastian Andrzej Siewior , kernel@collabora.com, krisman@collabora.com, pgriffais@valvesoftware.com, z.figura12@gmail.com, joel@joelfernandes.org, malteskarupke@fastmail.fm, linux-api@vger.kernel.org, fweimer@redhat.com, libc-alpha@sourceware.org, linux-kselftest@vger.kernel.org, shuah@kernel.org, acme@kernel.org, corbet@lwn.net References: <20210304004219.134051-1-andrealmeid@collabora.com> From: =?UTF-8?Q?Andr=c3=a9_Almeida?= Message-ID: <3659bc06-f8f3-31ff-b4d6-99aee4ed2199@collabora.com> Date: Thu, 4 Mar 2021 16:15:21 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ted, Às 12:01 de 04/03/21, Theodore Ts'o escreveu: > On Wed, Mar 03, 2021 at 09:42:06PM -0300, André Almeida wrote: >> ** Performance >> >> - For comparing futex() and futex2() performance, I used the artificial >> benchmarks implemented at perf (wake, wake-parallel, hash and >> requeue). The setup was 200 runs for each test and using 8, 80, 800, >> 8000 for the number of threads, Note that for this test, I'm not using >> patch 14 ("kernel: Enable waitpid() for futex2") , for reasons explained >> at "The patchset" section. > > How heavily contended where the benchmarks? One of the benefits of > the original futex was that no system call was necessary in the happy > path when the lock is uncontended. futex2 has the same design in that aspect, no syscall is needed in the happy path. Did something in the cover letter gave the impression that is not the case? I would like to reword it to clarify this. > Especially on a non-NUMA system > (which are the far more common case), since that's where relying on a > single memory access was a huge win for the original futex. I would > expect that futex2 will fare worse in this particular case, since it > requires a system call entry for all operations --- the question is > how large is the delta in this worst case (for futex2) and best case > (for futex) scenario. > > Cheers, > > - Ted > Thanks, André