From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a7-smtp.messagingengine.com (fout-a7-smtp.messagingengine.com [103.168.172.150]) (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 BBA441C5F14; Fri, 21 Mar 2025 16:20:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742574026; cv=none; b=W4C9hSLDjhr5JzHuwV6uXtpO/gPrqSQfMG5lodgeKxe4CuGS1zQQou/OSv0r5qY4cC0Ucpn/v+R2pXvJ0CxQoglT7+oChBAO+535G76DzAk3Bw4TbwLW0VgcSkEN1a7pRB+LTEM/eX8/h3I1TzutpUhFUCgZ0XmPUjtxsaFeIQ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742574026; c=relaxed/simple; bh=2uONWHvTOl3GDcaw1v19m/emXekKRtrF43T0jCoCUt0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=MvkpkVsZQenIHAqkV1oBMsYLsg5JnvBxYNFzaHx0ZtusmfwSPXTy3YVKqsqqIAXdVvGJOyvAJxNiPlTa88ee5/lqHjQhWNs089C2tz8e8/gWCBeDK0tawdtt2P/lXXJLQkOvWcy5ovPfw2KVeMH4xUra+uCmccPzSoeMx9uGK5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=db48x.net; spf=pass smtp.mailfrom=db48x.net; dkim=pass (2048-bit key) header.d=db48x.net header.i=@db48x.net header.b=ZFRaG9Sg; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=KMTayt39; arc=none smtp.client-ip=103.168.172.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=db48x.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=db48x.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=db48x.net header.i=@db48x.net header.b="ZFRaG9Sg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="KMTayt39" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 801751382D75; Fri, 21 Mar 2025 12:20:22 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Fri, 21 Mar 2025 12:20:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=db48x.net; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1742574022; x=1742660422; bh=SutsPVKzmc avcLnfkr+o/VxBSYFIMZmmfkqaiIK+YZM=; b=ZFRaG9SgOE1XM6dmDC0xywVI4L 4wW8HPDVg1tw3o51YRmSFzkjawI41DJv6jraBwCrd8JbY1QTdJQwXmhiMt/GnW6k nGpo9Yw/3cx25wNSkvl1p21h6l29G88B/W5n7M560cTdVTgIQi62hGautMlyDjN3 mJkAQS/1XVb9JPDN4mhVErU022jNtYx/lf6XhfCtBPEcxINzxdTQqd0qUE6nnTZy /68/zN8FMfU3WC3i93x1sfyd+alou2nD3c3fcye8pILatPrCoHQkJIpVCDk48VqT /qrTIcGSu26QHr6LcNjuxzyPrcW862ja1q1vueuvCWfyk7aw8Pn13q6Kr0KA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1742574022; x=1742660422; bh=SutsPVKzmcavcLnfkr+o/VxBSYFIMZmmfkq aiIK+YZM=; b=KMTayt391BaNG29YIsMkIz7yfSf5Z2bIlgvjTgD6I5bk3E2PzMi J5rkrK3dWFB2jEQkZ2wf3QbCR0na93M95zO3hmn8x9RJb4VYDbDlq0e52mgKiQzu tlnmzG4k6HJzF0LY8CwHhSJPpzBcn5zKirQQEUQ7ZIlbplOol3XGtGRs+1pSU3Cg Fk+ngY21TXgbGoZ8uJI7C12+guj3nSZaXH54Rm9bvWKm98Shu6jV/M4yHYsC4k8+ bX01zuGkhmq0I6oc2IRiXd6ubt9frTS2hVGc8U/FlihXJuvIJh5iRtCYMIWHiJfe 8o+ZILH1KSOld0N3oFLmZ2qdShTbFnZF6iw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduheduheehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefujghffffkfgggtgesthdtredttder tdenucfhrhhomhepffgrnhhivghluceurhhoohhkshcuoegusgegkeigsegusgegkeigrd hnvghtqeenucggtffrrghtthgvrhhnpedtgfekkeetffeuudfggeeiffefveettdehveeh hfffvdehvdegtedvheekgeefueenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepuggsgeekgies uggsgeekgidrnhgvthdpnhgspghrtghpthhtohepudelpdhmohguvgepshhmthhpohhuth dprhgtphhtthhopegurhhiqdguvghvvghlsehlihhsthhsrdhfrhgvvgguvghskhhtohhp rdhorhhgpdhrtghpthhtohepnhhouhhvvggruheslhhishhtshdrfhhrvggvuggvshhkth hophdrohhrghdprhgtphhtthhopehruhhsthdqfhhorhdqlhhinhhugiesvhhgvghrrdhk vghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrd hkvghrnhgvlhdrohhrghdprhgtphhtthhopehsihhmohhnrgesfhhffihllhdrtghhpdhr tghpthhtohepthhmghhrohhsshesuhhmihgthhdrvgguuhdprhgtphhtthhopegrlhhitg gvrhihhhhlsehgohhoghhlvgdrtghomhdprhgtphhtthhopegrrdhhihhnuggsohhrghes khgvrhhnvghlrdhorhhgpdhrtghpthhtohepsggvnhhnohdrlhhoshhsihhnsehprhhoth honhdrmhgv X-ME-Proxy: Feedback-ID: ie0194691:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 21 Mar 2025 12:20:19 -0400 (EDT) From: Daniel Brooks To: "Alexandre Courbot" Cc: "Boqun Feng" , "Danilo Krummrich" , "David Airlie" , "John Hubbard" , "Ben Skeggs" , "Miguel Ojeda" , "Alex Gaynor" , "Gary Guo" , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Simona Vetter" , , , , Subject: Re: [PATCH RFC v3 6/7] gpu: nova-core: add basic timer device In-Reply-To: (Alexandre Courbot's message of "Fri, 21 Mar 2025 14:41:12 +0900") References: <20250320-nova_timer-v3-0-79aa2ad25a79@nvidia.com> <20250320-nova_timer-v3-6-79aa2ad25a79@nvidia.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGOfPtRkwAAABJQ TFRFpKfbdou67PD6JjJgAwUWXGSeIcyLHgAAAkZJREFUOI1VU8Fy6yAMxLi+Q13fCZ3cnQL3dqTc 7RD+/1feStDXVnXHDuvVSivZTMba2GPdw3gyCGcMAFxTyrTd9dwGoxHiZX9PmRFUHYAQlGGtXY+F Uk0SJOxgJiUEnH1qkitT9D+pQub7qGAmUbR6bu3CvI96Yv6QqkBBMrsyfZccr1/RDXGDTLf4P7ZY glVxe2V+/ACXWO1gvDO9/gDRpFFVmPluvLcmBjd5H6d8DEte+Pbk4rcY/Fa5tLKLOtCZsuQKYhpa LOkYDT7hESya7/WIET3lfQBqX0pwFtbI832Is0ayMUR9B+12xjgPCQ089cfwkCkX6L5TPmRelJTh zMS0Sz1PyjLAMCUWjcmgQLWQMds+e3aaauZDf9dU9A2/8kPVF2odCUoMKHkfjJR+mbgC+DRiycw5 3XSqGe6HmhN/AWjHypkAXOAFW5EiuA1ge2GiZuMb0s1fSEXcATeLUfbyEY2L8yPOmdSsdghQXx3K pz2eoeXuYvMCINVFDrCdNfVUp4eJ6cSEbjbgFjBEvonGGTrgv9cHjAc8aVgSAPoxaONbzfwhDIhR at7IIS7fAGiDSwIA9alhhTBzfA7YM2FY6eMwayrIGK8FDFmshmUA43WqhFtpvoqG9HHaJ7fqtgTz 8EWVkgZgtsylFliHDgk0MB7KAEC45C/rgnGvanNLXyzOeTzcT2nw/N44gfrtYXRQLoz9Q3TgmJRx 2Mx/Q51qzpm+l3m8z2SWBqC5+PZXAtNYlGFf/gKfHfjFkDT4x7od7R+w3Ls+ZdQBuQAAAABJRU5E rkJggg== Date: Fri, 21 Mar 2025 09:20:18 -0700 Message-ID: <87r02qz77h.fsf@db48x.net> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Alexandre Courbot" writes: > Hi Boqun, > > On Fri Mar 21, 2025 at 3:17 AM JST, Boqun Feng wrote: >> Also an Instant type has been proposed and reviewed for a while: >> >> https://lore.kernel.org/rust-for-linux/20250220070611.214262-5-fujita.tomonori@gmail.com/ >> >> we should use that type instead of re-inventing the wheel here. Of >> course, it's currently not quite working because Instant is only for >> CLOCK_MONOTONIC. But there was a proposal to make `Instant` generic over >> clock: >> >> https://lore.kernel.org/rust-for-linux/20230714-rust-time-v2-1-f5aed84218c4@asahilina.net/ >> >> if you follow that design, you can implement a `Instant`, where >> >> ipml Now for NovaGpu { >> fn now() -> Instant { >> // your Timer::read() implementation. >> } >> } > > Ah, thanks for pointing this out. I'll keep track of these patches, > hopefully they get merged soon! Would that actually work though? Instant is a ktime_t, which is a signed i64 rather than a u64. When I read your patch I assumed that you had to add your own Timestamp because the value had to be whatever was read from the GPU, independent of the clock value kept by the system or other hardware. db48x