From patchwork Fri Dec 6 07:38:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13896572 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 E9785E77179 for ; Fri, 6 Dec 2024 07:38:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2945C10E07C; Fri, 6 Dec 2024 07:38:35 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="kFxuA8kD"; 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 C347010E07C for ; Fri, 6 Dec 2024 07:38:33 +0000 (UTC) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6efed40a5bcso883627b3.3 for ; Thu, 05 Dec 2024 23:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1733470712; x=1734075512; darn=lists.freedesktop.org; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=SLJxxCZMQjxFHfpRLUoPsE0Pog5U57DZgoMGmPXxLis=; b=kFxuA8kD4b6I2VGeQdlutUbRwMZIZx2PmboB6+Y87rZWXuce/nUE6N1LcnYkywBKAv J7PI7TmxhR9OMMshSbv/zYuHtLb6tCqqGdCWM54+LQLjznT3viTlo22VvFXAYm6u2IvT 2khYb14Q3VH4/HxFriS8ghJBy9YGuJeFyce4/p+MgIcBdSr2lyAkgVezYYkTvrdcUQ5K 1R3d1TdL8Z2YynY4vnQMZvc1x6MrlK7I7K30kk5NYMgoXU1ka7II0IeGrD9Ux52T8Hlc 787Mjs8MlZUjDtAZe6yjWf27f7y/n9iL1UDCATPmVzXvkGCc/YnxlMQo9lDlzx5+cARt JByA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733470712; x=1734075512; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SLJxxCZMQjxFHfpRLUoPsE0Pog5U57DZgoMGmPXxLis=; b=lgRUwa/+hMwXno7DMkSCRW4ZccBFGhLPRSnWQcgRIm0sJ/1Q6SSNHEDi7F0A8pZ/5F 9dmkct5LDmc6xjUBy0PqLJ9beH4ohV+j1RIVkLOerE8x71lAr8hCK1MpgZHtJk13vACW JJmR+cwMxSdVNt0jV49zXAXEUjkiDA9LHmdfWYolb7WeNxyFU6qMpyxaXHx9mMxR1sHV U4U8qbzFzHqz6/vQaw0ZjEnAFeZG6ORXjpd0lBP7f2Nm9bSs7IqAumpD8lwN+td/yQLX Md+hGY3Tx2DtK7h3g+EpfOvZmGwxGtx6DawJ3/9lZI55AOGBc27bMy62vVsDqpqRl4r7 H31w== X-Forwarded-Encrypted: i=1; AJvYcCVdryYgODyHB136/U++NeJlzR4m20OpGCCB7hfLZ5TScM+/aPDx3LNot37WFf5qITKVmz5M/cBmFr8=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yx4lWWjM/QA/ySmuvUwHxBK8V6kwJ7CkbPEDmDaoWzLNGT0RLQG raseVL6yYU0rSzrTPmR6o6jFyTDpcjXrh3/mEgo8JfEzwjvwZmAHQ4GsIckkGsI9gYGTAPdjBJ0 fD8O0gg== X-Google-Smtp-Source: AGHT+IFHADbgNWu44wH+EjPynn/KpIRmLys7JfKxs6jd18rOnGXtQ37Irj6xBMwTLehW76cUlY5nbXBYX++6 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:bff4:a354:8911:79b3]) (user=irogers job=sendgmr) by 2002:a25:e907:0:b0:e39:6c75:dd22 with SMTP id 3f1490d57ef6-e3a0b0a8930mr3089276.2.1733470712462; Thu, 05 Dec 2024 23:38:32 -0800 (PST) Date: Thu, 5 Dec 2024 23:38:25 -0800 Message-Id: <20241206073828.1119464-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Subject: [PATCH v5 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 --- v5. Remove the word Since. v4. Since from Alejandro Colomar 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..1c6c38423 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 +Linux 2.6.22. .SH SEE ALSO .BR proc (5) From patchwork Fri Dec 6 07:38:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13896573 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 E5A05E77173 for ; Fri, 6 Dec 2024 07:38:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B2AD310E15A; Fri, 6 Dec 2024 07:38:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="dj7pYg7x"; 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 A506910E154 for ; Fri, 6 Dec 2024 07:38:35 +0000 (UTC) Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-6ef542990dbso20970457b3.1 for ; Thu, 05 Dec 2024 23:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1733470715; x=1734075515; 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=fbEVs7detr4gWlE1fo2icdJ/ly1cL/4ZTUPJqPQuitM=; b=dj7pYg7xUDwwkXhbeskYU8yQxghjhY9t1atNQdx840M6488RCuIVUTn5VHFUCzOUto umHN206jOVkH8P9SX9QdvCC50EwzhNtKFZ9P8cu42fRZ42t/AE2bxtzOPMsGxhRcbqxO /kWzImol7jLiTBjwdYYKxyvwdds58qW4rfQfsikfNnllRUvXxylIBiPXCHVocIBd9GLe RgSTnoXy5f8DyN9WLWm2iWwStLwt8Hc91n372d/bNmR9ziYVRVhpjfEoZheGp2lwL+08 y+8BgsnkDV4ZpXcOykLxf2lXidHi4dA8jz0TYGjRVaANOgZQQS7WtRXV1j845msEM/dY nJWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733470715; x=1734075515; 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=fbEVs7detr4gWlE1fo2icdJ/ly1cL/4ZTUPJqPQuitM=; b=skSEk4u3CfRvW5A0ZsVZVDzje2gtMRCz0rT74gxmyk4XULC7wG6Qp9EF2mSiJYT0Sp D12AX/KvqRMtCCSiNqrGNGXAtSgK2w7nOBkeGBEoFOmRkB6CwEpnHwmv7ZAhz+wUWpWe JhrKJZTXuaoX3Ae0rJdAMBRedaXz7oFXSTzJ59nK9Gt5acTjiCBZEYOjWujqewV4ic96 Wdb6rUan2QrAMGXmP4pDHvoLiI2gpT1eOoXQ5gcHwT/kgKeEtIeCll7S7ABQmsFuNXBa VHHsdHuDXIgMhae/bW5gOhvF82KOSYDmQsgc5NDxPRJIi+89N0mrhAowNqtD+2nlkigy ZBOw== X-Forwarded-Encrypted: i=1; AJvYcCU5RtAkfMXz4lRQeyGP3sjmpL29/th2ximd2tiEZiiRh3mPov6Rv9rfez/blCR9AeKngEXMESjWe9s=@lists.freedesktop.org X-Gm-Message-State: AOJu0YxAn/XN6nR6gfIrYTBRFTH/UEe9bCIGMflNv03V6P00r3njefuK OsO+xzzXo7mjlRcwBcq4Ci+71rjgz4yZES+8f5aYldsUzqe5SlKS44TcSYxr50neA9RsdB5jlFA GYh8qkg== X-Google-Smtp-Source: AGHT+IEnc5lvx3tnV6q+JZ+7oy3fAvJY1NjK6AF22JKF722V6Xkpco7cg4TiIjSPK1XA9uKJwGB0NGP7c9Nv X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:bff4:a354:8911:79b3]) (user=irogers job=sendgmr) by 2002:a05:690c:3143:b0:6ea:ecc3:ec61 with SMTP id 00721157ae682-6efe3bceae7mr17667b3.1.1733470714665; Thu, 05 Dec 2024 23:38:34 -0800 (PST) Date: Thu, 5 Dec 2024 23:38:26 -0800 In-Reply-To: <20241206073828.1119464-1-irogers@google.com> Message-Id: <20241206073828.1119464-2-irogers@google.com> Mime-Version: 1.0 References: <20241206073828.1119464-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Subject: [PATCH v5 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 --- v5. Switch .IR pid to .I pid --- 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 1c6c38423..2797ae216 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 +.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. From patchwork Fri Dec 6 07:38: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: 13896574 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 8BE4CE7717B for ; Fri, 6 Dec 2024 07:38:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA5D810E5F3; Fri, 6 Dec 2024 07:38:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="T4AcJqsB"; dkim-atps=neutral Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A55210E5F4 for ; Fri, 6 Dec 2024 07:38:37 +0000 (UTC) Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e3892eb6b1dso2897126276.2 for ; Thu, 05 Dec 2024 23:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1733470716; x=1734075516; 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=08qPRW9xswRt2OtHroBUTIZrJ7mnuAOFiexcUCiCKeI=; b=T4AcJqsBu+XWcDe4l94DD9ugSKwn2ejY/TMl+phIYmx/hypOUSWbvgdHRclz1njGMU B5a7iKJPffqSCKXdylrz9XUyC/ksd4dGip5b31QGGIL+th2JDjWHZ1wBHx0mo6parGcH LJQD9VcooPRXddkhAoUw+PLZiZ55P5oVNKmwlgKLby1SpokYVwz53ycFCt8Xmg7Z+Rq/ bjQoAbEwevX9IT5HYdJ4OfnAYjTAKX/YipCKKzU/frjXl5urxo3zN92W+vuj8InYp6bc jhoRcWv30S5nFVbzftHLYe+nig4GAbU8vVRW07O0YCC8cuOuNVJ1KlOBggcSLcBYMHdw 9R0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733470716; x=1734075516; 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=08qPRW9xswRt2OtHroBUTIZrJ7mnuAOFiexcUCiCKeI=; b=lnBg6epNshiNX6MiMeox74lm5kOknBz8fhq/obUq2ii3STgLVIw0R1qaDPJdqj2eFU F4NZSkiAX0zvA3Xs4Gq4hdzczcITty+ooCF7R2YNIt9bodPezYH58q58GuQST/fHQYZ8 v26v/GUmqwZZ2rc6rSxH5BE0bKKM5YKIUy3i8a4VD5Mn/6q50ElinluVih2Gb+VTxyOz YiczqgvxYMFq8fxgG/0K28UL4htGz2ESCgsN9j9GWfI4r/4w0zrDAxV4Ry1H6lWzdQZa Yr/0NFTRYWAqHbhWUJDygYSWSzlpcMgOWRgna8GnDoeFJF19CTjYD/E7Z66hty/bWxRD jp3A== X-Forwarded-Encrypted: i=1; AJvYcCXVtUACM4h0csk7wXsZd2HkE8JDBFpImGHYQWlZVb822yDlpAWQtAbW/LbDpD3354sh4mEh2HK9fpI=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyhRXKsvUjR2kjBEPGjm6JF18yVFU0gEXVwTh1VfakVgr2vd2yF U6hja34270fIa7k8Q/VHEVXXuGZ8AZR+3K3V0ddOZkWuK7S7KpouaUbT4M8afrAZ0qQ8hHubqDA VonJncQ== X-Google-Smtp-Source: AGHT+IEDRTiD4aFoP45cgyoosz12ZeHtxiOVt8IhT1Y6gGd2sajlkNmKprLDP9GTdgZBV9Sm7Qm7+AXk6YX4 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:bff4:a354:8911:79b3]) (user=irogers job=sendgmr) by 2002:a25:fc1c:0:b0:e33:111b:c6a4 with SMTP id 3f1490d57ef6-e3a0b073bbdmr902276.1.1733470716612; Thu, 05 Dec 2024 23:38:36 -0800 (PST) Date: Thu, 5 Dec 2024 23:38:27 -0800 In-Reply-To: <20241206073828.1119464-1-irogers@google.com> Message-Id: <20241206073828.1119464-3-irogers@google.com> Mime-Version: 1.0 References: <20241206073828.1119464-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Subject: [PATCH v5 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. --- 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 2797ae216..c4914f1f3 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 Dec 6 07:38: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: 13896575 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 ED4DFE77173 for ; Fri, 6 Dec 2024 07:38:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5826E10E5F4; Fri, 6 Dec 2024 07:38:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="EYVPpQo3"; 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 CA5CC10E5F4 for ; Fri, 6 Dec 2024 07:38:39 +0000 (UTC) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-6ef542990dbso20970987b3.1 for ; Thu, 05 Dec 2024 23:38:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1733470719; x=1734075519; 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=6tcWcwiswh578N5Sbvm8C5ZdbM+ZrqY2qCpqOjcQh4Y=; b=EYVPpQo3Mqpp+X586UXDunkOCwJyFWcizSPzhLJOhAABgP3lhdGdLtyMCL8IvAOTZp JDvt+gvEOMO2C8W9BMqzkO7tDv0/mQcnThO12IQz65c/ys48EenOst/ZcSV0IFlS+IVi FWJ4ZyUbswVYRAW3A8SwJYqLRaisvrGl1VtL197Hl0Hhnvz3/9AXefmC5mj6urfsUoPd LQln9CI7eL9tRYvbyBQ1OkO5+Xr8WI/+b5P+uw3FwkAsE6EsxHsxFGx6yrnzhP6AXF92 BZCVgW0vkXavPDWwVlYD5oXJHA9bKie/f/MQvFbTx02TLFKA/uX6bkT7r6tmLtJ1tGUm qEyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733470719; x=1734075519; 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=6tcWcwiswh578N5Sbvm8C5ZdbM+ZrqY2qCpqOjcQh4Y=; b=eo/Ez1vaGOKtdihdj6SUQA8wEB/rJOe42lhPl3QUxKtg1f+moAK6H1oQgIYsTUVIQM XlBtErChZ4vvXpx62YRx32DXemHnljN4TXNjSXQ0sizTRMDTZ42Q+H4HvakjQJUdlg7J 6H8WvG5X0GgVXrSJp8CJF8ZT4vgRKZAYI/Dvx+2chAxKxA1bipG2uX4gB7TKzC4SU7Ib jSexUsNeWi6IGHuKvu4jD3heI2sZpil/RANwR59ws0xvDLMzlT/7hXboDkvCF/07i1OX 9HfSb2Md610uMF64U+ltnMMXbfxrbBS+81rMnVKG2/8ciAW+/01s0y0lLiyPYVJespI8 W13w== X-Forwarded-Encrypted: i=1; AJvYcCX6bvaChdnv06h+q6fQLmPZ//W+v7/NnxOpStjpp1C9UEm3bEFsx5407UlZImkltWyrpYN7rFVo65A=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yx/Ld7ozrD5kmYvoLzEovoKWAx64s/1hJescJMqKldz52rAknJ4 G0gsvleWT01WqIn0bCaXgnu+AosQoq+giggFkE7Bv5Fj+A6osH8HzINigTSNgCNdPSbCZGBdoKl D8Gjmrg== X-Google-Smtp-Source: AGHT+IHrVWBoiYYD/xmXDfRagPogDl7UXMcm4NMrSYV9vi8DJr6U4VViFkFNqaosBMt+/zmkxpKfltUluk4l X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:bff4:a354:8911:79b3]) (user=irogers job=sendgmr) by 2002:a05:690c:5a05:b0:6ee:c295:c76e with SMTP id 00721157ae682-6efe3c8f290mr8697b3.6.1733470718867; Thu, 05 Dec 2024 23:38:38 -0800 (PST) Date: Thu, 5 Dec 2024 23:38:28 -0800 In-Reply-To: <20241206073828.1119464-1-irogers@google.com> Message-Id: <20241206073828.1119464-4-irogers@google.com> Mime-Version: 1.0 References: <20241206073828.1119464-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog Subject: [PATCH v5 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 --- v5. Update style a suggested-by G. Branden Robinson --- man/man5/proc_pid_fdinfo.5 | 107 +++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/man/man5/proc_pid_fdinfo.5 b/man/man5/proc_pid_fdinfo.5 index c4914f1f3..bb77ee9a7 100644 --- a/man/man5/proc_pid_fdinfo.5 +++ b/man/man5/proc_pid_fdinfo.5 @@ -300,6 +300,113 @@ 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 +.BR drm\-driver: " .+ (mandatory)" +The name this driver registered. +.TP +.BR drm\-pdev: " [0-9A-F]{4}:[0-9A-F]{2}:[0-9A-F]{2}.[0-9A-F]" +For PCI devices this should contain the PCI slot address of the device +in question. +.TP +.BR 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 +.IR engine-name , +with possible values documented in the driver specific documentation. +.TP +.BI drm\-engine\- engine-name :\c +\& [0-9]+ ns +GPU engine utilization, time spent busy executing workloads for this client. +.TP +.BI drm\-engine\-capacity\- engine-name :\c +\& [0-9]+ +Capacity of the engine if not 1, cannot be 0. +.TP +.BI drm\-cycles\- engine-name :\c +\& [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 +.BI drm\-total\-cycles\- engine-name :\c +\& [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\-\fIengine-name\fP. +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 +.IR region . +The name "memory" is reserved to refer to normal system memory. +.TP +.BI drm\-memory\- region :\c +\& [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 +.BI drm\-shared\- region :\c +\& [0-9]+ [KiB|MiB] +The total size of buffers that are shared with another file (e.g., have more +than a single handle). +.TP +.BI drm\-total\- region :\c +\& [0-9]+ [KiB|MiB] +The total size of buffers that including shared and private memory. +.TP +.BI drm\-resident\- region :\c +\& [0-9]+ [KiB|MiB] +The total size of buffers that are resident in the specified region. +.TP +.BI drm\-purgeable\- region :\c +\& [0-9]+ [KiB|MiB] +The total size of buffers that are purgeable. +.TP +.BI drm\-active\- region :\c +\& [0-9]+ [KiB|MiB] +The total size of buffers that are active on one or more engines. + .SH HISTORY Linux 2.6.22. .SH SEE ALSO