[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ext4
Subject:    Re: [Ext2-devel] Re: [PATCH 2/3] ext3 reservation allow turn off
From:       Mingming Cao <cmm () us ! ibm ! com>
Date:       2004-10-26 16:53:20
Message-ID: 1098809607.8919.7466.camel () w-ming2 ! beaverton ! ibm ! com
[Download RAW message or body]

On Mon, 2004-10-25 at 16:45, Andrew Morton wrote:
> Mingming Cao <cmm@us.ibm.com> wrote:
> >
> > 	/*
> > +	 * if user passed a seeky-access hint to kernel,
> > +	 * through POSIX_FADV_RANDOM,(file->r_ra.ra_pages is cleared)
> > +	 * turn off reservation for block allocation correspondingly.
> > +	 *
> > +	 * Otherwise, if user switch back to POSIX_FADV_SEQUENTIAL or
> > +	 * POSIX_FADV_NORMAL, re-open the reservation window.
> > +	 */
> > +	windowsz = atomic_read(&EXT3_I(inode)->i_rsv_window.rsv_goal_size);
> > +	if ((windowsz > 0) && (!file->f_ra.ra_pages))
> > +		atomic_set(&EXT3_I(inode)->i_rsv_window.rsv_goal_size, -1);
> > +	if ((windowsz == -1) && file->f_ra.ra_pages)
> > +		atomic_set(&EXT3_I(inode)->i_rsv_window.rsv_goal_size,
> > +					EXT3_DEFAULT_RESERVE_BLOCKS);
> > +
> 
> It's pretty sad that we add this extra code into ext3_prepare_write() -
> it's almost never actually executed.
> 
:(

> I wonder how important this optimisation really is?  I bet no applications
> are using posix_fadvise(POSIX_FADV_RANDOM) anyway.
> 
I don't know if there is application using the POSIX_FADV_RANDOM. No? If
this is the truth, I think we don't need this optimization at present.
Logically reservation does not benefit seeky random write, but there is
no benchmark showing performance issue so far. We have already provided
ways for applications turn off reservation through the existing ioctl
for specified file and -o noreservation mount option for the whole
filesystem.

> It we really see that benefits are available from this approach we probably
> need to bite the bullet and add file_operations.fadvise()
> 
I agree.

Mingming




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Ext2-devel mailing list
Ext2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ext2-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic