From patchwork Fri Nov 1 21:18:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13859778 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 4C030E6F08E for ; Fri, 1 Nov 2024 21:18:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FE7510EA04; Fri, 1 Nov 2024 21:18:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="WPkYuP0b"; 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 3B39210E0BC for ; Fri, 1 Nov 2024 21:18:38 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e370139342so53102207b3.3 for ; Fri, 01 Nov 2024 14:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730495917; x=1731100717; darn=lists.freedesktop.org; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=RKAUdhOSS2JqfDDbXfpdKgYJP1GP/t8//+MWRIuse6M=; b=WPkYuP0b6cwWrC2EOdlxlFFsBPOBGo124IVHM047zkfCrl2GDIRJl2OwHGjhGi/a0z bTJCsvkCtp9vO2TYZzstrre7hIWpPX+cjjJYVtSZEWKojLCLAhThlLKvZVoumn0U+ubs j7/Inn3eAftLs1oWe5kPJSSYi0UZThv0p+07mNnD4i4wG6UMlKj0gEg8CjDZNMtvaVan qSQRVuJGTDxSvNCDLyo1L9EUxz2p6o9uitq3tkRNtzaeMkxYhwepSbjjs9xvigt5wSrD diZ3tvrnI925EDq/kpKI1qB6Ex++DvtnfLV/qY6vpxotX5PebtFqRZFrrzlhtKFNdR38 Xdsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730495917; x=1731100717; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RKAUdhOSS2JqfDDbXfpdKgYJP1GP/t8//+MWRIuse6M=; b=hX/+IefR9kpoRU9PdiAMkV9DhSBqzVO0IXgJM4SkBry5F+Awy/4wf+hbBNv8n42wAg fmpI/g3QCQ7AeNGJOYOWUT/tFafZX6ObXTBYv/wTL5P4auJPDb4VTzEBIBOGtuQnEKVK Wxj04ne787+2VYOPEsYi5U15P7q7kFJXgPzItkS4uu9qNZxVOgkFFeZtoCBscgfmg3k2 AUUQBZSaXL6LQOcP13va8tZ5N+npmxAAoK0yE34fyfmFAioDDDIk3nefyBtZnFEQ8O/C QbgopXgk1iK54toYE/HYadKW+WcuMNuZWaRO/2ISBG8N+1KAfM5JzTY7IR/tv6uKLvBb tBgQ== X-Forwarded-Encrypted: i=1; AJvYcCXw1j1X5cP7X/m6PHH8CJwkciTQ7FpCskhUJznKtAeyB7kqTPu9AZWKk3zE88IVv798qpCv0RgdhK4=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzvwpAXTn38pGGGEA1ne6T/hu/nU9xp6PaxJVwHFNcLrzJZ8Ehc SU5zltCs+5KxgcNgYXKLwmWWA4PBlYsUYFVRSf0hSv7iDlp6wuSkj5Ymbd9ObPfD0KVKjrEaqEM X8kQI3g== X-Google-Smtp-Source: AGHT+IHmvQkUsmaHvVLtx8/JrbsBlfHJP8YWtWyFWTuZIqJiUwu2npKVN3KrokNzcinZhefYCbmDQ5uspY8X X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:f2e6:5ab5:a95f:35cb]) (user=irogers job=sendgmr) by 2002:a25:83c3:0:b0:e30:c79e:16bc with SMTP id 3f1490d57ef6-e30c79e1861mr13963276.8.1730495916629; Fri, 01 Nov 2024 14:18:36 -0700 (PDT) Date: Fri, 1 Nov 2024 14:18:27 -0700 Message-Id: <20241101211830.1298073-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Subject: [PATCH v4 1/4] 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, move the "since Linux 2.6.22" to a new history subsection. Suggested-by: G. Branden Robinson Signed-off-by: Ian Rogers --- v4. Move since to history from Alejandro Colomar's review comment. --- man/man5/proc_pid_fdinfo.5 | 51 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index 1e23bbe02..ad739bd84 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man/man5/proc_pid_fdinfo.5 @@ -8,8 +8,6 @@ .SH NAME /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. @@ -17,9 +15,9 @@ 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 +.P For regular files and directories, we see something like: -.IP +.P .in +4n .EX .RB "$" " cat /proc/12015/fdinfo/4" @@ -28,7 +26,7 @@ flags: 01002002 mnt_id: 21 .EE .in -.IP +.P The fields are as follows: .RS .TP @@ -51,7 +49,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 +56,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 +71,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 +90,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 +107,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 +122,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 +132,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 +147,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 +165,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 +187,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 +207,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 +225,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 @@ -296,5 +293,7 @@ fields contain the values that .BR timerfd_gettime (2) on this file descriptor would return.) .RE +.SH HISTORY +Since Linux 2.6.22. .SH SEE ALSO .BR proc (5) From patchwork Fri Nov 1 21:18:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13859779 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 5771FE6F08E for ; Fri, 1 Nov 2024 21:18:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3857110EA06; Fri, 1 Nov 2024 21:18:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="HFRdfjjL"; dkim-atps=neutral Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1E59410EA06 for ; Fri, 1 Nov 2024 21:18:40 +0000 (UTC) Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e29205f6063so4276381276.1 for ; Fri, 01 Nov 2024 14:18:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730495919; x=1731100719; 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=7PJ/2oZM0NegT7a5kDJ3aS9OgH6F8LEnJac0dVeN2cw=; b=HFRdfjjLUP8XUbpygtutgxDZyauU7wrtOWaNN2o2Ydsld2xFRGYuzq+gl62c97TmT4 OeuGEWTAzualIWTqsQHJQ6K0aVOfw9AMU4Dj2r2VxhcaiJmkIMRcDBzgw2cLk9fNu7d3 tlwB+sHNIJTRJLEOjWAf0RrVRAqpF320N2Jc6U+U7BPjkMAFqMw+kRT1Uc+1jUE0gKad MfrvmnBoZSW1xsICc6eptJ/1SsosQEQThM4441fQ08hxJvjH5iqH7EfZkLEMhpH7vOTU GycAsiMXNJ3yK7c0V/HywNY3kXDDRcdomaMTIYqAmpYMdFgiDQKDbBVRi79DF86tF6rj lcvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730495919; x=1731100719; 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=7PJ/2oZM0NegT7a5kDJ3aS9OgH6F8LEnJac0dVeN2cw=; b=QGvpetvE9Pj05QqccNj158b2nH7P/bJyJHRlYeUBa6LC4/Pbf+KfarxCLPRgSFTWsd X9NNJ0ko6jhfp+z9woUM4QKKGfcHqiHj9JCQ9/3LHBbsSYuMirdy7vwRzmU49yaIeSuc L1/WmZtwO6G+DlpoCun2ycj2Yd/tSylPhxeMxImHXhG1znFOKu823qi0IQ0FbAwksGvW Rle3FO3jPmt/QiA+fs6fIUEEP+37Bf2qIGXpoZ8H3rV319vvTUBuV1MBEe6ukofcjugn vB1LsUmyOWh92lFf+MKqybOYzRqjPwEWgL8+cYDOievSBzasjvAIS5FanOSUNPPpS3js ymVw== X-Forwarded-Encrypted: i=1; AJvYcCVVqNhm5B7H++mS32tzQlwcvrjSrIiFiyvcAsg1O37FEvCEWnDqvpJeNcJat31mmxAnoRcb1YmVcjk=@lists.freedesktop.org X-Gm-Message-State: AOJu0YxQNBQX9/NDZchgYa9qapMT+HnhF0zAfx+W26/kteViG0OG56vL kz2mvFeIDkPgXyebATIewYmm1FxZfRZj9rmgqgSyNdR6KFfk/2i2lUE+hY4Gpxb/3mf5ZI1uGle OummhDw== X-Google-Smtp-Source: AGHT+IF5V1HJGBWziiGDeXXMkzf2czx8Sfxn3tBr/5H0nwa1W8aFmG7SyX3wNTs33/2yNGg5OwGEuXPobUmv X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:f2e6:5ab5:a95f:35cb]) (user=irogers job=sendgmr) by 2002:a25:a1e9:0:b0:e30:b93a:b3e4 with SMTP id 3f1490d57ef6-e33025549e4mr5858276.4.1730495919069; Fri, 01 Nov 2024 14:18:39 -0700 (PDT) Date: Fri, 1 Nov 2024 14:18:28 -0700 In-Reply-To: <20241101211830.1298073-1-irogers@google.com> Message-Id: <20241101211830.1298073-2-irogers@google.com> Mime-Version: 1.0 References: <20241101211830.1298073-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Subject: [PATCH v4 2/4] proc_pid_fdinfo.5: Make pid clearer in the name and 1st paragraph 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" Previously the pid was highlighted through being a tagged paragraph but not mentioned in the description. Add italics to the path emphasizing pid and then change the first sentence to include pid in the definition. Suggested-by: G. Branden Robinson Signed-off-by: Ian Rogers --- man/man5/proc_pid_fdinfo.5 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index ad739bd84..be1675b69 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man/man5/proc_pid_fdinfo.5 @@ -6,10 +6,11 @@ .\" .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 -This is a subdirectory containing one entry for each file which the -process has open, named by its file descriptor. +This subdirectory contains one entry for each file that process +.IR 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. From patchwork Fri Nov 1 21:18:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13859780 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 D169BE6F08C for ; Fri, 1 Nov 2024 21:18:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A900510EA07; Fri, 1 Nov 2024 21:18:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="pGoaL+WX"; 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 389D310EA07 for ; Fri, 1 Nov 2024 21:18:42 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6ea33140094so55567107b3.1 for ; Fri, 01 Nov 2024 14:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730495921; x=1731100721; 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=TjhT04moS+pzhk4qD4GZREcRn5lEbBBr+8ByueC2BeM=; b=pGoaL+WX1vtEcpa3WVmh2LQUiEBgUU9qacwsSxefirM1mxJrr1Hcz/nWilXR2E9lMt nPogrVdDkS+4qhmDwNNwti+MTwE1+10/dkGo2HytKMpXrNPhS9q7jmA2e6me+mZPklzS x6gJ8NCsanrKuDO9JrGIhhlPpwRAMoBR7caic3INy3OpyrtC43wK67uOnEc6KiVa6TE2 vyRLZmMmvQm7b+QmegoWtmdfxvADRapGD0IaDrv7rc1xI8hx4ucrByq/triL12Sh6/6i P2xWyYk4jUPyRyJDPJWNBH4UZUkZbrQ8V+YbZnLoUne9Ok/uTtAHMLXF+x58j6qQE7qs SLsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730495921; x=1731100721; 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=TjhT04moS+pzhk4qD4GZREcRn5lEbBBr+8ByueC2BeM=; b=k/alJNeM/V9CfjsYMWDEntkFLdW6z/A3nT26n8u2MYr0fIexk2kE+wgI4HtpIfE/ZN mnOGESKnyDmoucQAbiKWVlt5WbRQOTBQhHOciNP+5kq+9QTLVCsstZV2VCWMiVMYnAbf sDubcDc6irHq9lhxFH5muYUfaT5rPj41O50YGduPSkHjrqaWWeXW3iZiuoBNlmEZELgw 51pPd8njB2T/DKgFPUe15SuVgSmMU6tMyHzTs9WjG6lzDMnVOBnvofDQ4ygdpm0s9kK8 d8R1VKs0AA7+mZ5wIJSk4AOLpXSApj5RLliVJipBftuNWNbUi1r6EzXIEjjPF87IWwC5 QV0w== X-Forwarded-Encrypted: i=1; AJvYcCUEO5zV22HA9axSLs7JG1f5CSMnDr4hTaCeoc3xOk8jZrrdoRmV+gZKEUwU1AD12SWGOjDMQfpqSfs=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yz2S5KfSvWjC82BoUmfbbIPlDgSxZzUwu2IUGtoKz2pVCfQyV4G uLbpohgmi2WKiSefo/NFFqSnGObPDrGN5U8iM7F70draiL7cZ7KOoC46yzZtsvVAJv0FdoGfIWI d5IQvzg== X-Google-Smtp-Source: AGHT+IHXm26c8WZH+UjkbUUruw7NFdpvbU7c2tkYNL/I8+s9eDGfk36rQjWRvXRdCXMkraXiJKlP61gSHtxm X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:f2e6:5ab5:a95f:35cb]) (user=irogers job=sendgmr) by 2002:a25:6b49:0:b0:e0e:8b26:484e with SMTP id 3f1490d57ef6-e30e5b41dffmr4636276.8.1730495921311; Fri, 01 Nov 2024 14:18:41 -0700 (PDT) Date: Fri, 1 Nov 2024 14:18:29 -0700 In-Reply-To: <20241101211830.1298073-1-irogers@google.com> Message-Id: <20241101211830.1298073-3-irogers@google.com> Mime-Version: 1.0 References: <20241101211830.1298073-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Subject: [PATCH v4 3/4] 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 be1675b69..b7efde8f4 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 Fri Nov 1 21:18:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13859781 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 54447E6F08F for ; Fri, 1 Nov 2024 21:18:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 40EE910EA08; Fri, 1 Nov 2024 21:18:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="D8by3Dpj"; 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 4958F10EA08 for ; Fri, 1 Nov 2024 21:18:44 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6e7fb84f99cso51840247b3.1 for ; Fri, 01 Nov 2024 14:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1730495923; x=1731100723; 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=ge6tq0CykQ0JdTcvuQi+p1TgzlbFfZoJPBWTv3905dE=; b=D8by3DpjUZC8jjay0wYMdDTJLMV2uQNxej5ea795EbRqxvlrgP7Cl3OQdDQL+qlAnt yFjtOSbLxTyYsoLdcCNC8Ot3oYhjE2oYtMyMpw1Tsn4hTTNQ3PjyTx10USc8INw8zCfK 02s35H8Ci4QDSAf9f1giUw4WdsZfDq9zSiHFg8DjXe5rlfQb8+LydiVdazqaBPDdUTng R6QRINENFpFeuZaptfC1vEoTivvh9baVaA/hDPKtKg5eSQcI9GDPEuWBG0TY5CQmCQHN zfOviqxPKgqUseY6ZoXGwD9MBWuJXI5uOTlRNvA8tPapjJOkOSYQquRHwGAxNBViHHVL zRFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730495923; x=1731100723; 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=ge6tq0CykQ0JdTcvuQi+p1TgzlbFfZoJPBWTv3905dE=; b=kVTXyxenU9lqEwPia8E/tEvNW7WwB/fj2D0FM+cRt2FVok787hh8k+eH8N0c9zMmY8 FFH88RmohOXMTYldRlzqk/CGpfIfKrZ4FgxraUf9TTLsSuRhA5Yfhxj9joNPYvW/UhaD 6ud2kp4/4BMA3K4zwLTpEz4WIbRw4YJjTD1pMKL+x4WtPrLLZvbbCeowL7ILtcDcaorz sWRG+GsRTnrMjvrhGMXajZD307V1insvOelwlEhaStm9rn3CBWu3lOPm3XdNFrcvWesT z42lLhulZj0ZFjOAszsxvZh9NOYcNGW126TDkqbTgzecDMEWuid8w7gpVHQOag64BEtZ ImDQ== X-Forwarded-Encrypted: i=1; AJvYcCUMroljPi7lp4SJrymrZcs1dTr08OeYMcNEvbXrLuvp50jSGvsfEqYt2LVpC+8UheKjHuGhzwUkGDw=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yw986Cbr4QcZizrFrc5V6CnERfDBXswfPxj/vrhw2fBoIcwdqUT 7SZA3+UnI9ytPwQCXM9MImkavET0CdHQzlUVWNad/W/TnYXS1H6b9GFtcjHhmJGQkL2T8d/p90M s1ecTqQ== X-Google-Smtp-Source: AGHT+IE/8CzI7i3EySC0vIuva6sxGxU1mgLMmC415LORgd6XesninyBQ7kr/kIBLxbPUm8vOr/8ZTo08y5s7 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:f2e6:5ab5:a95f:35cb]) (user=irogers job=sendgmr) by 2002:a25:dcd3:0:b0:e28:f231:1aa8 with SMTP id 3f1490d57ef6-e3087a416d3mr103176276.2.1730495923359; Fri, 01 Nov 2024 14:18:43 -0700 (PDT) Date: Fri, 1 Nov 2024 14:18:30 -0700 In-Reply-To: <20241101211830.1298073-1-irogers@google.com> Message-Id: <20241101211830.1298073-4-irogers@google.com> Mime-Version: 1.0 References: <20241101211830.1298073-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.199.ga7371fff76-goog Subject: [PATCH v4 4/4] 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 b7efde8f4..bcaf33817 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man/man5/proc_pid_fdinfo.5 @@ -300,6 +300,100 @@ 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 HISTORY Since Linux 2.6.22. .SH SEE ALSO