cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 Patch] [Try 2] GFS2: Reduce file fragmentation
Date: Wed, 11 Jul 2012 19:14:33 +0100	[thread overview]
Message-ID: <1342030473.2700.61.camel@menhir> (raw)
In-Reply-To: <6480215b-2a2f-4eca-8ceb-c4126c67f91e@zmail12.collab.prod.int.phx2.redhat.com>

Hi,

On Wed, 2012-07-11 at 14:07 -0400, Bob Peterson wrote:
[snip]
>  
> | What is the difference between rs_free and rs_blks? Shouldn't these
> | two
> | always be identical, since there is no point in reserving blocks
> | which
> | are not free.
> 
> I guess I used a misleading variable name. The two variables have
> two meanings and both are needed. I renamed variable rs_blks to rs_len
> because it represents the length of the reservation.
> 
Thats not really answering the question though... all the blocks in the
reservation must be free, otherwise there is no point in reserving them.
So rs_free should be identical to rs_len or whatever it is called.
Either that or maybe I'm not understanding why there are two different
variables?

[snip]
> | 
> | I'm not sure that I understand this comment at all. Currently with
> | directories we never deallocate any blocks at all until the directory
> | is
> | deallocated when it is unlinked. We will want to extend this to
> | directories eventually, even if we don't do that immediately.
> 
> I clarified the comment to make it more clear what's going on.
> I'm talking about gaps in the _reservation_ not gaps in the blocks.
> The current algorithm makes assumptions based on the fact that block
> reservations don't have gaps, and the "next" free block will be the
> successor to the last claimed. If you use reservations for directories,
> what can happen is that two files may be created, which claims two
> blocks in the reservation. If the first file is deleted from the
> directory, that block becomes a "hole" in the reservation, which breaks
> the code with its current assumptions. We either have to:
> (a) keep the current assumptions which make block claims faster, or
> (b) Make no such assumptions and implement a bitmap-like search of the
>     reservation that can fill holes. It wouldn't be too tough to do,
>     especially since we already have nicely tuned functions to do it.
>     I'm just worried that it's going to hurt performance.
>  
That is just a bug in the way we are doing the allocations. The
allocation of new inodes should be done based on the inode's own
reservation, and not on the reservation of its parent directory. That is
something else on the "to fix" list, but it is complicated to do,

Steve.




  reply	other threads:[~2012-07-11 18:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <785c19c3-631a-4976-84fd-048876691678@zmail12.collab.prod.int.phx2.redhat.com>
2012-07-05 21:58 ` [Cluster-devel] [GFS2 Patch] [Try 2] GFS2: Reduce file fragmentation Bob Peterson
2012-07-10 14:23   ` Steven Whitehouse
2012-07-11 18:07     ` Bob Peterson
2012-07-11 18:14       ` Steven Whitehouse [this message]
2012-07-11 18:51         ` Bob Peterson
2012-07-11 18:10     ` [Cluster-devel] [GFS2 Patch] [Try 3] " Bob Peterson
2012-07-12 10:01       ` Steven Whitehouse
2012-07-12 19:28         ` [Cluster-devel] [GFS2 Patch] [Try 4] " Bob Peterson
2012-07-13  9:36           ` Steven Whitehouse
2012-07-13 12:55             ` Bob Peterson
2012-07-13 13:49               ` Steven Whitehouse
2012-07-18 16:26                 ` [Cluster-devel] [GFS2 Patch] [Try 5] " Bob Peterson
2012-07-19 14:36                   ` Steven Whitehouse

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=1342030473.2700.61.camel@menhir \
    --to=swhiteho@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;
as well as URLs for NNTP newsgroup(s).