Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp295597lqt; Mon, 18 Mar 2024 08:07:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2ycLnwPeNeLee986+rE/FYYzKDbUZVUmp+i4VktjcTQpiKRVdvULc5gda+yczg9u8s9xOSBT8E0Bg0zAjxrL+R3zVud8/Q7MpLOArjg== X-Google-Smtp-Source: AGHT+IEzUpjZbR5f1S6g4xtdr1tDDGEpeNnVv+cy2TMUIxcTe0ky+6bWO9lu5otulnFU6U0JH3yc X-Received: by 2002:a05:622a:1702:b0:430:c51e:1608 with SMTP id h2-20020a05622a170200b00430c51e1608mr7684741qtk.41.1710774440590; Mon, 18 Mar 2024 08:07:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710774440; cv=pass; d=google.com; s=arc-20160816; b=aXQmXZjQcXPlpPpTO1e++hG5GOBPMLd3X6Qu2jqW7wPgmDjspxVpRBTvW2+/912lq4 nnRTOskzQ58ZXOzkEBh6e1HGLyRqD5y2TdLyiphEVBNc8BDCiNue7IOPEt4jRjPnfK6N HKYxAIFh9TsGOFkUUWAO0vKvycXVag+fgw92fS6npDgU51hS4CT4WvweU6lqQLHGDJy/ OzInbmHdwNk+UmNHXochzBnFo0lnYLKEzmDzcBpINLp8djI9wj47HKCYSTSroLC96c1r O5EQ3wxKitX8Dg5w5nKPUaf7D2biD8NC2ly5augNNI0mneA9VRUhHrEBXC5LKaw9niUV bRxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=LghrkC0jrvyJatf2rNYjyKl0lPkETUaVLI3e6P4AY7w=; fh=VsmtgmY8uhRlz+IPlrp1oZmmFbNtaV1/N69EtU79F2w=; b=R2s/9gZ6Gs6fu8ao1NHKUayJBfUS8gAInC/g7aQb8OoA5WknIkRyBznp+uJTQVA6pJ HMS2KLPsGvMcbkR30GNkz2N05J2fhyE1eisTibI0ApFIWfrYFTiq+o19Finx+xVti/W0 XAAWV5PWM5LmbQZaTnqnUu74QY/jkxbKE5mmFjhrf3EZs11nMTwil305N9FH+iLWhADK nVQOC9Ix5SQRamtkOL9TgWs+VX1jRNLFym/HWWfn9pF0L26Z+KiUHhQQRUJmL9vhdVE/ M4MgzluU2K1mr2zVztR9H5WZIH7AOZRRAfiIU3iAYmY7/KNfYgDRa2GkNz0Yvq07nXvE Wh1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-106266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j22-20020ac85c56000000b0042ef5e3fb24si9600044qtj.767.2024.03.18.08.07.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:07:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-106266-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106266-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 540211C21108 for ; Mon, 18 Mar 2024 15:07:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0382B4F618; Mon, 18 Mar 2024 15:06:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 971CF4F200 for ; Mon, 18 Mar 2024 15:06:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710774417; cv=none; b=UrKhFcsBnHmPphTAIUgBVY4rY4kKkV0a0wwQOQlahMYBTSgpBKo//MJ9Eimxx6crlDm0c19mr5k9JpJsDZh5LOz+BIshp219aE8clK0T2S5h68jsnRAYAbOq9nfr7BXXhu7mbabWvLoMNbZAMYVEBUs78JzNHC5tg8/+fQ+grNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710774417; c=relaxed/simple; bh=8CiKkjy2UKGbaRU8y43ZLz/sRFNefmjZtk3HE1ejRpE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oyTTAVSSXeVHPH1KbrWkMf6LOKgwErAvis1nsTGM3CZ+RHf56XNdvz41tV5K9e+kWRphz958oYJJ8Jh7AQtuCfZq1jl+ZT7wgLjxhoAXsFrRvIpYu6zSqzQBrG43AnG5Z8hFRP4ekQ4sR2Su9e+aeaYcyJN/0ffBl+HiwGawIq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 C3F25DA7; Mon, 18 Mar 2024 08:07:29 -0700 (PDT) Received: from [10.57.95.135] (unknown [10.57.95.135]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0006F3F67D; Mon, 18 Mar 2024 08:06:49 -0700 (PDT) Message-ID: <496a2f13-2d66-48f4-a710-afbd90f1bfd8@arm.com> Date: Mon, 18 Mar 2024 15:06:49 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 7/7] sched: Split scheduler and execution contexts Content-Language: en-US To: John Stultz , LKML Cc: Peter Zijlstra , Joel Fernandes , Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , 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" , Xuewen Yan , K Prateek Nayak , Thomas Gleixner , kernel-team@android.com, Connor O'Brien References: <20240315044007.2778856-1-jstultz@google.com> <20240315044007.2778856-8-jstultz@google.com> From: Metin Kaya In-Reply-To: <20240315044007.2778856-8-jstultz@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 15/03/2024 4:39 am, John Stultz wrote: > From: Peter Zijlstra > > Let's define the scheduling context as all the scheduler state > in task_struct for the task selected to run, and the execution > context as all state required to actually run the task. > > Currently both are intertwined in task_struct. We want to > logically split these such that we can use the scheduling > context of the task selected to be scheduled, but use the > execution context of a different task to actually be run. > > To this purpose, introduce rq_selected() macro to point to the > task_struct selected from the runqueue by the scheduler, and > will be used for scheduler state, and preserve rq->curr to > indicate the execution context of the task that will actually be > run. > > Cc: Joel Fernandes > Cc: Qais Yousef > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Juri Lelli > Cc: Vincent Guittot > Cc: Dietmar Eggemann > Cc: Valentin Schneider > Cc: Steven Rostedt > Cc: Ben Segall > Cc: Zimuzo Ezeozue > Cc: Youssef Esmat > Cc: Mel Gorman > Cc: Daniel Bristot de Oliveira > Cc: Will Deacon > Cc: Waiman Long > Cc: Boqun Feng > Cc: "Paul E. McKenney" > Cc: Xuewen Yan > Cc: K Prateek Nayak > Cc: Metin Kaya > Cc: Thomas Gleixner > Cc: kernel-team@android.com > Signed-off-by: Peter Zijlstra (Intel) > Signed-off-by: Juri Lelli > Signed-off-by: Peter Zijlstra (Intel) Duplicate S-o-b for Peter. [snip]