From patchwork Tue Oct 15 21:17:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13837109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E038CD1D876 for ; Tue, 15 Oct 2024 21:17:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F22F10E60E; Tue, 15 Oct 2024 21:17:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="FdXZmzsa"; dkim-atps=neutral Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by gabe.freedesktop.org (Postfix) with ESMTPS id A448610E60E for ; Tue, 15 Oct 2024 21:17:24 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e389169f92so43846687b3.0 for ; Tue, 15 Oct 2024 14:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729027043; x=1729631843; darn=lists.freedesktop.org; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=txjuk5KKMHwTz+/UPetAowSwk4pU0mPYYmnYC+nTh88=; b=FdXZmzsaBSmI9qGeyq+N5YyovoKfT8liMocegrd+UwPzo8Emz409/+y0OioCWsdWhM a1cVPM2vCShPcJG+SLek3sYFGz3OidS4NYIrcYxcToamTaWyadMDJwoDQn9ZKUCo3ArM /fielOLaN2iK0v+UKWbG0Gl8Aq/QzUAZbOwgoYanmUAJo2q6T60N45BXB2tyU4LqQHwo Tm70TbdEkKZkS9Njy1nS/Q9bVwghN5PD6Spc20J49m4S1neOxpLYJ/aXOeB7Yxh7sfrV reoGvw6TYF1jCLbelOIe2DV9bQ+HWAAXlH3KjhQ4lML8Efc8NPxTu6OV+Q2IuFlPPzdz zX2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729027043; x=1729631843; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=txjuk5KKMHwTz+/UPetAowSwk4pU0mPYYmnYC+nTh88=; b=Up+uRM8jjRaEYlRS7+k9otdLVXfpnpRMAVG2HVzbu4/5hMNfOuT4dpMS/cuP5BL0gp 87tEtq3MJrUMYebtf+yXfzN7ssSpE7XXkYAZP7fbaFnDwnE9HmJSj/cqnumyE/jEg4+o 1npZd3qRfTOh9deZHQDUXwJPNaDYIGyyYl0/mYyiT8BgLQ6pEHytedTXYYktcjkr3WjJ ohDbVFR1m7NgGKe8OzUlBs3iWlkcF2islD/QKT/6I1SEiizZUdvveBpQz89Ysdeseis0 IZEFg6mUtqL1JzEGXUzZoKL0QhvKtZbrlkWURQZARMNez+Xn2kHs9BiXWF8Is/OBUkeK UHuA== X-Forwarded-Encrypted: i=1; AJvYcCVu6OLxE7HemwQEv8Bc7h807XEKoj6XRqHeYffiWN0hzifqbIR3D/o1C1jYRvxEHk8gdRZGaiiBBDw=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyYON2Zin6l87vixWwbamWb5PAFEnZdG/nYuNMzVhI+RjQyPnMV floKDkJEpOgI5tgusZ2UNSugjcofVF4PSvek8OsaEynrkpISaKpqfBNbkvFP/KA7AtYDsV0vWK4 yolTYiw== X-Google-Smtp-Source: AGHT+IHT/1zxWTgrIqgA/1rSj+mzRq1XZtza4mJalhXeseoFKyJ0a7dvTKzCyIb/2Gjaw9Ez4gd7F15whol/ X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:61a1:4d9d:aca1:ada]) (user=irogers job=sendgmr) by 2002:a05:690c:6703:b0:6e2:1713:bdb5 with SMTP id 00721157ae682-6e3d41e6748mr24557b3.5.1729027043418; Tue, 15 Oct 2024 14:17:23 -0700 (PDT) Date: Tue, 15 Oct 2024 14:17:17 -0700 Message-Id: <20241015211719.1152862-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.47.0.rc1.288.g06298d1525-goog Subject: [PATCH v2 1/3] proc_pid_fdinfo.5: Reduce indent for most of the page From: Ian Rogers To: Alejandro Colomar , "G . Branden Robinson" Cc: David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Jonathan Corbet , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, Ian Rogers X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When /proc/pid/fdinfo was part of proc.5 man page the indentation made sense. As a standalone man page the indentation doesn't need to be so far over to the right. Remove the initial tagged pragraph and move the styling to the initial summary description. Suggested-by: G. Branden Robinson Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 66 ++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index 1e23bbe02..8678caf4a 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man/man5/proc_pid_fdinfo.5 @@ -6,20 +6,19 @@ .\" .TH proc_pid_fdinfo 5 (date) "Linux man-pages (unreleased)" .SH NAME -/proc/pid/fdinfo/ \- information about file descriptors +.IR /proc/ pid /fdinfo " \- information about file descriptors" .SH DESCRIPTION -.TP -.IR /proc/ pid /fdinfo/ " (since Linux 2.6.22)" -This is a subdirectory containing one entry for each file which the -process has open, named by its file descriptor. -The files in this directory are readable only by the owner of the process. -The contents of each file can be read to obtain information -about the corresponding file descriptor. -The content depends on the type of file referred to by the -corresponding file descriptor. -.IP +Since Linux 2.6.22, +this subdirectory contains one entry for each file that process +.I pid +has open, named by its file descriptor. The files in this directory +are readable only by the owner of the process. The contents of each +file can be read to obtain information about the corresponding file +descriptor. The content depends on the type of file referred to by +the corresponding file descriptor. +.P For regular files and directories, we see something like: -.IP +.P .in +4n .EX .RB "$" " cat /proc/12015/fdinfo/4" @@ -28,7 +27,7 @@ flags: 01002002 mnt_id: 21 .EE .in -.IP +.P The fields are as follows: .RS .TP @@ -51,7 +50,6 @@ this field incorrectly displayed the setting of at the time the file was opened, rather than the current setting of the close-on-exec flag. .TP -.I .I mnt_id This field, present since Linux 3.15, .\" commit 49d063cb353265c3af701bab215ac438ca7df36d @@ -59,13 +57,13 @@ is the ID of the mount containing this file. See the description of .IR /proc/ pid /mountinfo . .RE -.IP +.P For eventfd file descriptors (see .BR eventfd (2)), we see (since Linux 3.8) .\" commit cbac5542d48127b546a23d816380a7926eee1c25 the following fields: -.IP +.P .in +4n .EX pos: 0 @@ -74,16 +72,16 @@ mnt_id: 10 eventfd\-count: 40 .EE .in -.IP +.P .I eventfd\-count is the current value of the eventfd counter, in hexadecimal. -.IP +.P For epoll file descriptors (see .BR epoll (7)), we see (since Linux 3.8) .\" commit 138d22b58696c506799f8de759804083ff9effae the following fields: -.IP +.P .in +4n .EX pos: 0 @@ -93,7 +91,7 @@ tfd: 9 events: 19 data: 74253d2500000009 tfd: 7 events: 19 data: 74253d2500000007 .EE .in -.IP +.P Each of the lines beginning .I tfd describes one of the file descriptors being monitored via @@ -110,13 +108,13 @@ descriptor. The .I data field is the data value associated with this file descriptor. -.IP +.P For signalfd file descriptors (see .BR signalfd (2)), we see (since Linux 3.8) .\" commit 138d22b58696c506799f8de759804083ff9effae the following fields: -.IP +.P .in +4n .EX pos: 0 @@ -125,7 +123,7 @@ mnt_id: 10 sigmask: 0000000000000006 .EE .in -.IP +.P .I sigmask is the hexadecimal mask of signals that are accepted via this signalfd file descriptor. @@ -135,12 +133,12 @@ and .BR SIGQUIT ; see .BR signal (7).) -.IP +.P For inotify file descriptors (see .BR inotify (7)), we see (since Linux 3.8) the following fields: -.IP +.P .in +4n .EX pos: 0 @@ -150,7 +148,7 @@ inotify wd:2 ino:7ef82a sdev:800001 mask:800afff ignored_mask:0 fhandle\-bytes:8 inotify wd:1 ino:192627 sdev:800001 mask:800afff ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:27261900802dfd73 .EE .in -.IP +.P Each of the lines beginning with "inotify" displays information about one file or directory that is being monitored. The fields in this line are as follows: @@ -168,19 +166,19 @@ The ID of the device where the target file resides (in hexadecimal). .I mask The mask of events being monitored for the target file (in hexadecimal). .RE -.IP +.P If the kernel was built with exportfs support, the path to the target file is exposed as a file handle, via three hexadecimal fields: .IR fhandle\-bytes , .IR fhandle\-type , and .IR f_handle . -.IP +.P For fanotify file descriptors (see .BR fanotify (7)), we see (since Linux 3.8) the following fields: -.IP +.P .in +4n .EX pos: 0 @@ -190,7 +188,7 @@ fanotify flags:0 event\-flags:88002 fanotify ino:19264f sdev:800001 mflags:0 mask:1 ignored_mask:0 fhandle\-bytes:8 fhandle\-type:1 f_handle:4f261900a82dfd73 .EE .in -.IP +.P The fourth line displays information defined when the fanotify group was created via .BR fanotify_init (2): @@ -210,7 +208,7 @@ argument given to .BR fanotify_init (2) (expressed in hexadecimal). .RE -.IP +.P Each additional line shown in the file contains information about one of the marks in the fanotify group. Most of these fields are as for inotify, except: @@ -228,16 +226,16 @@ The events mask for this mark The mask of events that are ignored for this mark (expressed in hexadecimal). .RE -.IP +.P For details on these fields, see .BR fanotify_mark (2). -.IP +.P For timerfd file descriptors (see .BR timerfd (2)), we see (since Linux 3.17) .\" commit af9c4957cf212ad9cf0bee34c95cb11de5426e85 the following fields: -.IP +.P .in +4n .EX pos: 0 From patchwork Tue Oct 15 21:17:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13837110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 412DAD1D876 for ; Tue, 15 Oct 2024 21:17:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 819B010E604; Tue, 15 Oct 2024 21:17:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="2YApt7a8"; dkim-atps=neutral Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8D60810E60F for ; Tue, 15 Oct 2024 21:17:26 +0000 (UTC) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6e355f1ff4bso57937917b3.2 for ; Tue, 15 Oct 2024 14:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729027045; x=1729631845; darn=lists.freedesktop.org; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=qp+83TpI3TezfCC8Dtvl97cBiL4JnurBtXXrj0jn8lw=; b=2YApt7a8E6cwOyLclzVwuaTmr1wp1Y3stSqzddnkxS5tosN5r9q8wnykavkpp2Sngd MMP7XkUEmev4hr+TVjSc6Ey20UusUwmzpVU4IY6sFlvHveBnPhiCfSX6C1GgdYzy0g39 BP6Vyb0w8JYkna6iqp0bmiH6+1VoAhP8pw3BG0BMsAWhuFUmjZ406TXTqtTrdq0u+EvQ opJjUgAu/MuvB4KfO39UZLHEiK+UpfS+KeFAVGka1Q3PxxECifpJxJytWwaujU+JJ+6/ 164MLijG0qp9etGVEI9RtBFiDwKEzvaAtM4JKQ6tJIAqHieqAiT+7j7b0RI8dppBmfnj oCig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729027045; x=1729631845; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qp+83TpI3TezfCC8Dtvl97cBiL4JnurBtXXrj0jn8lw=; b=sMMshB8h6m0/QReR95srp2Gmnn8QP8dGMXGaIqzqLnEKhgACtLrdf4ujPC0XGni2pl NIFUGKS/zxlV82449Y0BVND512jMirSfbAYBvRXbgz1cUWojVOLCikGFHdQzpfn1A0fz qzI89YKMZ258tnC0aaYrL82m7CUmMY1Fd4jVTzLvNNsjQWh7CekY9VvTrfsD2B7W63mc wmo5ki+B/GKzvordRM1b1Sp5kDYQRUZy3ac8Cxzfl9huacQ98IpXlfPAQWXwW4g7z90t 3JkbaDZh9mcSmLnpkZs7k0KQrCXcCsC22957F8H55v1huA/689m6XW1pBrE1BcVNUD/H yiQQ== X-Forwarded-Encrypted: i=1; AJvYcCXuuIjpkA2Ez2VCkEF6Axwpsrjz3Lu7lNyG3EdkxK3f6H4v1EX0kjd96IduZqxwbBkayDOTQb8cGXs=@lists.freedesktop.org X-Gm-Message-State: AOJu0Ywcpk4nuUZPZZLH7XjjuqCOXtmUizjqcWlzXSWGwhcTMtYififm JmmYnJlyn1xNZc16LBYe4IWE4Ehgjvg2kSZ5uF3Ixn4jsuPOn6zw3K1xv5of+thmW9Tu1WZdIFT kg1BbGw== X-Google-Smtp-Source: AGHT+IEl3NSU1WdQwze6KAXwiH4egozRYT4wu4exGFfYWyRpDzyjB1F5KOwgYO3ID9qtJyh31DrebhRjau2i X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:61a1:4d9d:aca1:ada]) (user=irogers job=sendgmr) by 2002:a05:690c:7281:b0:6e3:1f46:77a6 with SMTP id 00721157ae682-6e3d40a2c01mr388767b3.2.1729027045640; Tue, 15 Oct 2024 14:17:25 -0700 (PDT) Date: Tue, 15 Oct 2024 14:17:18 -0700 In-Reply-To: <20241015211719.1152862-1-irogers@google.com> Message-Id: <20241015211719.1152862-2-irogers@google.com> Mime-Version: 1.0 References: <20241015211719.1152862-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.rc1.288.g06298d1525-goog Subject: [PATCH v2 2/3] proc_pid_fdinfo.5: Add subsection headers for different fd types From: Ian Rogers To: Alejandro Colomar , "G . Branden Robinson" Cc: David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Jonathan Corbet , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, Ian Rogers X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make the sections about eventfd, epoll, signalfd, inotify, fanotify, timerfd better separated with a clearer subsection header. Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index 8678caf4a..02eceac04 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man/man5/proc_pid_fdinfo.5 @@ -57,6 +57,7 @@ is the ID of the mount containing this file. See the description of .IR /proc/ pid /mountinfo . .RE +.SS eventfd .P For eventfd file descriptors (see .BR eventfd (2)), @@ -75,6 +76,7 @@ eventfd\-count: 40 .P .I eventfd\-count is the current value of the eventfd counter, in hexadecimal. +.SS epoll .P For epoll file descriptors (see .BR epoll (7)), @@ -108,6 +110,7 @@ descriptor. The .I data field is the data value associated with this file descriptor. +.SS signalfd .P For signalfd file descriptors (see .BR signalfd (2)), @@ -133,6 +136,7 @@ and .BR SIGQUIT ; see .BR signal (7).) +.SS inotify .P For inotify file descriptors (see .BR inotify (7)), @@ -173,6 +177,7 @@ file is exposed as a file handle, via three hexadecimal fields: .IR fhandle\-type , and .IR f_handle . +.SS fanotify .P For fanotify file descriptors (see .BR fanotify (7)), @@ -229,6 +234,7 @@ The mask of events that are ignored for this mark .P For details on these fields, see .BR fanotify_mark (2). +.SS timerfd .P For timerfd file descriptors (see .BR timerfd (2)), From patchwork Tue Oct 15 21:17:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13837111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3AF3D1F9DA for ; Tue, 15 Oct 2024 21:17:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CB4D10E60F; Tue, 15 Oct 2024 21:17:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="SgGW6mti"; dkim-atps=neutral Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by gabe.freedesktop.org (Postfix) with ESMTPS id 029D310E60F for ; Tue, 15 Oct 2024 21:17:28 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e35bdb6a31so66911107b3.1 for ; Tue, 15 Oct 2024 14:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729027048; x=1729631848; darn=lists.freedesktop.org; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=WKU5Ql8c4lOWuBE9mb5dgHxWXN25Z3UPK2tc2nBX/Hw=; b=SgGW6mtiuszMlHAFe22axq81qSiuihCo+3jBLO77JU6ttxP3mPNRfYJyNyWmVL6jQt pG+0+P1MEiGMrazF2wOOgB8PnOggQp61H/fKhelhCqrN+2GLeIjKmG2731GWxUw0Nbz5 CPLEwdcZGBcnj/d6Wb+s1xsFus061QHwUJp9yOcFMEvuO9k2h3fEUqzXDGC7SyQBz3C7 Mq3tGKhi8/bhWLLaWSrCi4fCP2z4lEg2+uRTMtFwnO1Mv5PqnJPwLvP0eHCaByC+JXdp deiH2nq21Nf4NXeQoT9VLylyIf/wS0hLhlIOL5KbSpI2jXQTrVOvO526MYbHw7KsVCbf EgBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729027048; x=1729631848; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WKU5Ql8c4lOWuBE9mb5dgHxWXN25Z3UPK2tc2nBX/Hw=; b=afVpvmGCP+cjdANdoEJPaIme0EZ3PmcdSOKbAQ0GeFIeQFzKyHpnfABDmM+6ahyNVM 5rKqEMbsORuB7QrMDonmd6WxdWJ2Nml3J+IVRg9mRChJOLcJ54+1uiEGdmb8aymPW4IZ AnFe7pu6nAgdBS87VRS0+ok8wO7ieQXWLwBm1RLaFHrOwkrtS5p6dfZepz48wRJMbD9r PrYEINSzCThRdbZCZZEvZtlRlVBoReKb8mVrvrvbL9/0ndgZZo6VcIMbkRNd3FsT4DSo Xj9HqDahNid8asI8PZRPZfXFtE/fg6oME18xgGphYIp8TqC6MWZ4wQocCTx3q4EL+dB/ 1hHQ== X-Forwarded-Encrypted: i=1; AJvYcCVMqXPV1sK2SsBwgu/kos2Y4e8QQez75CUif3ucPBpKWF9KfzQRS7teW7q+rqE4nb3EHChJwp7rE+g=@lists.freedesktop.org X-Gm-Message-State: AOJu0YywXRXq+cLCPtbwQgFC3pylnj5GbH5XJNm3KcuBgIftu4YeISyR 19xk/TGiMmtp1n6SUzTSPIIO3+Kw3efc1OJtCavs25HxVSlYt8I/VAdXi/23sj0llop636j3Fb9 9tH8F9g== X-Google-Smtp-Source: AGHT+IETvJtGSVidjurE+k5FibZOHgtYv0ZzxgqNHn8C/rHRsq8sjnXk5FCqfV1MPhDQwBmALvvUhYa1EhM9 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:61a1:4d9d:aca1:ada]) (user=irogers job=sendgmr) by 2002:a05:690c:2fc9:b0:66a:764f:e57f with SMTP id 00721157ae682-6e3d41fb686mr13757b3.7.1729027047836; Tue, 15 Oct 2024 14:17:27 -0700 (PDT) Date: Tue, 15 Oct 2024 14:17:19 -0700 In-Reply-To: <20241015211719.1152862-1-irogers@google.com> Message-Id: <20241015211719.1152862-3-irogers@google.com> Mime-Version: 1.0 References: <20241015211719.1152862-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.rc1.288.g06298d1525-goog Subject: [PATCH v2 3/3] proc_pid_fdinfo.5: Add DRM subsection From: Ian Rogers To: Alejandro Colomar , "G . Branden Robinson" Cc: David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Jonathan Corbet , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, Ian Rogers X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add description of DRM fdinfo information based on the Linux kernel's `Documentation/gpu/drm-usage-stats.rst`: https://docs.kernel.org/gpu/drm-usage-stats.html Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index 02eceac04..bb6c07527 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man/man5/proc_pid_fdinfo.5 @@ -300,5 +300,99 @@ fields contain the values that .BR timerfd_gettime (2) on this file descriptor would return.) .RE +.SS Direct Rendering Manager +.P +DRM drivers can optionally choose to expose usage stats through +/proc/pid/fdinfo/. For example: +.P +.in +4n +.EX +pos: 0 +flags: 02100002 +mnt_id: 26 +ino: 284 +drm-driver: i915 +drm-client-id: 39 +drm-pdev: 0000:00:02.0 +drm-total-system0: 6044 KiB +drm-shared-system0: 0 +drm-active-system0: 0 +drm-resident-system0: 6044 KiB +drm-purgeable-system0: 1688 KiB +drm-total-stolen-system0: 0 +drm-shared-stolen-system0: 0 +drm-active-stolen-system0: 0 +drm-resident-stolen-system0: 0 +drm-purgeable-stolen-system0: 0 +drm-engine-render: 346249 ns +drm-engine-copy: 0 ns +drm-engine-video: 0 ns +drm-engine-capacity-video: 2 +drm-engine-video-enhance: 0 ns +.EE +.TP +.IR drm-driver: " .+ (mandatory)" +The name this driver registered. +.TP +.IR drm-pdev: " " +For PCI devices this should contain the PCI slot address of the device +in question. +.TP +.IR drm-client-id: " [0-9]+" +Unique value relating to the open DRM file descriptor used to +distinguish duplicated and shared file descriptors. +.P +GPUs usually contain multiple execution engines. Each shall be given a +stable and unique name (), with possible values +documented in the driver specific documentation. +.TP +.IR drm-engine-: " [0-9]+ ns" +GPU engine utilization, time spent busy executing workloads for this client. +.TP +.IR drm-engine-capacity-: " [0-9]+" +Capacity of the engine if not 1, cannot be 0. +.TP +.IR drm-cycles-: " [0-9]+" +Contains the number of busy cycles for the given engine. Values are +not required to be constantly monotonic, but are required to catch up +with the previously reported larger value within a reasonable +period. Upon observing a value lower than what was previously read, +userspace is expected to stay with that larger previous value until a +monotonic update is seen. +.TP +.IR drm-total-cycles-: " [0-9]+" +Contains the total number cycles for the given engine. This is a +timestamp in GPU unspecified unit that matches the update rate of +drm-cycles-. For drivers that implement this interface, +the engine utilization can be calculated entirely on the GPU clock +domain, without considering the CPU sleep time between 2 samples. +.P +Each possible memory type which can be used to store buffer objects by +the GPU in question shall be given a stable and unique name . +The name "memory" is reserved to refer to normal system memory. +.TP +.IR drm-memory-: " [0-9]+ [KiB|MiB]" +The amount of storage currently consumed by the buffer objects belong +to this client, in the respective memory region. +.IP +Default unit shall be bytes with optional unit specifiers of 'KiB' or 'MiB' +indicating kibi- or mebi-bytes. +.TP +.IR drm-shared-: " [0-9]+ [KiB|MiB]" +The total size of buffers that are shared with another file (e.g., have more +than a single handle). +.TP +.IR drm-total-: " [0-9]+ [KiB|MiB]" +The total size of buffers that including shared and private memory. +.TP +.IR drm-resident-: " [0-9]+ [KiB|MiB]" +The total size of buffers that are resident in the specified region. +.TP +.IR drm-purgeable-: " [0-9]+ [KiB|MiB]" +The total size of buffers that are purgeable. +.TP +.IR drm-active-: " [0-9]+ [KiB|MiB]" +The total size of buffers that are active on one or more engines. + .SH SEE ALSO .BR proc (5)