Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp31024rbb; Fri, 23 Feb 2024 10:40:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVjXr4M/xMsEH4o2Cs5Ue7AjjC1pP5/QlvuR1R6HSBOS0XOynNqZ7mpQY7PWMf+nOphQ+EZ/KnTo7VaJaHQhpc1WJsLUmk1lNgnhcxmxw== X-Google-Smtp-Source: AGHT+IF5xyMbhzxOmzkEIT75nVXySvFnX2XYXQ7rcFVUdsSwykHWZ11TyOK22KLj0pWrCbtmTNcI X-Received: by 2002:a17:902:c943:b0:1dc:7bc:3527 with SMTP id i3-20020a170902c94300b001dc07bc3527mr853395pla.19.1708713610440; Fri, 23 Feb 2024 10:40:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708713610; cv=pass; d=google.com; s=arc-20160816; b=iJJVmPMfrqVGm0RvsaTTvCD4pcriVPVJs69g5tuG671uMCO4urE4rEz5ezsMkTrCI3 7sy2Gd9yv4pK6aEHzg8TDPL93vwhn2kGVq4jIcvx9I4mOXJJZTlnBCeeUquKHCMM+cNi 4B72AWWX8OrMgvdmzR9FAvbLZ9Y8J7iax7VRJ0bTJnZYWtNmG5YWeC3oPFHqlbRVpQBZ yqhMoAidJvNt0kNuUstuUFvkKCDe/R69WbIPvinhX1Q1n3X69ZUAJuGw3NUkISWL3kFh Qzf4Aus6V597orRRPFKH17eUPti/8fec51qz8zVgEDalPO4r7EM2MBqr5KCmemBlxJ8C /Suw== 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:dkim-signature; bh=uvmCBum3obDIzEvJJBYCmhBj4c5cWpFkxhaUjZo6Kko=; fh=VZ/RmGlaqlQzontECnuzwekyxIgHM55f1V3WZfyuGE4=; b=XtIfl02OGqn5ifgjtoQ2CPV4DC878WcWEr553EHJcVVTaX7k/y2eNN6hM3ZOhEnR27 lU1WyCD8whV9ETv/P7zaZnTcRs1rE5u+tx7mnbAlDh792pt16PuHIe+Fs+E7EX0+Sm/e PPl7qjTfVb47esaSgfgT/tJAatCJrm7GMik0mzCm+wmmYhLCQKhK5ODj/IAEwlpWCuje Pun+HjClLmTE2jyzxanmE0xgc/XRNYPrRryuf4m2Qyc6+FCct4DVcg4Jp5cpwI8CnTYK dOArn2jVY/5LBSmEmZFMpLZQgNwsVKbWra7hEjRwGK+levS/DPHuWBvi8uHMFcyxBQNA +rYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="jrLpW/XA"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-78969-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78969-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x18-20020a170902ea9200b001d991a0da23si12226386plb.102.2024.02.23.10.40.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:40:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78969-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="jrLpW/XA"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-78969-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78969-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DE00B28BD0A for ; Fri, 23 Feb 2024 18:20:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1923E143C43; Fri, 23 Feb 2024 18:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jrLpW/XA" Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (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 3E44414263E; Fri, 23 Feb 2024 18:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712443; cv=none; b=X8de8bc8EZW/CJ+LAjVbPtyRjI+v5/ULVoPU1oSAoO7jkofKjgbOYfjMsTfEhv0osFLSyJXq7QqOzzjoYhzDVlcQBizqKfsVombK9S4nxWHrm/rirR9zOxlY6F2hHY7pRgZxAIs6dDhLaVveYyTCNnGrNN9onUi1GXAractLA6g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712443; c=relaxed/simple; bh=4Qrvq1AhP6eyIkuoH88pa0hlk5TiVVHr6E9tQvZNksE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BPTv6Mavb8Y6eUlGkIEzWUuPnE90mIVLQqLEXJG5re2ASKKMEhQ51TKTf6HV0+1cds6lIoarLkdyS+5dhOh0wrZtDEeSUdhQR5eP+wQWjdkr/g+bKYVqBVxFUM2Nunzw/gsKxS6lah3EE4svFtulB7n4WR4t9Spx00wm06A3ce8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jrLpW/XA; arc=none smtp.client-ip=209.85.215.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-53fbf2c42bfso999005a12.3; Fri, 23 Feb 2024 10:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708712438; x=1709317238; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=uvmCBum3obDIzEvJJBYCmhBj4c5cWpFkxhaUjZo6Kko=; b=jrLpW/XA9Gpvqhw2vvohkxecNbvp2boguflh8dUqSnJ7otPwc2uXpYjE5dO20hdeuP EluHRC6NhES11Iq+xbCEOcl9lsXXt14u7UZZJETWX9zuafRWtX2bc/t66p1nnkVLNLF9 VfADDENc5cg4P6UQuWDGGbyDty5hT+bLzWVULGjgZf1HLYfLQZOVmjHRalfifH/or/Av JdWUjM9SaUbjFQotcp0anP4rmO10F4vLp32KbThK8xH9IgRzQOPNl6GjPbtBOCbuv/uY zeGoIJruytT3Q1qdZntKAvJPVWgNaHs+N0gYe1A28bl10ve5Hsdc4dEwZAS6BS4pHzXE 55hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708712438; x=1709317238; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uvmCBum3obDIzEvJJBYCmhBj4c5cWpFkxhaUjZo6Kko=; b=lhUIVWehDyaUXA6h4XSupE8bOdd3wu0j9YRPH9FH77soo9tvbcpZbsZtnrNIAKvQHg 9uND2FWe7Z7fQIHmfYes9fnTW4cjaOfdhxiTCoEsEp+4a0yKWRTRMcgh3mHoQKK0/imc QVZ19GhqkOFT9w85ntRj7VynWTpmktiWTD/DBsPQ6dZ64dwIvX/IHSyUkarvPow04EgV 8L4fQuC0QgdH8eP56UTcDlmhTn0W9qf0ZohHaZ1y1Bj6cTjfXnFsimBMSPybTmhCiVo/ Z8LtwRQhnbiTs09VVDDn6xuA/NbtJpRyKRKp1XzakLJOUGFljWvku2BiWqmdsfrG+VZk tNMw== X-Forwarded-Encrypted: i=1; AJvYcCVBqQsdf9keqRJ0PTNa4BpEpE5Ms/tWxl+xpPQcOTvgbF5RwiljKO4opp//uccC48QvRXel+uPhJ9nipsL462hxtMYUOqOHExc= X-Gm-Message-State: AOJu0YwVjDAbJLWQ6CjFlVlFGx+1tagegCczdMKV95HZqbhQQ2lZYagu y7q+fgjsXespj9iV4DyeKC8z2VadTHtXwmhPEoMzciVsiPQsmaUg X-Received: by 2002:a05:6a20:4c9b:b0:1a0:ce31:128b with SMTP id fq27-20020a056a204c9b00b001a0ce31128bmr519668pzb.34.1708712437592; Fri, 23 Feb 2024 10:20:37 -0800 (PST) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id t42-20020a056a0013aa00b006e06b8548c3sm3986146pfg.139.2024.02.23.10.20.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Feb 2024 10:20:37 -0800 (PST) Message-ID: Date: Fri, 23 Feb 2024 10:20:32 -0800 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 v3] PM / core: conditionally skip system pm in device/driver model Content-Language: en-US To: Guan-Yu Lin , rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, petr.tesarik.ext@huawei.com, rdunlap@infradead.org, james@equiv.tech, broonie@kernel.org, james.clark@arm.com, masahiroy@kernel.org Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20240223143833.1509961-1-guanyulin@google.com> From: Florian Fainelli In-Reply-To: <20240223143833.1509961-1-guanyulin@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/23/24 06:38, Guan-Yu Lin wrote: > In systems with a main processor and a co-processor, asynchronous > controller management can lead to conflicts. One example is the main > processor attempting to suspend a device while the co-processor is > actively using it. To address this, we introduce a new sysfs entry > called "conditional_skip". This entry allows the system to selectively > skip certain device power management state transitions. To use this > feature, set the value in "conditional_skip" to indicate the type of > state transition you want to avoid. Please review /Documentation/ABI/ > testing/sysfs-devices-power for more detailed information. This looks like a poor way of dealing with a lack of adequate resource tracking from Linux on behalf of the co-processor(s) and I really do not understand how someone is supposed to use that in a way that works. Cannot you use a HW maintained spinlock between your host processor and the co-processor such that they can each claim exclusive access to the hardware and you can busy-wait until one or the other is done using the device? How is your partitioning between host processor owned blocks and co-processor(s) owned blocks? Is it static or is it dynamic? -- Florian