Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp8016552rdb; Thu, 4 Jan 2024 16:02:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IESsTMKAysJDAxKW9FN7RaITAaUgQDIgjiQe8B0FbMeGP7Ecl8mOV9K5IO1o4UaoMOXgM56 X-Received: by 2002:a17:906:1c99:b0:a28:b90d:1ea8 with SMTP id g25-20020a1709061c9900b00a28b90d1ea8mr750488ejh.106.1704412940650; Thu, 04 Jan 2024 16:02:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704412940; cv=none; d=google.com; s=arc-20160816; b=Gx+UmSum65ockiTxGT+6lqMu3Fap8Glp2B5CuwBuoqK37Sb/7q/xm8YtRtEXaZhjBn E0My9eS/JNmQ0I6QNrTM6QA7WZHPzspf3U1Hz83tYHlI5ZOo9pdoaTjjkDNotl9QfFDk slcg+iy+DN2zFkROwtvgW0cQRMFu8Wt1cEZ/vM8LryqNzHGY1FD+RA0NDLJyL/VBlVth QodvxfVyRvnTVEK8rxsQN5AET2i4gTdcqdweHzF9YzvLnXAQ9nqABMXCs0Jx/FVR0per oKEHZx9/0gqmbh6fo+eDw0Kp/PLMfYxM7UjvLA+x1VET05GcjdzospNYrQsy+sGwa3yn lXuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=wHXMgAaiDvuCEzzjXysTUSyo+GMj9feMZFgLfjlT7GE=; fh=BNf93qThzKvcNrUblroeKiFR5/RdNi9rwKlfD7f6Nmg=; b=dRTc8+l6ZybLVoGVlGYKv43GxYw6I87P83EsarcQOiJxzge7yQW4t2SdkDx6L3NmJY y7WiuizK1jWal/k60PfRLfm+24JMnIed5vA/OdIwste1xtukCCtVPzScCa7u+czdlSgc PdC3YlYCbKF0ydjaLeiqiZ/26Fat1Vxraf0uyn2/jg3zH+kg1KqNK7h2CLkutQ2ZZ/kc WPVBp+/nqrR8Fd/koedms3eK9ZqVIcxtR/OGJhxtLgnPhtYCxXWZJcmLpApPPXr8cgFM C3G5FdqZsshMqVjJVy2oayzwYmyqHRWZr0cCx5aEfCXOVFveDPTIOywHegXw0P2gv+hJ HqYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3GWR6bCA; spf=pass (google.com: domain of linux-kernel+bounces-17345-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v14-20020a170906488e00b00a28d190f5e6si142968ejq.782.2024.01.04.16.02.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 16:02:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17345-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=3GWR6bCA; spf=pass (google.com: domain of linux-kernel+bounces-17345-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17345-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 61CE81F22F6D for ; Fri, 5 Jan 2024 00:02:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 648735396; Fri, 5 Jan 2024 00:02:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="3GWR6bCA" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 140095243 for ; Fri, 5 Jan 2024 00:02:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40d3102d5d6so24145e9.0 for ; Thu, 04 Jan 2024 16:02:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704412929; x=1705017729; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wHXMgAaiDvuCEzzjXysTUSyo+GMj9feMZFgLfjlT7GE=; b=3GWR6bCAq66TTVzdKEKjBYK02rGjagn5O/rHZNyILgGfZyf/GA7sQahxQIs6cfg5Ji FWIaNYc2vFWwDTUqkIE7gd3oHRN+fjBV5lle661cY5UTvRkdzsjr57OYQXVbBfHQswDk VCa3pABkKn43+2aNMh/JfWdBm0P+IBpnK9e00VNvAr1WHaofVyhexOFg+SF66Zb15bjO nLv0XZ9ZwrUlDi8EssT+G6c6YXz4lqpAQzbDFS89Upi6vsSyv4lF6iKibiz4zP/yDw5L gOKyvooA7h2WwnhEVFVzkPM/RU1Fe3x2dlp1wM92vyc0vIk2Z8w2ADCD21U1ddewU+wf qUXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704412929; x=1705017729; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wHXMgAaiDvuCEzzjXysTUSyo+GMj9feMZFgLfjlT7GE=; b=nEMwjhXiCHgl76A9XkbcgMM4BFZqmdQoPhcqJurLOLjDqYS5IDbYaBogqbOU3dyGw2 x7WNOFce99YVP0Yrrftc2j3UN6I9nFJ25PGNvQ3e0jneEBnBjT2XAJlc06erkDSYi7iR hecJ75yTOZ1c4cJ6XqafhxQ6Ylv9GV73qzfz+FOfRhT98sBrJTU4tWWtfCEObOeWWXMX ufaHHM8rI6TmzFxY9eOLKK7mSnP2W3MDSuzO69j5eWW+rnC8YGZySHAEm6gcajerBJ2N 86wgEBDJtIFAiuSuHpzlnRKAapVZZbqiOaMbksUR93scwPy0hl7eMWntZxKl7Ko1F44p C1eg== X-Gm-Message-State: AOJu0YyZJyEC33EHF1OD6Upz66suqt/ggbgjH1OZPI7nAkv11+yMjqXc ZxO88VkHgZbg4giofegZ2+jG5SbRzO76vpsXWtLGOKNgl/8= X-Received: by 2002:a05:600c:3546:b0:40d:8496:449b with SMTP id i6-20020a05600c354600b0040d8496449bmr61966wmq.4.1704412929202; Thu, 04 Jan 2024 16:02:09 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231220001856.3710363-1-jstultz@google.com> <20231220001856.3710363-21-jstultz@google.com> <5e57c957-724a-410b-8137-88fd9bbd10d9@arm.com> In-Reply-To: <5e57c957-724a-410b-8137-88fd9bbd10d9@arm.com> From: John Stultz Date: Thu, 4 Jan 2024 16:01:56 -0800 Message-ID: Subject: Re: [PATCH v7 20/23] sched: Push execution and scheduler context split into deadline and rt paths To: Metin Kaya Cc: LKML , Joel Fernandes , Qais Yousef , Ingo Molnar , Peter Zijlstra , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 22, 2023 at 3:33=E2=80=AFAM Metin Kaya wro= te: > > On 20/12/2023 12:18 am, John Stultz wrote: > > From: Connor O'Brien > > > > In preparation for chain migration, push the awareness > > of the split between execution and scheduler context > > down into some of the rt/deadline code paths that deal > > with load balancing. > > > > This patch was broken out from a larger chain migration > > patch originally by Connor O'Brien. > > > > Nit: Commit header is too long. ` paths` can be dropped. Done. > > @@ -2079,25 +2079,25 @@ static struct task_struct *pick_earliest_pushab= le_dl_task(struct rq *rq, int cpu > > > > static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask_dl); > > > > -static int find_later_rq(struct task_struct *task) > > +static int find_later_rq(struct task_struct *sched_ctx, struct task_st= ruct *exec_ctx) > > Nit: line becomes too long. Same for find_later_rq()'s signature above > as well as find_lowest_rq() in rt.c. While I do try to keep things under 80 where I can, it's no longer the stan= dard: https://lore.kernel.org/lkml/20120203100743.GA3334@elte.hu/ > > > > - if (task->nr_cpus_allowed =3D=3D 1) > > + if (exec_ctx && exec_ctx->nr_cpus_allowed =3D=3D 1) > > Can exec_ctx be NULL? If so, we may hit a seg. fault at > task_rq(exec_ctx) below. Oh, this is a bad split on my part. Only after find_exec_ctx() is introduced can the exec_ctx be null. I'll move that change to later in the series. thanks -john