Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1558543rwd; Tue, 13 Jun 2023 10:41:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70x9pPgJq78im+9jazoA4C0agWOzZ0rfZs4poefg5XVW24KDl8zTpAl9dc5AtoSoyUKybC X-Received: by 2002:aa7:d804:0:b0:514:91bd:a967 with SMTP id v4-20020aa7d804000000b0051491bda967mr7072184edq.9.1686678112029; Tue, 13 Jun 2023 10:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686678112; cv=none; d=google.com; s=arc-20160816; b=h5Ljg3nCgWwiPS/PFqLzsOhTjVBGXwAl1vyt7hewA95h0ePtd16H3U20g+fa1ohXPa 0x3pCmR5utm/3QTG7sDBlTHnFhKaDeV42njUaWc2SI55Zlq5hKsM+gF9tyirfcrzY5e3 QCPxCjVLGGeP0IHqKry1LH6KI1jvJYKD+XTJOHz/VEpwqffx78u7lzI5Vd6ZoQP/wEKe j8LvL3AxqVGDWbYDPW8mRD9t7Yvtxnlro1h8BxS4KCT3uiKMCvfzhcd35TIMSQqKsbPB TQ7v+aqWsh9ZVCGXWpWFtrahIK1zY7dX3n+f/MegL8Wyh7JOLwWYj2BVKqJ3+qD6GcfL 3cLQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=noyqq/zugsNhKa+TmGPFqbbMzCV0zZNzdweBnNuiS94=; b=FugoHTpymGpmeeb8v0ePZBY6dv/ITA3IIEvIf+9VWo/JMCtXxx7Wij4/I1+wYad+VC ZCHVnr3IDA2BnrJBsonjbSsMcEs8BCaW9Xt1JjySCJ6Iaqaz7SDn/DEAeZlsiylWf3Oj 0IIc6UJ5zot5bsTyc8jrz2RedbLycgxC+1bVf/baghb9YEbNGqsUCkFEydnkPNFeLUc+ pCC7vTj9ERzqwn/SgTI9+qBjlDDV/rvb5ncX6MzCgjS/K7ex6R4jADKNL41O4jy6/QZ0 +/t323V6dbluW8/xwQtVlAetv+ZX/G+aMmekNkPfBFS2feby1XDF6IoYxR+CnX+1/Q73 LttA== ARC-Authentication-Results: i=1; mx.google.com; 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=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a056402038700b0050bc3f1c6c0si7832919edv.359.2023.06.13.10.41.27; Tue, 13 Jun 2023 10:41:52 -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; 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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236749AbjFMRM3 (ORCPT + 99 others); Tue, 13 Jun 2023 13:12:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbjFMRMZ (ORCPT ); Tue, 13 Jun 2023 13:12:25 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8C709170E for ; Tue, 13 Jun 2023 10:12:24 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D0FBD1FB; Tue, 13 Jun 2023 10:13:08 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB0943F663; Tue, 13 Jun 2023 10:12:20 -0700 (PDT) Message-ID: Date: Tue, 13 Jun 2023 19:12:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 07/13] sched: Split scheduler execution context Content-Language: en-US To: John Stultz , LKML Cc: Peter Zijlstra , Joel Fernandes , Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Youssef Esmat , Mel Gorman , Daniel Bristot de Oliveira , Will Deacon , Waiman Long , Boqun Feng , "Paul E . McKenney" , kernel-team@android.com, Connor O'Brien References: <20230601055846.2349566-1-jstultz@google.com> <20230601055846.2349566-8-jstultz@google.com> From: Dietmar Eggemann In-Reply-To: <20230601055846.2349566-8-jstultz@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 01/06/2023 07:58, John Stultz wrote: > From: Peter Zijlstra > > Lets define the scheduling context as all the scheduler state in > task_struct and the execution context as all state required to run > the task. > > Currently both are intertwined in task_struct. We want to logically > split these such that we can run the execution context of one task > with the scheduling context of another. > > To this purpose introduce rq_selected() macro to point to the > task_struct used for scheduler state and preserve rq->curr to > denote the execution context. > > NOTE: Peter previously mentioned he didn't like the name > "rq_selected()", but I've not come up with a better alternative. > I'm very open to other name proposals. > > Question for Peter: Dietmar suggested you'd prefer I drop the > conditionalization of the scheduler context pointer on the rq > (so rq_selected() would be open coded as rq->curr_sched or > whatever we agree on for a name), but I'd think in the > !CONFIG_PROXY_EXEC case we'd want to avoid the wasted pointer > and its use (since it curr_sched would always be == curr)? > If I'm wrong I'm fine switching this, but would appreciate > clarification. IMHO, keeping both, rq->curr and rq->proxy (latter for rq->curr_sched) would make it easier to navigate through the different versions of this patch-set while reviewing. I do understand that you have issues with the function name proxy() not returning the proxy (task blocked on a mutex) but the mutex owner instead. The header of v3 'sched: Add proxy execution' https://lkml.kernel.org/r/20230411042511.1606592-12-jstultz@google.com mentions: " ... Potential proxies (i.e., tasks blocked on a mutex) are not dequeued, so, if one of them is actually selected by schedule() as the next task to be put to run on a CPU, proxy() is used to walk the blocked_on relation and find which task (mutex owner) might be able to use the proxy's scheduling context. ..." But as I can see now, you changed this patch header in v4 to explain the PE model slightly differently. [...]