From: Andy Lutomirski <luto@amacapital.net>
To: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 0/4 v3] fs: Remove i_devices from struct inode
Date: Tue, 4 Nov 2014 12:14:26 -0800 [thread overview]
Message-ID: <CALCETrV3DauoM0x9aiEdKtZLxXqfeEapsWD-t3n_norkX5To7Q@mail.gmail.com> (raw)
In-Reply-To: <20141104195514.GA28531@quack.suse.cz>
On Tue, Nov 4, 2014 at 11:55 AM, Jan Kara <jack@suse.cz> wrote:
> On Tue 04-11-14 11:47:21, Andy Lutomirski wrote:
>> On 11/04/2014 07:39 AM, Al Viro wrote:
>> > On Tue, Nov 04, 2014 at 11:27:27AM +0100, Jan Kara wrote:
>> >> Hello,
>> >>
>> >> this patch set removes use of i_devices from block and character device
>> >> code and thus we can remove the list head from struct inode thus saving two
>> >> pointers in it. As Christoph has reviewed the series, can you please merge
>> >> it Al? Thanks!
>> >>
>> >> Since v2 I've added reviewed-by tags from Christoph and changed one variable
>> >> name in cdev_forget().
>> >>
>> >> Since v1 I have split the patches and properly handled character devices (I
>> >> broke them last time as Christoph pointed out).
>> >
>> > My problem with that is in buggered module refcounts (which was the reason
>> > for doing those non-counting references back then). Suppose you open
>> > /dev/some_char_device and close it; having the module pinned down until
>> > the inode of that sucker gets evicted by dcache/icache memory pressure
>> > would be wrong - it _isn't_ in use, and there's no way short of forcing
>> > the full eviction of VFS caches to get it possible to unload...
>> >
>>
>> At the risk of asking what may be a rather dumb question...
>>
>> Why do device node inodes need to be cached at all? In other words,
>> when you try open a device node, can't the kernel materialize the inode
>> from just information that's in the dentry without touching the
>> filesystem at all? If that's true, couldn't all device inodes be
>> dropped from icache as soon as they're unreferenced?
>>
>> (Yes, there's mtime, but I never understood why tracking mtime on device
>> nodes made any sense in the first place.)
> I can see a few reasons:
> 1) positive dentry without inode - no-no for dcache.
> 2) how would you get the information which device the dentry references?
> 3) what would you gain to outweight the complications and special code
> paths?
>
Yeah, this idea clearly doesn't work. But I wonder whether the
revised variant (which may be just moving cd_forget and bd_forget from
evict to iput_final) would work.
--Andy
> Honza
> --
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
--
Andy Lutomirski
AMA Capital Management, LLC
next prev parent reply other threads:[~2014-11-04 20:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 10:27 [PATCH 0/4 v3] fs: Remove i_devices from struct inode Jan Kara
2014-11-04 10:27 ` [PATCH 1/4] blockdev: Don't use i_devices inode field Jan Kara
2014-11-04 10:27 ` [PATCH 2/4] chardev: Increment cdev reference count when i_cdev references it Jan Kara
2014-11-04 10:27 ` [PATCH 3/4] chardev: Don't use i_devices inode field Jan Kara
2014-11-04 10:27 ` [PATCH 4/4] fs: Remove i_devices list head Jan Kara
2014-11-04 15:39 ` [PATCH 0/4 v3] fs: Remove i_devices from struct inode Al Viro
2014-11-04 19:47 ` Andy Lutomirski
2014-11-04 19:52 ` Andy Lutomirski
2014-11-04 20:16 ` Al Viro
2014-11-04 20:24 ` Andy Lutomirski
2014-11-04 19:55 ` Jan Kara
2014-11-04 20:14 ` Andy Lutomirski [this message]
2014-11-04 20:20 ` Al Viro
2014-11-04 20:25 ` Andy Lutomirski
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=CALCETrV3DauoM0x9aiEdKtZLxXqfeEapsWD-t3n_norkX5To7Q@mail.gmail.com \
--to=luto@amacapital.net \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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).