Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp273739rdb; Thu, 18 Jan 2024 03:14:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHKAsuw9zfXWW9GgePu1l+e2mI+ZTmw4qR6Sw3hi8AtXYH7Eua7dbyLgKRhHPW+ApzSHpjc X-Received: by 2002:a17:907:171d:b0:a2c:cda7:6b4a with SMTP id le29-20020a170907171d00b00a2ccda76b4amr403837ejc.86.1705576494982; Thu, 18 Jan 2024 03:14:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705576494; cv=pass; d=google.com; s=arc-20160816; b=bSvVG1dEcGNu79e8R9p/MzXYGI97vLUhAtI0u9Bsn4Bl5uJnDDZ0H70GvymDVAG6AG r4212GlK/56IOrm2kiqr5FWYthud7/E/9ZrJjSyglEXWIy8B3werY18m01MdnoWpRh5S HhJB/OnISP7UC7eXIh5R1GOcoH2UzclZ+RBI+R73YN6UTuKpa+HEHite2DWWCSlgqaHw aENP7HahmvWBtdmYspr4HMsSZcLJD/E3ioJt1aktl3twOYwGdx1B+sr0LK6IDjZ1C2eq yz1utowyRUjqf3rxDGzFuEATf3ZWCsZQzD0hchcPGprsLCr9X3wRSFkjvpvfcRrVO63t 7dLA== 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=9VE+k6l54CWKcwOP4zGe/Sl1ruOg42q4FivpaiWmeH4=; fh=/sJeVW4dOqmkGwl/hE3kEHsH4Q9sVDyXq0yPjqS5nww=; b=IEKeu9PbybY7vToTNxHaRbLZXExhJgBdLoj9TJTRIAqsieZv35C0phPOOELmKzzO5c oNUZDJGSYLQSfuKy9NKp0Hq6gNP6p0a+BkkLR/YOMMoQe6FUsxmc8ky0EdVanQoqngLq b7vNLNdJMMoDRL7RFp/WmChsOdFV4Y+iryW4oXNJtljk61ZK6RsE9YNxwoABjLNp1LLg zldNGbwR9Yjf9pKK8MPx4P1vCZjBI7TKMXbqp/PNkTEBeHtoJDGxiYiKdeCxpwzz077P JUplhE2Nxp6UHlYAbgmZPQfZlwUbehVU9SPvNHgjQzw3e/jDSc/YNdVm09PO26gZRI1i 6rsw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TKLlCnT8; 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-30044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 qq16-20020a17090720d000b00a2cd76d903asi5326837ejb.96.2024.01.18.03.14.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 03:14:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30044-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=@gmail.com header.s=20230601 header.b=TKLlCnT8; 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-30044-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30044-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BAD651F22ED9 for ; Thu, 18 Jan 2024 11:14:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70F1924214; Thu, 18 Jan 2024 11:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TKLlCnT8" Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 270C523772 for ; Thu, 18 Jan 2024 11:14:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705576471; cv=none; b=We6WRxuxwhWDsmVfUFlg+hfaN4P8R9GCFjtP4/ygKAXrA/smQQaCDFxJbwvq1xkDxXcyszE9JV3N5U+EKNrt5bsgp2OUkC0gjNpNm5OOtXh3qdnyEIyu/EJBitz3hUkwzc1W0LWH90umeIqn14ayvVBLbC0xHwAbQQs/M/l/mC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705576471; c=relaxed/simple; bh=9VE+k6l54CWKcwOP4zGe/Sl1ruOg42q4FivpaiWmeH4=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=H3R7cZFwIUNym2aSE6Ai0rEMQ7Uv7rhtbMWHGhNoB56imFN0aXXEMomSLsCTUj6hhW4RxWKwue5KAq0iPPAoVGjc2LEPBhoLwpg2U40G7oP8rPkgKLWXJfGPuZkjAC4hwxMFepUtiIaTxkmZjpPI81e4FADS65NZ3U4/wlhJ/8M= 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=TKLlCnT8; arc=none smtp.client-ip=209.85.208.174 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-lj1-f174.google.com with SMTP id 38308e7fff4ca-2cd853c159eso92753321fa.2 for ; Thu, 18 Jan 2024 03:14:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705576468; x=1706181268; 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=9VE+k6l54CWKcwOP4zGe/Sl1ruOg42q4FivpaiWmeH4=; b=TKLlCnT8EXQRuPLxpitYcLPEQ1Xnzwk03+GlkHA9hJZDfM6g+k0kjt1AlPUBYO6QfW v6mH+GjaZJiVxPuoPuA9XGLg57rbfKIJ1ngxQY6aOSpeOAFCbYNhSK7soD8gAlEQWaNt imM1RQ6kF4jaPBCNSuJh6En8pfmI4AqqZeAk4tsDVZMR2bE4gC1yxuAXVe41jq1lrLuu 2V41asCScaHGmqlLm6yDKzoXsahQcsHEE7GKCXQbGMH2mmvTozRQ5MqtNNZMxUpxHgp4 LsEOKAclp3UH7v0AGYGKOzgIoTPssVpIdiNVp1dq08hMIJyfjF70PJQTozfuKCAy21Ww enPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705576468; x=1706181268; 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=9VE+k6l54CWKcwOP4zGe/Sl1ruOg42q4FivpaiWmeH4=; b=FTHYka+Z9CebJ3chKtigtMWQ1K/CrZ1kQrNQdx8sEIV5Zsu1nJu20ECDn3T68aEw0p khEa1PHWew8g/9Sv7Dao9r7adie7Y1HjksA9INJfJPBaY+XkjX+WwUS+0SILsyey53G+ MGMZ5SUsfDWSmn2n339i/n8xvChWhlPbyR5aOt/FTXqGqZXelR+qX4jGLEcR0x6OAatc DMzwPE00f1Veb30bMsKyw11JVhYvuVzZjloWLQgVzrHY9yf6kUweo+lfHT/mY6K0E1T5 7d8L9JOHsACkhUb+duvcHunFeKmXG8Org8K80zKzpkl24Qpbutff5+CYIX8Q9OLqTQY5 jkFQ== X-Gm-Message-State: AOJu0YyJPht3B9f9PDEPWYkEdyHQK7Z1QePiPSt/Rurixvt2zdopMDKN mkPe4dIqAV0/z1YdD/Y9FLHUpYv+auXuXkAROnH8KgW3k/aoSSM6oe1tyPzjirjXds4biflPBxZ 8+T5xSZp1x18XjceZnWNGIWILzkw= X-Received: by 2002:a05:6512:2813:b0:50e:d3dc:2645 with SMTP id cf19-20020a056512281300b0050ed3dc2645mr499069lfb.87.1705576467890; Thu, 18 Jan 2024 03:14:27 -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: Erico Nunes Date: Thu, 18 Jan 2024 12:14:15 +0100 Message-ID: Subject: Re: [PATCH v1 1/6] drm/lima: fix devfreq refcount imbalance for job timeouts To: Qiang Yu 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 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. 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. 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