From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A339C4707D for ; Fri, 21 May 2021 19:14:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C478613B6 for ; Fri, 21 May 2021 19:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235341AbhEUTPd (ORCPT ); Fri, 21 May 2021 15:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235033AbhEUTPb (ORCPT ); Fri, 21 May 2021 15:15:31 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49268C061574 for ; Fri, 21 May 2021 12:14:08 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id b26so15190213lfq.4 for ; Fri, 21 May 2021 12:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5oPa6Xr9eac0PsBORLiu0TlT5LtjJE1rGnKDOXc4+iM=; b=FZM+cOW+NzUZku+HiAJITJowouhCBpkNsWURcM63zHo2NSoOToXTS3DZjhq2R6Wjav E2ermU9AUDzbpNaDUiC4sB+BRQM4xTB/aYH5SKsrbtsY5gtjMvevNm2yYe08TETvQXH1 0gwA/O1z7JgbtoM0VV+IHuQLgu9VlpQAuWOBI1N7jVp7Gpl0gZNACxp8cr33F1tVebC+ Bf+OYwEcZELBHbLtemvz/LWeYxZMfYY26CujM6Gy6zI4wtBFI/U3LpAbuTvavII8TgUm idj2MxIqFX91k6blfy+u/YZOLK9mX2SAohMIUL63YpWIU/AoTHx40DEw0W9GOzJuxX6g mnfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5oPa6Xr9eac0PsBORLiu0TlT5LtjJE1rGnKDOXc4+iM=; b=iIyq98XJAt5R11XkoEB+2XC7iuUPF0W+xAaqZ6A5FJR+EDE81WwBdacYVBUaWaxWWi 1DuUee43dCk/g6wjoT/DPbp8AgjThkqAd69uKmYgMT2x24qeCfKRBvh2m3vBM6IBVfN2 pDv7rRliV7jlzTTiJSzzLs85fPSYAt9v5dzYYM/o9QGSH7guXr+hNJQLq75ooqtAaAwt WmO55AY5XaeS2zlcIfkbT26Hhq8FCaHHITVkMdztKtWxCkMpjAsRR4zx4K/c1Y75LKi5 A2olvVaJ+sGUzp9v1WiShfQcYwPdd8IMRhwzS5BZ4DxKqYYNBIumZJ5pPW9pvjs/4uTv bkSg== X-Gm-Message-State: AOAM531NXpwnTjzE7py2QouZ0izCUtLjnc2CHE5tp/aoFRfMpTb+7oEC RhO9L8w+wBcmkZhFPpwnbodtT+KnT1pHiUkS52s7jw== X-Google-Smtp-Source: ABdhPJzljfo8EYXnQbOzQP0KViedCYWcKCDa8fpsepH7kKBan8/VjwxkEx2EQgztB54zdcBHuBWJfkDWZWrtedKqq38= X-Received: by 2002:ac2:520a:: with SMTP id a10mr3184843lfl.180.1621624446406; Fri, 21 May 2021 12:14:06 -0700 (PDT) MIME-Version: 1.0 References: <20210520183614.1227046-1-posk@google.com> In-Reply-To: From: Peter Oskolkov Date: Fri, 21 May 2021 12:13:55 -0700 Message-ID: Subject: Re: [RFC PATCH v0.1 0/9] UMCG early preview/RFC patchset To: Andrei Vagin Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , Linux Kernel Mailing List , linux-api , Paul Turner , Ben Segall , Peter Oskolkov , Joel Fernandes , Andrew Morton , Jim Newsome Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 11:44 AM Andrei Vagin wrote: > > > > On Thu, May 20, 2021 at 11:36 AM Peter Oskolkov wrote: >> >> As indicated earlier in the FUTEX_SWAP patchset: >> >> https://lore.kernel.org/lkml/20200722234538.166697-1-posk@posk.io/ > > > Hi Peter, > > Do you have benchmark results? How fast is it compared with futex_swap and the google switchto? Hi Andrei, I did not run benchmarks on the same machine/kernel, but umcg_swap between "core" tasks (your use case for gVisor) should be somewhat faster than futex_swap, as there is no reading from the userspace and no futex hash lookup/dequeue ops; umcg_swap should be slower than switchto_switch because umcg_swap does go through ttwu+schedule, which switchto_switch bypasses. I expect that if UMCG is merged in a form similar to what I posted, we will explore how to make UMCG context switches faster in later patches. Thanks, Peter > > Thanks, > Andrei