Re: [patch] smarter atime updates

Chris Mason
2001-11-30T17:30:31Z

On Friday, November 30, 2001 01:44:42 PM -0200 Marcelo Tosatti
<marcelo@conectiva.com.br> wrote:

>
> Now are you sure this can't break anything ?
>

It shouldn't hurt reiserfs at least, I like it.

-chris

> On Thu, 29 Nov 2001, Andrew Morton wrote:
>
>> mark_inode_dirty() is quite expensive for journalling filesystems,
>> and we're calling it a lot more than we need to.
>>
>> --- linux-2.4.17-pre1/fs/inode.c Mon Nov 26 11:52:07 2001
>> +++ linux-akpm/fs/inode.c Thu Nov 29 21:53:02 2001
>> @@ -1187,6 +1187,8 @@ void __init inode_init(unsigned long mem
>>
>> void update_atime (struct inode *inode)
>> {
>> + if (inode->i_atime == CURRENT_TIME)
>> + return;
>> if ( IS_NOATIME (inode) ) return;
>> if ( IS_NODIRATIME (inode) && S_ISDIR (inode->i_mode) ) return;
>> if ( IS_RDONLY (inode) ) return;
>>
>>
>> with this patch, the time to read a 10 meg file with 10 million
>> read()s falls from 38 seconds (ext3), 39 seconds (reiserfs) and
>> 11.6 seconds (ext2) down to 10.5 seconds.