cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH 4/4] GFS2: If we use up our block reservation, request more next time
Date: Mon, 20 Oct 2014 11:37:09 -0500	[thread overview]
Message-ID: <df1cf15cf51a74cb7612f9651db1edb049d6ab2b.1413820606.git.rpeterso@redhat.com> (raw)
In-Reply-To: <cover.1413820606.git.rpeterso@redhat.com>

If we run out of blocks for a given multi-block allocation, we obviously
did not reserve enough. We should reserve more blocks for the next
reservation to reduce fragmentation. This patch increases the size hint
for reservations when they run out.
---
 fs/gfs2/rgrp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 50cdba2..265fbab 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -2251,6 +2251,9 @@ static void gfs2_adjust_reservation(struct gfs2_inode *ip,
 			trace_gfs2_rs(rs, TRACE_RS_CLAIM);
 			if (rs->rs_free && !ret)
 				goto out;
+			/* We used up our block reservation, so we should
+			   reserve more blocks next time. */
+			atomic_add(RGRP_RSRV_MINBLKS, &rs->rs_sizehint);
 		}
 		__rs_deltree(rs);
 	}
-- 
1.9.3



      parent reply	other threads:[~2014-10-20 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 16:37 [Cluster-devel] [GFS2 PATCH 0/4] Patches to reduce GFS2 fragmentation Bob Peterson
2014-10-20 16:37 ` [Cluster-devel] [GFS2 PATCH 1/4] GFS2: Set of distributed preferences for rgrps Bob Peterson
2014-10-21  9:30   ` Steven Whitehouse
2014-10-21 12:30     ` Bob Peterson
2014-10-20 16:37 ` [Cluster-devel] [GFS2 PATCH 2/4] GFS2: Make block reservations more persistent Bob Peterson
2014-10-21  9:24   ` Steven Whitehouse
2014-10-20 16:37 ` [Cluster-devel] [GFS2 PATCH 3/4] GFS2: Only increase rs_sizehint Bob Peterson
2014-10-20 16:37 ` Bob Peterson [this message]

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=df1cf15cf51a74cb7612f9651db1edb049d6ab2b.1413820606.git.rpeterso@redhat.com \
    --to=rpeterso@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).