From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id AD4F01FF15C for ; Wed, 30 Oct 2024 14:51:08 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D8EA91A21D; Wed, 30 Oct 2024 14:51:12 +0100 (CET) Date: Wed, 30 Oct 2024 14:50:40 +0100 From: Christoph Heiss To: Thomas Lamprecht Message-ID: References: <20241028113114.550887-1-c.heiss@proxmox.com> <8a2eac73-7f86-4715-b479-6215033189c0@proxmox.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8a2eac73-7f86-4715-b479-6215033189c0@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [RFC PATCH common] SysFSTools: mdev: retrieve Nvidia vGPU description from nvidia-smi X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Cc: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Thanks for chiming in! On Wed, Oct 30, 2024 at 01:08:28PM GMT, Thomas Lamprecht wrote: > higher level comment, so CCing also Dominik: > > Is pve-common, and possibly even SysFSTools the right place for this? To be honest, that was kinda my thought to when I started implementing this, but didn't know quite where to put it otherwise - other than a completely new package and whether that is worth the additional effort. So no, not really. > [..] > from recent development it seems like placing such things into a more > specific package, and probably also (binary) package might be better. > > So while you certainly do not need to fix all of that just to get your > changes here in, it would be OTOH great if we could not make this tech > debt worse; so lets create a new package and possibly also finer-grained > modules for this. If that's the way we want to go tho - I'd be happy to put something concrete together to get started. This change is be a good starting point for all of this anyway, I think. And if we split it out anyway, I would really go the way of directly using libnvml to retrieve all the information. It is not that much more effort overall and since it being a binary package is fine too, seems fitting. > > The hard thing is to carve out what belongs together, and lets not be > strictly limited by existing module layout, method from those can be > split and merged. > > Some rough/unfinished ideas/proposal from top of my head: > > - possible package names: > - libpve-device-common (or host-device / hw-device as slight alternations) `libpve-host-device(-common)` sounds pretty good IMO; in that it is quite distinctive about what devices the package actually works with. `device` alone would be a bit ambiguous, in my mind. In the long-term, I guess the mdev-related stuff could be moved there too, being quite a good fit for that too. > - libpve-sysfs-common (if sysfs is really only what this does, which then > should not need any external tools or compiled programs) > - libpve-hw-passthrough-common > > - modules: The basename might depend a bit on the package named chosen, could > be e.g. "PVE::Device" or "PVE::SysFS" > - $basename::USB > - $basename::PCI > - $basename::PCI::NVIDIA .. and splitting up such things into vendor specific modules further down is a good idea too. Keeps things together that should be. > > In general, it can be also fine to have a very generic (micro) package with > just sysfs helpers, or keep that in existing pve-common, and then depend > on that in a more specific package that provides passthrough related stuff > on top of that, mixing sysfs query/writing with some potential calling of > external tools. > > As said, the direction should be that, and great if some parts of pve-common > can be improved "for free" w.r.t. not being huge modules in a huge package, > but there's no need to rework all of pve-common now already just for this. _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel