Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-25 Thread Boaz Harrosh
On 11/25/2014 06:33 AM, Theodore Ts'o wrote: I was concerned about putting them on the dirty inode list because it would be extra inodes for the writeback threads would have to skip over and ignore (since they would not be dirty in the inde or data pages sense). Another solution would be

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-25 Thread Jan Kara
On Mon 24-11-14 23:33:35, Ted Tso wrote: On Tue, Nov 25, 2014 at 12:52:39PM +1100, Dave Chinner wrote: Eviction is too late for this. I'm pretty sure that it won't get this far as iput_final() should catch the I_DIRTY_TIME in the !drop case via write_inode_now(). Actually, the tracepoint

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-25 Thread Jan Kara
On Mon 24-11-14 23:33:35, Ted Tso wrote: On Tue, Nov 25, 2014 at 12:52:39PM +1100, Dave Chinner wrote: +static void flush_sb_dirty_time(struct super_block *sb) +{ ... +} This just seems wrong to me, not to mention extremely expensive when we have millions of cached inodes on

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-25 Thread Theodore Ts'o
On Tue, Nov 25, 2014 at 06:19:27PM +0100, Jan Kara wrote: Actually, I'd also prefer to do the writing from iput_final(). My main reason is that shrinker starts behaving very differently when you put inodes with I_DIRTY_TIME to the LRU. See inode_lru_isolate() and in particular: /*

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-25 Thread Theodore Ts'o
On Tue, Nov 25, 2014 at 06:30:40PM +0100, Jan Kara wrote: This would be possible and as Boaz says, it might be possible to reuse the same list_head in the inode for this. Getting rid of the full scan of all superblock inodes would be nice (as the scan gets really expensive for large numbers

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-25 Thread Jan Kara
On Tue 25-11-14 12:57:16, Ted Tso wrote: On Tue, Nov 25, 2014 at 06:19:27PM +0100, Jan Kara wrote: Actually, I'd also prefer to do the writing from iput_final(). My main reason is that shrinker starts behaving very differently when you put inodes with I_DIRTY_TIME to the LRU. See

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-25 Thread Dave Chinner
On Mon, Nov 24, 2014 at 11:33:35PM -0500, Theodore Ts'o wrote: On Tue, Nov 25, 2014 at 12:52:39PM +1100, Dave Chinner wrote: +static void flush_sb_dirty_time(struct super_block *sb) +{ ... +} This just seems wrong to me, not to mention extremely expensive when we have millions

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-24 Thread Dave Chinner
On Fri, Nov 21, 2014 at 02:59:22PM -0500, Theodore Ts'o wrote: Add a new mount option which enables a new lazytime mode. This mode causes atime, mtime, and ctime updates to only be made to the in-memory version of the inode. The on-disk times will only get updated when (a) if the inode needs

Re: [PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-24 Thread Theodore Ts'o
On Tue, Nov 25, 2014 at 12:52:39PM +1100, Dave Chinner wrote: +static void flush_sb_dirty_time(struct super_block *sb) +{ ... +} This just seems wrong to me, not to mention extremely expensive when we have millions of cached inodes on the superblock. #1, It only gets called on a

[PATCH 2/4] vfs: add support for a lazytime mount option

2014-11-21 Thread Theodore Ts'o
Add a new mount option which enables a new lazytime mode. This mode causes atime, mtime, and ctime updates to only be made to the in-memory version of the inode. The on-disk times will only get updated when (a) if the inode needs to be updated for some non-time related change, (b) if userspace