From: Mingming Cao <cmm@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: ray-lk@madrabbit.org, sct@redhat.com, pbadari@us.ibm.com,
linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net
Subject: Re: [Ext2-devel] Re: [PATCH 2/3] ext3 reservation allow turn off for specifed file
Date: 26 Oct 2004 09:53:20 -0700 [thread overview]
Message-ID: <1098809607.8919.7466.camel@w-ming2.beaverton.ibm.com> (raw)
In-Reply-To: <20041025164516.1f02bb9f.akpm@osdl.org>
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
next prev parent reply other threads:[~2004-10-26 16:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-15 13:27 Ext3 -mm reservations code: is this fix really correct? Stephen C. Tweedie
2004-10-15 16:01 ` [Ext2-devel] " mingming cao
2004-10-15 16:40 ` Stephen C. Tweedie
2004-10-15 20:29 ` mingming cao
2004-10-15 22:20 ` Stephen C. Tweedie
2004-10-15 22:34 ` mingming cao
2004-10-18 22:55 ` [PATCH 2/3] ext3 reservation allow turn off for specifed file Mingming Cao
2004-10-18 23:42 ` Andrew Morton
2004-10-19 1:01 ` Mingming Cao
2004-10-20 17:55 ` Ray Lee
2004-10-25 20:33 ` [Ext2-devel] " Mingming Cao
2004-10-25 23:05 ` Mingming Cao
2004-10-25 23:45 ` Andrew Morton
2004-10-26 16:53 ` Mingming Cao [this message]
2004-10-26 20:18 ` Andrew Morton
2004-10-26 23:01 ` Mingming Cao
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=1098809607.8919.7466.camel@w-ming2.beaverton.ibm.com \
--to=cmm@us.ibm.com \
--cc=akpm@osdl.org \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@us.ibm.com \
--cc=ray-lk@madrabbit.org \
--cc=sct@redhat.com \
/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
all inboxes | Powered by JetHome®