The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: ron minnich <rminnich@gmail.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] 4.1c bsd ptrace man entry ("ptrace is unique and arcane")
Date: Wed, 26 Jun 2019 11:41:44 -0400	[thread overview]
Message-ID: <20190626154144.GD3116@mit.edu> (raw)
In-Reply-To: <CAP6exYKFkDYYYNbkhUxC1x4kSf0w-TJvy0L7udcoP4btSmBGxQ@mail.gmail.com>

On Tue, Jun 25, 2019 at 06:03:47PM -0700, ron minnich wrote:
> 
> I do recall (possibly wrongly) at some point in the 2000s there was an
> effort to stop putting stuff in /proc, but rather in /sys, but that
> seems to have not worked out. /proc is just too convenient a place,
> and by convention, lots of stuff lands there.

When looking at linux's /proc, there are three broad categories of
stuff:

	* Traditional process-specific files, in /proc/<pid>/...
	* System configuration parameters, aka "sysctls", which are
		in /proc/sys/...
	* Other miscellaneous ad-hoc files

It's the last category where there has been a big push to only add new
files in /sys (aka sysfs), and in general the vast majority of new
files have been going into sysfs, and not into /proc.  However, for
backwards compatibility reasons, all of the old ad-hoc /proc files
have stuck around.

The files in /sys and /proc/sys tend to be very discplined, in that
it's one value per file.  That's both a good and bad thing.  We don't
have a general, efficient, way of supporting files that return a
variable list of fields, especially if there is no obvious key.
(e.g., like /proc/mounts).  And it's certainly the case that looking
at, say, /proc/scsi/scsi is much more conveient that iterating over
/sys/bus/scsi/devices and grabbing a huge number of tiny files to get
the same information.

This last is the usual reason where there is temptation by some
developers to add a new file in /proc, as opposed to adding several
dozen files (per device/process/network connection) in /sys and then
needing to promulgate a perl/python/go program to actually get a user
friendly status report out.

						- Ted

  parent reply	other threads:[~2019-06-26 15:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 19:33 Norman Wilson
2019-06-25 19:42 ` Bakul Shah
2019-06-25 20:35 ` Clem Cole
2019-06-25 23:52 ` ron minnich
2019-06-26  0:37   ` Rob Pike
2019-06-26  0:46     ` Larry McVoy
2019-06-26  0:56       ` Rob Pike
2019-06-26  1:03       ` ron minnich
2019-06-26  1:12         ` George Michaelson
2019-06-26  1:32           ` Noel Hunt
2019-06-26 15:41         ` Theodore Ts'o [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-06-25  2:27 Kirk McKusick
2019-06-25  1:08 ron minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190626154144.GD3116@mit.edu \
    --to=tytso@mit.edu \
    --cc=rminnich@gmail.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).