xfs
[Top] [All Lists]

Re: Documenting MS_LAZYTIME

To: Eric Sandeen <sandeen@xxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>
Subject: Re: Documenting MS_LAZYTIME
From: "Michael Kerrisk (man-pages)" <mtk.manpages@xxxxxxxxx>
Date: Sat, 21 Feb 2015 08:57:05 +0100
Cc: mtk.manpages@xxxxxxxxx, Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, Linux btrfs Developers List <linux-btrfs@xxxxxxxxxxxxxxx>, XFS Developers <xfs@xxxxxxxxxxx>, linux-man@xxxxxxxxxxxxxxx, Linux-Fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, Linux API <linux-api@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=MbGBs06GcQ8Iv5nmW1wnMeqScN7uYJs/vur75usbSFM=; b=Ycx6y5J0L1k8923jHfuz5orIW6pB/36Aq0XwIYvBYF+8Vkl4Bmv1NRKSOYStj+HwrL 48Nr/J4AOmqZWdsPkaKR2BijzoFunU8sDjRrLBavxQtTyGNlW3hQJVSypUyusZLZjfsx JJSh9RVu8cWXHpQ2nY/0bDcZNTombzg6icBhBc0e5U3/t953fM09VmE4iCKvuXftbocn Xh5wnJuuVsFhhEdJrZrp5ju+0Hx0aM21KcmoGfpFE0miq4SIUGeS8n8/PG24xnW48n76 0pdDYrQqZLMBE4jxGhPDX2YM9L7SWqbLrxaMxizI2b5LCXHUFn9U3O+pWUyLcJj/yFlb U69g==
In-reply-to: <54E7578E.4090809@xxxxxxxxxx>
References: <CAHO5Pa0k7QkV_6BDjwTVxa7LV9tFyN9nGFFcSvOC6HYO08wfrw@xxxxxxxxxxxxxx> <54E7578E.4090809@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
On 02/20/2015 04:49 PM, Eric Sandeen wrote:
> On 2/20/15 2:50 AM, Michael Kerrisk wrote:
>> Hello Ted,
>>
>> Based on your commit message 0ae45f63d4e, I I wrote the documentation
>> below for MS_LAZYTIME, to go into the mount(2) man page. Could you
>> please check it over and let me know if it's accurate. In particular,
>> I added pieces marked with "*" below that were not part of the commit
>> message and I'd like confirmation that they're accurate.
>>
>> Thanks,
>>
>> Michael
>>
>> [[
>>        MS_LAZYTIME (since Linux 3.20)
>>               Only  update  filetimes (atime, mtime, ctime) on the in-
>>               memory version of the file  inode.   The  on-disk  timeâ
>>               stamps are updated only when:
> 
> "filetimes" and "file inode" seems a bit awkward.  How about:
> 
>>        MS_LAZYTIME (since Linux 3.20)
>>              Reduce on-disk updates of inode timestamps (atime, mtime, ctime)
>>              by maintaining these changes only in memory, unless:
> 
> (maybe I'm bike-shedding too much, if so, sorry).

Nah it''s the good sort of bikeshedding ;-). "filetimes" was a wordo--I 
meant "timestamps". I've taken your wording mostly.

> 
>>               (a)  the inode needs to be updated for some change unreâ
>>                    lated to file timestamps;
>>
>>               (b)  the application  employs  fsync(2),  syncfs(2),  or
>>                    sync(2);
>>
>>               (c)  an undeleted inode is evicted from memory; or
>>
>> *             (d)  more than 24 hours have passed since the i-node was
>> *                  written to disk.
> 
> Please don't use "i-node" - simply "inode" is much more common in the manpages
> AFAICT.

Yup, that was a typo. Fixed.

>>               This mount option significantly reduces  writes  to  the
>>               inode  table  for workloads that perform frequent random
>>               writes to preallocated files.
> 
> This seems like an overly specific description of a single workload out
> of many which may benefit, but what do others think?  

Fair enough. I reworded that to note it as an example.

> "inode table" is also fairly extN-specific.

I'll await further input on that point.

Now we have:

       MS_LAZYTIME (since Linux 3.20)
              Reduce  on-disk  updates  of  inode  timestamps  (atime,
              mtime, ctime) by maintaining these changes only in  memâ
              ory.  The on-disk timestamps are updated only when:

              (a)  the inode needs to be updated for some change unreâ
                   lated to file timestamps;

              (b)  the application  employs  fsync(2),  syncfs(2),  or
                   sync(2);

              (c)  an undeleted inode is evicted from memory; or

              (d)  more  than 24 hours have passed since the inode was
                   written to disk.

              This mount option significantly reduces  writes  to  the
              inode  table  for  some workloads (e.g., when performing
              frequent random writes to preallocated files).

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

<Prev in Thread] Current Thread [Next in Thread>