public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: linux-kernel@vger.kernel.org, rgooch@atnf.csiro.au
Subject: Re: RFC/Patch - Implode devfs
Date: Wed, 1 Jan 2003 20:00:32 +0000	[thread overview]
Message-ID: <20030101200032.A29992@infradead.org> (raw)
In-Reply-To: <200301011913.LAA02338@baldur.yggdrasil.com>; from adam@yggdrasil.com on Wed, Jan 01, 2003 at 11:13:02AM -0800

On Wed, Jan 01, 2003 at 11:13:02AM -0800, Adam J. Richter wrote:
> >I wonder whether some code uses struct devfs_entry * directly, at least
> >I was tempted to do so in the scsi midlayer.
> 
> 	Thankfully, struct devfs_entry* is an opaque pointer.

I know.  IMHO it's still preferable to use struct devfs_entry * over
devfs_handle_t like all the devfs mess does.  This would work when
devfs_handle_t suddenly points to something else.

The
> struct is only defined in fs/devfs/base.c.  Searching with
> "find . -name '*.[ch]' | xargs grep -w devfs_entry" indicates
> that everyone declares devfs_handle_t instead of "struct devfs_entry*",
> so that's not a problem either.

OK.

> 	Your question prompted me to do a little bit of research.
> I believe the list of routines that my reduced devfs does not
> implement is as follows:
> 
> devfs_get_handle
> devfs_get_handle_from_inode
> devfs_set_file_size
> devfs_get_info
> devfs_set_info
> devfs_get_parent
> devfs_get_first_child
> devfs_get_next_sibling
> devfs_get_name
> devfs_register_tape
> devfs_unregister_tape
> devfs_alloc_major
> devfs_dealloc_major
> devfs_alloc_devnum
> devfs_dealloc_devnum
> 
> 	Storing this list in /tmp/names and grepping for these
> identifiers shows only a small number of hits:

<snip>

At least the devfs_set_* / devfs_get_* can be removed easily when
leaving the sn1 stuff danling.  But I already discussed that with
the responsible persons.

> >Is it supposed to work out of the box on previously (and for 2.4 use)
> >non-devfs systems?  I still don't plan to use devfs, but such an effort
> >is really worth some debugging help..
> 
> 	Thanks for the encouragement.

So is the answer yes or no now? :)

> >Why do you want to allocate it statically?
> 
> 	A few fields could be initialized statically.  A few bytes
> would be saved from memory allocation overhead.  Cache locality would
> improve infinitesemally.  If all one-instance filesystems are changed
> to do this, it will eliminate one memory allocation failure branch in
> fs/super.c.  Perhaps the same could be done with the root inode.  I
> know this is pretty marginal and might end up adding more complexity
> than it would save.  It's at the bottom of my TODO (or "to try") list.

Hmm.  I don't think it's worth the effort, but if you can do it without
introducing major ugliness you have my vote.


  reply	other threads:[~2003-01-01 19:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-01 19:13 RFC/Patch - Implode devfs Adam J. Richter
2003-01-01 20:00 ` Christoph Hellwig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-02 16:49 Adam J. Richter
2003-01-02  0:51 Adam J. Richter
2003-01-02 12:31 ` Dave Jones
2003-01-02 12:51 ` Dave Jones
2003-01-01  7:08 Adam J. Richter
2003-01-01  2:24 Adam J. Richter
2003-01-01 10:40 ` Christoph Hellwig

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=20030101200032.A29992@infradead.org \
    --to=hch@infradead.org \
    --cc=adam@yggdrasil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgooch@atnf.csiro.au \
    /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