Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp364547rdb; Thu, 21 Dec 2023 11:16:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFki5hpVeaqmX8VX/T2rx4Vb7M6jUdhlFQWrLaKyPaTAMGS6reGFUtGx4yN+jsFZdVkPgcg X-Received: by 2002:a05:6a20:3aa7:b0:18b:b02d:8b6 with SMTP id d39-20020a056a203aa700b0018bb02d08b6mr176672pzh.23.1703186196453; Thu, 21 Dec 2023 11:16:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703186196; cv=none; d=google.com; s=arc-20160816; b=VOwq3eLiPPfbf+7s1wrNZ/wiuUDhVyIGWUlc+doqMbg8/j90hkR3eHolFbg4ZU8X0u xGkimyfWiZ4HEa9J6G0tXaaVPEetXfavP2SiMVIk7BHWjixs4uYEwrJiC97eSFIy0T4D Sc+alucVinL6SF/I5fHkLoSCXzB+G5ZI+ol91tGRT9b4P8JhiGzbf5yRf072sSvZExXe m5UpIu5kEPkyQ774BRxwtHWmUMJIpOb2YFeGH9dWwL6TlxBauA9bp+3Bz0sCpncohI5u f7BZy2HyVwlxP9awU1hueyPUC0XhJw+srbec1t21LsHBnB1s8frUcG0SLNR5mrT7nIpu 4UCA== 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=e90K4qZIf9yF3Qb2DxTqaVYaALzE9Tmgc/m/F56fP/Q=; fh=BNf93qThzKvcNrUblroeKiFR5/RdNi9rwKlfD7f6Nmg=; b=qQKT/RjCv4xagMZn8Y+z813SwFyKjfEKiPbJFntDZ1hMK64XqXLRiE16G951SHANJz rNyXxPBSECr+sfOW6stiFdY5mF1rcM5eO0us1kG9hjdaCs0Jx9Ejl7z7T77iqLgBeHHd EwtJxOKrIEJ5f8w64EBCegEctG93o+K8UCJ1gVw66U4D7E0mN1ffXxIwYLXpH1Q2udp7 4qKJ7jn2jdhDtdfXBf4CFe3BpjvdkvMYqaKzfRqWYxbTuwrhRqlDn6dMTsBT/gXg4xss t3yzOqUMBF8tYVQsvj9I+hUw0xupTVp60hORJ/DTWvy1AcVQozT1S42DMzNodOre5Z4H m7xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=HAdBEyyb; spf=pass (google.com: domain of linux-kernel+bounces-8991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8991-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a19-20020a63e413000000b005cd8aaec135si1950467pgi.275.2023.12.21.11.16.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 11:16:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=HAdBEyyb; spf=pass (google.com: domain of linux-kernel+bounces-8991-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8991-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id ACE88B24081 for ; Thu, 21 Dec 2023 19:14:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B55F1651B7; Thu, 21 Dec 2023 19:12:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HAdBEyyb" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 6CD61745EF for ; Thu, 21 Dec 2023 19:12:23 +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-f47.google.com with SMTP id 5b1f17b1804b1-40d41a32effso10175e9.0 for ; Thu, 21 Dec 2023 11:12:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703185941; x=1703790741; 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=e90K4qZIf9yF3Qb2DxTqaVYaALzE9Tmgc/m/F56fP/Q=; b=HAdBEyybTFQxqBS3YjRoFdJQr9+qSTa4ylLimwgpgmXDtxW/h5aHppmcKFj+p0w2wi OX9lPoyHrfF7eG8bKwT5rWpW9CrbBsVJVDpjsGY7lJuBXagNlJB/PP0gYCqvC4GWMZ2E OXi0BXWV3E0ACzPm0p0siheBSA7vvPNhivhZxrXpUvWpE4JEBsm7zSbfCykdSL3n5wc+ k0kK+81hP5s5Jh+zKYkAp7rjctCo9XAEDPNKHHjtGQAxfmGQpOoZ3HeFllA1oXqRbryK RzYeDPqu0ILwNjUlyY8yHI72wOMiz+Qs+VL79Sv8mgjAYDtNYATOR/cvXxAqfwys25e/ DOsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703185941; x=1703790741; 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=e90K4qZIf9yF3Qb2DxTqaVYaALzE9Tmgc/m/F56fP/Q=; b=W/wGI7+gRyAtxwo0BtK4frSvnEr4corCqhM+nW6efEBRvK6vdAM8qJKbj4vcWSvkv1 FzJWrkawN4xzcl4XVdSv2VxYWkuoC74GxgSF8bSYgT+zNprWcXXlvF6XmDbA6Vx8iGxu gqTWhyidDDHO8ZfR757jOWVQff89kyEry8SuHtoQAM4g/3taxf7q+A2S6a6kjrAtiRPx l7zKCWzTNu/Ip2m8TgYyQCtWo/PhoULsUoTqZOIZbRPxkAcrpcjr3W03aGT1uuNQq4XF eHpGc8iwdtnAavvSdxzRKXM3dm4kn4mTbPkdweNzOW8saIpR2I2dM5HJsl66bUTo4WTt c7xg== X-Gm-Message-State: AOJu0YykYybNv4JqljyGmXhOHV+C38Mju0bVvq1vDELZLPY9sjb3ifgf YAOa8mtLoQ6lz/gJuRCrYR/euYdz5WtuyO1WsYOZNlC5MXk= X-Received: by 2002:a05:600c:3b1b:b0:40d:3f65:7e8b with SMTP id m27-20020a05600c3b1b00b0040d3f657e8bmr5014wms.1.1703185941456; Thu, 21 Dec 2023 11:12:21 -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-12-jstultz@google.com> In-Reply-To: From: John Stultz Date: Thu, 21 Dec 2023 11:12:09 -0800 Message-ID: Subject: Re: [PATCH v7 11/23] sched: Add a initial sketch of the find_proxy_task() function 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 Thu, Dec 21, 2023 at 4:55=E2=80=AFAM Metin Kaya wro= te: > On 20/12/2023 12:18 am, John Stultz wrote: > > > Super-nit: s/Add a/Add an/ in commit header. Thanks for catching that! > > +#ifdef CONFIG_SCHED_PROXY_EXEC > > +static inline bool task_is_blocked(struct task_struct *p) > > +{ > > + if (!sched_proxy_exec()) > > + return false; > > + > > + return !!p->blocked_on && p->blocked_on_state !=3D BO_RUNNABLE; > > +} > > +#else /* !SCHED_PROXY_EXEC */ > > +static inline bool task_is_blocked(struct task_struct *p) > > +{ > > + return false; > > +} > > +#endif /* SCHED_PROXY_EXEC */ > > + > > We can drop #else part, IMHO. Because sched_proxy_exec() already returns > false in !CONFIG_SCHED_PROXY_EXEC case. Oh, good point. That is a nice simplification. thanks -john