From: Daniel Phillips <phillips@bonn-fries.net>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Legacy Fishtank <garzik@havoc.gtf.org>,
linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net,
Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
Alexander Viro <viro@math.psu.edu>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [RFC] [PATCH] Clean up fs.h union for ext2
Date: Sun, 6 Jan 2002 04:32:13 +0100 [thread overview]
Message-ID: <E16N42t-0001It-00@starship.berlin> (raw)
In-Reply-To: <5.1.0.14.2.20020105142339.03156750@pop.cus.cam.ac.uk> <5.1.0.14.2.20020105145226.03163170@pop.cus.cam.ac.uk>
In-Reply-To: <5.1.0.14.2.20020105145226.03163170@pop.cus.cam.ac.uk>
On January 5, 2002 03:56 pm, Anton Altaparmakov wrote:
> At 14:47 05/01/02, Daniel Phillips wrote:
> >On January 5, 2002 03:29 pm, Anton Altaparmakov wrote:
> > > If anyone wants a look NTFS TNG already has gone all the way (for a
> > > while now in fact). Both fs inode and super block are fs internal slab
> > > caches and both use static inline NTFS_I / NTFS_SB functions and the
> > > ntfs includes from linux/fs.h are removed altogether. Code is in
> > > sourceforge cvs. For instructions how to download the code or to browse
> > > it online, see:
> >
> >Nice, did you use the generic_ip fields?
>
> Yes. From ntfs-driver-tng/linux/fs/ntfs/fs.h:
>
> [...]
>
> static inline ntfs_inode *NTFS_I(struct inode *inode)
> {
> return inode->u.generic_ip;
> }
OK, so are doing two kmem_cache_allocs for every new_inode. With the
unbork.fs patch you could save 50% of the kmem_cache_allocs by
rewriting as follows:
static inline ntfs_inode *NTFS_I(struct inode *inode)
{
/* should bug-check to be sure it's really one of ours */
return (ntfs_inode *) &(inode->u);
}
And you just fill in the inode_size field of the file_system_type
declaration. The vfs will then handle all the details of allocating/freeing
inodes and the inode slab cache. (Note that Al seems to think this is the
wrong way of doing it, but hasn't said why he thinks that yet.)
For superblocks - are you sure you want a dedicated slab cache for those? It
seems to me that kmalloc is perfectly appropriate for this, and saves the
code needed to set up, keep track of, and tear down the slab cache.
--
Daniel
next prev parent reply other threads:[~2002-01-06 3:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-27 3:21 Daniel Phillips
2001-12-27 3:28 ` Legacy Fishtank
2001-12-27 3:35 ` Arnaldo Carvalho de Melo
2001-12-27 3:52 ` Daniel Phillips
2002-01-05 14:56 ` Anton Altaparmakov
2002-01-06 3:32 ` Daniel Phillips [this message]
2002-01-07 0:30 ` Anton Altaparmakov
2002-01-07 1:27 ` Arnaldo Carvalho de Melo
2002-01-07 2:12 ` Daniel Phillips
2002-01-07 2:18 ` Arnaldo Carvalho de Melo
2002-01-07 2:22 ` Arnaldo Carvalho de Melo
2001-12-27 18:14 ` [Ext2-devel] " Andreas Dilger
2001-12-28 1:55 ` Daniel Phillips
2001-12-29 16:04 ` Oliver Xymoron
2001-12-29 21:01 ` Andreas Dilger
2001-12-29 21:30 ` Oliver Xymoron
2001-12-29 21:08 ` Andrew Morton
2002-01-02 10:26 ` Pavel Machek
2002-01-05 14:29 ` Anton Altaparmakov
2002-01-05 14:47 ` Daniel Phillips
2002-01-06 4:04 ` Anton Altaparmakov
2002-01-06 22:42 ` Daniel Phillips
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=E16N42t-0001It-00@starship.berlin \
--to=phillips@bonn-fries.net \
--cc=acme@conectiva.com.br \
--cc=aia21@cam.ac.uk \
--cc=ext2-devel@lists.sourceforge.net \
--cc=garzik@havoc.gtf.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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
all inboxes | Powered by JetHome®