From mboxrd@z Thu Jan 1 00:00:00 1970 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]