From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AAD23B6C06 for ; Tue, 21 Jul 2026 20:36:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784666207; cv=none; b=MwxnH+zXpKiEAcbqPzi1ISS3va8rpj4qKkGPPA4260UVCUwzgo+q1SBgyJ3k9E83JgvIpWSW75CXXthgLGcMNSK6hkbLo4zOYsxSG2bZwdN1qLyJ2RDg6BjMAx4HWLi8UV7aelvBLzGiHf45mUCzCxMCofY3NJN4GLwEOO/0qdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784666207; c=relaxed/simple; bh=Zux0FQwqS5dqbu+u3nZlsMBVqV5QPwfWD3UCTLe1nKU=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=fsMD8NV1J7hMU+KjZeeYheGxKhh+waP6YAm/6bVW0zovteq2nmoIaiH+sP79kkChnx02K/5kalZX/ozPT0q7HXjVCw+McCApOeeCm2JXM2PnVy6iGniy9OZLDrkUVm9lLKYK817PHuB0ISTGjdbRte0w4osIfJBfdUf6/DALma4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gHW+XIjd; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=ic+5H/J8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gHW+XIjd"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="ic+5H/J8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1784666202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zux0FQwqS5dqbu+u3nZlsMBVqV5QPwfWD3UCTLe1nKU=; b=gHW+XIjdr3Z3jFdEEBBWx/L3MJ5mj26agwL2i1DXZWeBPx9KbWTSK0iEIcyPUS4fNAbVBi NcwtEcCH4dWpfQl5wuAYzm9wtc1J3gp/m3/zE+utsU+Xn4CjOTwqZnHbHmp9h+33pQy/QV awlbLLshwlSxfQBkIidQbH2LSn7+EMU= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-74-IKAaDJqnOoqd8gRFs11eUg-1; Tue, 21 Jul 2026 16:36:39 -0400 X-MC-Unique: IKAaDJqnOoqd8gRFs11eUg-1 X-Mimecast-MFC-AGG-ID: IKAaDJqnOoqd8gRFs11eUg_1784666199 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51c01ff996dso94443211cf.2 for ; Tue, 21 Jul 2026 13:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1784666199; x=1785270999; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=Zux0FQwqS5dqbu+u3nZlsMBVqV5QPwfWD3UCTLe1nKU=; b=ic+5H/J8NEHtxg7oGc+EbNjNW1dduQPwiuaTHtVIkH764MfEYkcMmJhas9Bg9w9llP DsOtDbFigXGSThDMXS0iQSVdAZdYYbZ/D0aoX1vhXvDtZnPSjCnyg7Ek7oVvvRGGufrN Ucj4nfWK94JyYeg+zZqnBCojAUQqLY2+MNY+7hbCvRFNr88gP6Lb6HXaB4Cg2fUzUWkU iIUfQuaxFmW6YZRZ+uWg8cSMpcfNfBhLRx9evspV0DwvtGLIuk+YrgwJ8ajW5cVRGp4t VwrmQeAqRGbvyFwVvpoGz7yFQSytl367v1c6VICYseH18TSYUoU+ZZHWuDeEjUAlF1jY DBWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784666199; x=1785270999; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Zux0FQwqS5dqbu+u3nZlsMBVqV5QPwfWD3UCTLe1nKU=; b=UNZeKm4j72SV+46MdMgooKs3dTcR678xot24voS50T5fH/5N02+9Ml8hbNuuCv2XyY n4CnwEaeG6s1yZZt+0m01wWvlnQz95sjoPdxY6INrTgaTvZAcQ20Xe+RHbnJnZg/OUo/ xhRtw7PpDWwTXv7wpi7CFF0y9njZ6HmpcRG9Tyz/a370MHdMhvf7MGfjdijLDm7wPD+Z UAi354VjtxKRwVC5tJj1I/0qIKNcWjniWBzgZX+ZYfk7diZGTSAbQ2Q8Bstmr8TFPpBH qdjG4g5+orw/U3zrziBsXwD1cE8hkKKnK5bvwMkyz8xJhkGsHJbXwQn4n9Hy640PK0Is 7rLw== X-Gm-Message-State: AOJu0YzQtlJdhJg3aRdAt3RfaVkRcgFT7zcchrmKthqWGOZqukrPefIK zQdlqqVjNY5p0jK799BOJyJNEvYdhNdCz7LXXVaXz63FMepLBFtO+27k9SbXSVuAbQ+Vi2xaDi0 gFewZ7D5Ah/qm/UMnP9/vUQI+9coOg5gtDCb969U49/yu8IuQY6upUGkuSp+Fey5YNQ== X-Gm-Gg: AfdE7cnKZqcPCwM2tISXKhaXW7+hU6CCzabz2Pyi/7vW392SKe3c6XG1jsIGyj0Uj7W 1JYAaJMYV2Oga7WnT35i8gS7Jp7Z8/iEbhwSONTWhIz9Hrpdg/fHAT9Vw7u6kBMfDdjBB2oR+e/ KeuHtn456vXGBnt6o/x6vEBqhoVL7Ss6WL1ZPn9w2x+UfW4vAppDr03oMg75xfjsNyx4Jr0rahf DFWwOwAbKpnLEfNNFO0xzMdExsoxxgZOzjFb/dC7D5uBkqjZWDRuGwWDf1R6sc6p9OhDf48QdSj wymFIf5rmF3btxj+KA40V+beRgIOHOQk2x+SIq/5feIE133B+0zptufgxtQq1yyyM/Qz9EIo X-Received: by 2002:a05:622a:1825:b0:51c:1d18:2fe9 with SMTP id d75a77b69052e-5213c10a2bdmr202739531cf.5.1784666198684; Tue, 21 Jul 2026 13:36:38 -0700 (PDT) X-Received: by 2002:a05:622a:1825:b0:51c:1d18:2fe9 with SMTP id d75a77b69052e-5213c10a2bdmr202739041cf.5.1784666198087; Tue, 21 Jul 2026 13:36:38 -0700 (PDT) Received: from [192.168.8.4] ([100.0.180.93]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-527cda3c2ddsm2829911cf.0.2026.07.21.13.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 13:36:37 -0700 (PDT) Message-ID: <37f6625f23cc0c041d5d079dbca683d47fe9b4fa.camel@redhat.com> Subject: Re: [PATCH 3/6] drm/nouveau: add GSP hwmon support From: lyude@redhat.com To: Mohamed Ahmed Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Danilo Krummrich , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Mary Guillemard , Milos Tijanic , nouveau@lists.freedesktop.org Date: Tue, 21 Jul 2026 16:36:36 -0400 In-Reply-To: References: <20260714211429.238355-1-mohamedahmedegypt2001@gmail.com> <20260714211429.238355-4-mohamedahmedegypt2001@gmail.com> <78ca5c308ce81465956e839c82e1bba46a9f0686.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2026-07-21 at 23:36 +0400, Mohamed Ahmed wrote: > It can work but it's strictly worse than this. nvif_msec() does busy > looping, which would be overkill for this as it would be doing a lot > more reading for something that changes at most once per 500ms poll > cycle, and it keeps the CPU fully occupied with every read. It also > couples us to GPU timing while the main thing we are waiting here on > is whether the GSP's buffer writes are now visible in RAM so GPU side > time doesn't offer us anything. I actually wasn't sure at first how > to > properly wait and did go over all the possible timing alternatives > and > jiffies looked to be the best here. >=20 > That said, to address what Milos mentioned (the weirdness of files > being -ENODATA), I am going to have to move this into nvkm/rusd, > inside r570_rusd_supported()/r570_rusd_read() which doesn't have any > other alternative available to do a similar style waiting loop. Gotcha, sgtm