From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 BE4AF37647B for ; Thu, 13 Aug 2026 05:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786600250; cv=none; b=ge7LvhKW0g6E9AHn8wsnqsTnJQMDKNIBXE8u9AoaRTN+onLXvMoTuS0zG2RaCKIgePyvfH/JKvW4xGo2qfxK901Oska0Wru5aVhx78liAtAWdE9dX8sbXhkjEZ5R8D+L0T85AOT//TRMQU2iMqghtEr4EOSA/lwzDQ8BANmtl0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786600250; c=relaxed/simple; bh=V3JEh31WwDsNrUS7v93z2nbzGko9efY4jXQ8adxryQQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nF7Degy4d05NY/paM0TH1mbFSNrcIpUSTE6y2TvWw5p9reDEUPjzP+NGbF/Xlw7fKX6JDJq6QXDCKFGp2/Cq86jCzZL5H9WPGF3V2+FH6GsbNbMkCnmxhpzr0sh6H2ZfxxapHS0Fd7C1bEJ9ATR/Cs2FfZpZDOET9s3DJTkKdyE= 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=N1S+nBh+; arc=none smtp.client-ip=209.85.167.45 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N1S+nBh+" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-5aeb24c0807so1315339e87.0 for ; Wed, 12 Aug 2026 22:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786600247; x=1787205047; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=V3JEh31WwDsNrUS7v93z2nbzGko9efY4jXQ8adxryQQ=; b=N1S+nBh+PdBKCjVR2Arcq8sRiPrKSJM6rxGzeuNIoEmyrMikQRsHi9LZ1qLEj9grTY fFAvMKUFLVtnQvz/ACwU+zOwzCaWkUdqt0lqDIchjg/lKTwU8RfLXmO8x9FkwDpfmREx Lsfok4d/C9sTjQuiEM4vfGq60k5bQDlwu1pOD9Y+XuchjSQS84ye51RpHgKmvEAILvvF inzHzWGbvfPJO3F8B07QaETrvQVB+HkOyoY8FmvFhbz1W0yEsJBO1/VmY8xClBCyTd/E Z/BIteKzfn7fBEIMik6jOP8LUIHlCOfG2wF8nAhvfIx28n0OJHNFH6DmxzwG8v6Zs1lL 1YsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786600247; x=1787205047; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=V3JEh31WwDsNrUS7v93z2nbzGko9efY4jXQ8adxryQQ=; b=OCu4cwxUrof7sejqx43RzsJT19JsNAV8T860/nF62oZ0aspf561RvPFRbKJAuXYwgT 1D3bBFjHiNAwXqlYIlSlYacp2LX/wCZC2vGi2CfhJh+awH3Y26BGODc342B5aa3hia+V RJVV2oqBQrG/hP23nGDwJ++f/pWoxoZNN4wHIrXYNQ9sQbW0sb8O+3Hz8zXOMr5lF+Ac ElYDnbN03IOEt1HBvGEmb6xKAPFgo1WggeOlaknbngYbvUqhM30S751EYxogqfwoFU96 E4GQgc3KamJqS7bDLu/phq4OfpWPmadsNtXtQYCXe4/57Mlz76g0kIJH4515rf5A0DpZ 9wyQ== X-Forwarded-Encrypted: i=1; AHgh+Ro7ZpoAe/yFT0KiKifuN9BOieiSMPUko+gU5grvb84R+WiBeooX0vhJMYsjJUyHH85kG4GtRJ5HfpliTrY=@vger.kernel.org X-Gm-Message-State: AOJu0Yz31P7aKRh7C9N59q7gg4JEYI7hlqDcj3NDcDkHbKyrtNSIMVaC RTlgfd2ES9RCiuSJG/TvgcYPdFv54wUPyT4BdxEODRAn5aQy58TdhN0Y X-Gm-Gg: AR+sD12Sk7C8aJSw2EJvEXuGYzehuT+xCl8bMPWE8Tk5SYg15n2Ytt4lmWs2/LdF9fY BRGhN3jRvb64+2YzXyEdhqh9cUcAXxX7FpHz/MqljYkMNATsgNrenjA7faWqwgejUNbq3br/sPH uUwUKSLprJ5HjCjtVxggSm93ztloufXUNX96jxGMuJ2hr5n9e9UeeVJ6gldc/XMcA44NAobgeyK DBCsEZ4l8U1jLlcMuK3/0uZmiLEUjM0aKIKhS0UYkd1M1s80uZi5LItz4h3F5K3nBl+minvge05 FauViuac5Snq5gNNWossxl4ZpKtbdp/2Ll2lW+0ZyZNXAD6Q3ZQ9L9oqqcA2Z4u5irMXLMtIaMK ssA8CeXuV2EEHo1oz2Irn5DMgiWgAZSlUggCniJiahAuzGCNrU6B1ggDwfppRpu5mr8aRj7Bhna bPj6aFczdXMv03uoxgOTv5p6yBYot1wrsno3QxzEubIQWsILVAFVnG3+S5t8BKOnONuRI= X-Received: by 2002:a05:6512:2c8e:b0:5b3:e02:b398 with SMTP id 2adb3069b0e04-5b453f9f805mr407533e87.44.1786600246595; Wed, 12 Aug 2026 22:50:46 -0700 (PDT) Received: from localhost ([95.190.110.153]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5b4539e1866sm249783e87.6.2026.08.12.22.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 22:50:46 -0700 (PDT) From: Vladislav Zaharov To: dakr@kernel.org, jhubbard@nvidia.com Cc: acourbot@nvidia.com, aliceryhl@google.com, ttabi@nvidia.com, gary@garyguo.net, nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind Date: Thu, 13 Aug 2026 12:50:44 +0700 Message-ID: <20260813055044.98486-1-vladazaharova2018@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: <20260812113752.532537-1-vladazaharova2018@gmail.com> <20260812113752.532537-2-vladazaharova2018@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu Aug 13, 2026, Danilo Krummrich wrote: > I think those should use VVec. > Let's move all the LogBuffer code into gsp/logbuffer.rs to keep gsp.rs clean. > I think we can avoid this additional unsafe if we just create the retained dir > right away in module_init(). > dev_dbg!() should be good enough. All four make sense, thanks - v2 will have them. Creating the retained directory in module_init() also removes the only reason retain() had to look at DEBUGFS_ROOT, so the unsafe block goes away with it. On Thu Aug 13, 2026, John Hubbard wrote: > I'd *much* rather use a kernel parameter: keep_gsp_logs, instead of > requiring a rebuild of the kernel. Agreed, and it makes the patch smaller: with a module parameter the cfg gating disappears and the code is simply always built. I used a Kconfig because of the "the only Kconfig needed is for retaining the GSP log buffers after driver unbind" remark in the earlier thread, which I took literally instead of asking. That one needs a decision, though. The Rust module parameter abstraction has no bool: rust/kernel/module_param.rs only instantiates param ops for i8..u64, isize and usize, and rust/macros/module.rs panics on anything else. Nor is it quite a one-liner to add, since bare bool parameters rely on KERNEL_PARAM_OPS_FL_NOARG, which make_param_ops! cannot currently express. I am happy to write that prerequisite patch, but it would pull this series into rust/kernel review. So unless bool support is already in flight somewhere I have not found, I propose v2 uses u8 for now and moves to bool once it exists. Say the word if you would rather have it done properly first. The re-test on top of the current tip is still owed; I will run it before v2 and report the result in its cover letter. Thanks, Vladislav