Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3870522rwi; Sun, 16 Oct 2022 20:28:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6/amdU7yNTtq7J4m4cdei8hPp9rcOnQRh8KUgNnQD6Cyvy1qwgb4KJpBlhlTJnyeyCuR9g X-Received: by 2002:a63:804a:0:b0:461:25fe:e7c5 with SMTP id j71-20020a63804a000000b0046125fee7c5mr288764pgd.395.1665977296785; Sun, 16 Oct 2022 20:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665977296; cv=none; d=google.com; s=arc-20160816; b=Qb8LEjPVmxpkvabxUPN95/lXQs3QiIFO3w2J5h3IzdyFhwQweDxEBt7ULjkSqDBjpH ALPTQUzqJT1I6LjoyMSUOHs5s3qMEsK1RTdrm1mlET0HARM3+XUojmAhrcgVQGxr/6yQ 6/woymGQlIdB08W5AROYvznVmSLNRwbIu5z2P1fmC031IPhKMjxVO+NSRxY8cxFbxVoH thMV0lIiXi3bOAP5nnEgRsf+Ih7imVdY3gtIZ7Y82Jvu7M5Ra5cHTL59/+7B+1oEoARV uYVfov+1chklFbigLzFHnd0ABrLDXDyMYhxNtkUcXahlgZZLmN7f8IOzrk4Ep793LROQ tW+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:dkim-signature; bh=G1DD2XBNGLKaNLIewsMLGf4TYhfNwQrPT1Ok1DlSAxA=; b=aBxeLm2EYaBl/wFub+zwgHSDfjUArhLNUmMZ0HtH9ikaoYKNP1a/6XSFgrd244sMes +npEUiitDu+aW+F1Qt4hpkhaSQCJcGXbLXRCGM9jMy5gjVM4tpNCYZPQ86UKAfKEuobP e8D2SWiYJhvPzXBjS+3aVLQpTVSoa0lk+IL9BATjJQCPj1olBrSRTp1nixzlaGQ1Xix8 UBXMLu+xIhoWmp5j3sF1iTPYsy/J5cLzFC7is4sgRP8OGXnGOrRqImipiLIL3IpdHWpq cu9/PiA1P02o6O01QgnayzoxsTyk63TDImuu+m6XK/zGV6pjEaO2WNkUqQm385tbN1au IkBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=hhNPHyV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a65428c000000b00460358671dfsi10000193pgp.513.2022.10.16.20.28.04; Sun, 16 Oct 2022 20:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=hhNPHyV9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231845AbiJQDZ3 (ORCPT + 99 others); Sun, 16 Oct 2022 23:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231788AbiJQDZ0 (ORCPT ); Sun, 16 Oct 2022 23:25:26 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 604052935C for ; Sun, 16 Oct 2022 20:25:25 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id u71so9359536pgd.2 for ; Sun, 16 Oct 2022 20:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=G1DD2XBNGLKaNLIewsMLGf4TYhfNwQrPT1Ok1DlSAxA=; b=hhNPHyV9RoFSzGUk5/QKd5hBOzwWTfZTbi3pzNoqXBx29+G4lB9KQeppiXLl0RiFWE 0r0D8trWm32WKcUOiG8nsYYvPm/TzbfLtSchKAEl/wjqg/FeKsKw7SMjPRvU+PhCCW6n zzRloA5ShBwPmVCjpvRlSspr7SKox+upqCMa8L153NQE5+ipmS7JWfQv5DITwr4vMOJc OI0EHbKhmOW96NWZ+x9+/YOQuDT1RGmV6xsrDX7Kg+gGGvqgoCkhojs8hrX0tk+a33fD zCZ4XtNQtZdntXW7Ll4CbolmMA9nOWWNCQUbmgNf6rOCzIxqy+YUCtK6TOQ6LTcuRibM Lk/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=G1DD2XBNGLKaNLIewsMLGf4TYhfNwQrPT1Ok1DlSAxA=; b=n+9WmqJH+8Ip9ADJWlC5cZrth0UH8YyVqXA9YY+3MyasWBm9BgUo+3t9tGtR2FXSbX 0SwqbHWmO1z2LdRK3jbY9N/3q6DbHVDAbUPGh4nsEnKVrdwjLjF+2mxK7zYlnrlCN23U 8DYWVZ1G6hqqFHZqeVyhGxUWCl2yMK5mAKsB1vnU62/rHkQIlw832gL+JaWqjxn9L3jI shSTuI51VepdEOIYn+O861hLf/zGhYKE0hMC1wk/BV/sYXHkt8V6tD2gyAyMLP9hxM1I a3TsULUJBnbvvd6qTWv8wV/X0wWyNz09Hos/CxELbyymjJM/gzfof+iuXAjJR4tbrSXM vb4A== X-Gm-Message-State: ACrzQf0H+KoKWe31eLP6d1z8Al7Nec0hzqoUzETW+cTOBrz5wvpJYa5y 9sN69wx42UM5kj/Oe4nLLwsQsQ== X-Received: by 2002:a63:88c7:0:b0:462:79de:dc75 with SMTP id l190-20020a6388c7000000b0046279dedc75mr8875765pgd.458.1665977124935; Sun, 16 Oct 2022 20:25:24 -0700 (PDT) Received: from [10.4.245.17] ([139.177.225.250]) by smtp.gmail.com with ESMTPSA id t2-20020aa79462000000b00540a8074c9dsm5718696pfq.166.2022.10.16.20.25.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Oct 2022 20:25:24 -0700 (PDT) From: Chengming Zhou X-Google-Original-From: Chengming Zhou Message-ID: Date: Mon, 17 Oct 2022 11:25:14 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [RFC PATCH 00/11] Reviving the Proxy Execution Series Content-Language: en-US To: Connor O'Brien , linux-kernel@vger.kernel.org Cc: kernel-team@android.com, John Stultz , Joel Fernandes , Qais Yousef , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Will Deacon , Waiman Long , Boqun Feng , "Paul E . McKenney" References: <20221003214501.2050087-1-connoro@google.com> In-Reply-To: <20221003214501.2050087-1-connoro@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 2022/10/4 05:44, Connor O'Brien wrote: > Proxy execution is an approach to implementing priority inheritance > based on distinguishing between a task's scheduler context (information > required in order to make scheduling decisions about when the task gets > to run, such as its scheduler class and priority) and its execution > context (information required to actually run the task, such as CPU > affinity). With proxy execution enabled, a task p1 that blocks on a > mutex remains on the runqueue, but its "blocked" status and the mutex on > which it blocks are recorded. If p1 is selected to run while still > blocked, the lock owner p2 can run "on its behalf", inheriting p1's > scheduler context. Execution context is not inherited, meaning that > e.g. the CPUs where p2 can run are still determined by its own affinity > and not p1's. This is cool. We have a problem (others should have encountered it too) that priority inversion happened when the rwsem writer is waiting for many readers which held lock but are throttled by CFS bandwidth control. (In our use case, the rwsem is the mm_struct->mmap_sem) So I'm curious if this work can also solve this problem? If we don't dequeue the rwsem writer when it blocked on the rwsem, then CFS scheduler pick it to run, we can use blocked chain to find the readers to run? Thanks!