Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp719959rdb; Thu, 18 Jan 2024 17:51:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIuuM0BH+jyTHFBQ3oIVMai15TdmRu8D6w9PtU5DZZzRHgXXjO+RiOPvAk5RspFTbSj4Xc X-Received: by 2002:a05:6214:da6:b0:681:835a:36af with SMTP id h6-20020a0562140da600b00681835a36afmr1906793qvh.29.1705629064679; Thu, 18 Jan 2024 17:51:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705629064; cv=pass; d=google.com; s=arc-20160816; b=KgOC0F6sZLWPs7x0J6T4PkDYGagh+/dYb90Ixyv4IykHNjV9SVWVluMCKNSZBY5KE2 GvTe/+Ej4d/MXo1aKgsqNMMFXnayzisgmYCVc5F6lUPwAsitGOt6Qa8esVysk7xYBLkC va10PgwiRvsvMrQEYxSUcd4Modf7HfZKxj84m+iH98HP+60ee7Wv1KbFIjXDVKAUZ860 Z/5wYEZmX4WyUnZ/wDcS6lQM3JbPvKDhxrg3C1K91gU3BqKJ1YqRvvTu7RRC8CxWitFO C/TSHsBQ3QGdJO2Zle/hcDQnj/tTPpBQWOUZMdSnR10YVMSF5blIp0zQb5NIIxBWKfE1 DuZQ== ARC-Message-Signature: i=2; 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=38huTxU0pXTsIWTOQp4P0tI0mktk6V47LUM1nr2Z7hc=; fh=pviyXVmiWwgMDrZLYUy6r3jCkWOmPrANkCzlFT1AINw=; b=vT0Lh6wE553pS6A+5RUH+XGEjPAizNOZBESsVfJVEZ4h3hulJ+Lj/ljkOaIfAAOufe FAaiQPV4Me3Lr3Le5gW+dKNMQWtQjbua1US2u0ZgqbAT6pKTEYQjXKwubDVioufKnSrz cWhL7IdTYFsbD8fZaGOueamSsU/ySDHPo9SbHm80lEXRNGDm+UGiPl7O/gq5Gvb6ZfpP YC0NVhuVEGpcA4Mi8LGV1MgKwZdyHnCwtAq7GOCA+jtBOr9LRYIMGXS1usGNZxlfiPdC Z0SDU02MfTn8KqEAzima4NzZl5U4SILFivuTUXop/XpXq9CnP1YJxqPU1Yy2eHv6Hluh kmUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z0ABaQ6R; 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-30695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s5-20020a0cb305000000b0068182baee1asi4046575qve.407.2024.01.18.17.51.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 17:51:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z0ABaQ6R; 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-30695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30695-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6F9CD1C22A29 for ; Fri, 19 Jan 2024 01:51:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0E784A02; Fri, 19 Jan 2024 01:50:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z0ABaQ6R" Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 6995E4691 for ; Fri, 19 Jan 2024 01:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705629057; cv=none; b=Sz1/BbL7sjpcOCB0IlmYXWaPrZWaj6N1J8GOKZeh6cDOJdbBQbCusFOqH2dbdhBk4xnIvbTIv5lY5DwDBgS5SghOv4Hzl521AehncJ5f3aZBsnNeumXXhPXES6ijNRUZHQZO2lN3VYfRpwES3xPSew6Hjt/AskbfwkOFuNjKDR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705629057; c=relaxed/simple; bh=38huTxU0pXTsIWTOQp4P0tI0mktk6V47LUM1nr2Z7hc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=tizXnjunmYa0fJk9sf1ugg6BZ2w109O0m3GxNQtRnRyHMmb0biCdCwe7JOEyb7bNnQYD7wGSL9fwW+N27r+8PC6rZbzl5WYbqvAIHsUzrSa/0WhfbjBBIOgF7kQZq8ewlf+fpvbWRJqrWHoCC6zAl4o18q+7uSawhUUrCd07nUY= 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=Z0ABaQ6R; arc=none smtp.client-ip=209.85.208.49 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-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-55a070af87eso162110a12.3 for ; Thu, 18 Jan 2024 17:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705629054; x=1706233854; 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=38huTxU0pXTsIWTOQp4P0tI0mktk6V47LUM1nr2Z7hc=; b=Z0ABaQ6Rh07v5h1+4NlW9q0d8DN6z8RcAICxkLEwBw6ydRvwDrJXA3q2UeAZCxzksA UYTTkOQ6ZsEmaO3G1OQlJFRlIMXp5rnSHz+gVAxhRIOFmi4/45hXWZCdtVzz6kdj0av/ m22aJD7tyFgh2t6TTtio7+7DA7GsehhWUVFvIMaDn0+Tc/rlEvoiGtRNzPOaq7QWfzT/ xzWjZRv+7L4RX3icPgkDnujuQU/iNUytCiIeqaGyxLnzBcfnOH9A1V0WEqg8gCBqAmjU fcbLLspovmZAAkPIrNOT8cDIkKzaXGpqJqtHqHPJu1Cpu/lPweQZaFYTQj6T0sUXIdWz 8Sug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705629054; x=1706233854; 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=38huTxU0pXTsIWTOQp4P0tI0mktk6V47LUM1nr2Z7hc=; b=VDBWm4JnGNF3BmezPoNoFtXIuqtcE6LmHqy3BJB1cNRysgqESPYOMNQgUhTR/RP/Ua 0XUhTS0anFuSf/yL+CCmXu9dR+htQQgBiRdHJnwk+F31JtR+yr5DVr4xBSYT11hD1owI wyz3XV4BgZKAGWI13AclAeV6UZffZV6FNvMY+8VQlhSxM89U6gmiy/WmEcpQCcQnuZdq V2LE+prjiiGC6sNgsUKNVXrk+Dt/P3jia23Qk7IgL9G0El9gcKGL3RX9+cPQqYsWzZkD CtQwi7pDZfLHOw79XDrEbtRZjHhUGFxcMwTgpIep9uVmEQI8IgeyRZjcFwK44sLsOcD+ hLwQ== X-Gm-Message-State: AOJu0YywGEbEgQwbFn+ygQfKcohuq4ok8ahfR1qpePbz4aw+VkUm9gA4 gqAJs35XGPpUiGSwIsx/PW1HL1lZ4gTiyU4NVYVYWybvV25P6jHzx/4q0pMldlO1JmXRa+IsqI1 qseiDZ9Oa17LW2TdIia1zws4uasw= X-Received: by 2002:a05:6402:d43:b0:557:188b:eccb with SMTP id ec3-20020a0564020d4300b00557188beccbmr957829edb.84.1705629054596; Thu, 18 Jan 2024 17:50:54 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240117031212.1104034-1-nunes.erico@gmail.com> <20240117031212.1104034-2-nunes.erico@gmail.com> In-Reply-To: From: Qiang Yu Date: Fri, 19 Jan 2024 09:50:42 +0800 Message-ID: Subject: Re: [PATCH v1 1/6] drm/lima: fix devfreq refcount imbalance for job timeouts To: Erico Nunes Cc: dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, anarsoul@gmail.com, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sumit Semwal , christian.koenig@amd.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 18, 2024 at 7:14=E2=80=AFPM Erico Nunes = wrote: > > On Thu, Jan 18, 2024 at 2:36=E2=80=AFAM Qiang Yu wrote= : > > > > So this is caused by same job trigger both done and timeout handling? > > I think a better way to solve this is to make sure only one handler > > (done or timeout) process the job instead of just making lima_pm_idle() > > unique. > > It's not very clear to me how to best ensure that, with the drm_sched > software timeout and the irq happening potentially at the same time. This could be done by stopping scheduler run more job and disable GP/PP interrupt. Then after sync irq, there should be no more new irq gets in when we handling timeout. > I think patch 4 in this series describes and covers the most common > case that this would be hit. So maybe now this patch could be dropped > in favour of just that one. Yes. > But since this was a bit hard to reproduce and I'm not sure the issue > is entirely covered by that, I just decided to keep this small change > as it prevented all the stack trace reproducers I was able to come up > with. > > Erico