From: Andreas Rohner <andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Andreas Rohner <andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
Subject: [PATCH v4 0/6] nilfs-utils: shortcut for certain GC operations
Date: Wed, 5 Feb 2014 03:16:33 +0100 [thread overview]
Message-ID: <cover.1391566347.git.andreas.rohner@gmx.net> (raw)
In-Reply-To: <20140205.034242.281476472.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
Hi,
This patch set adds an optimized version of
nilfs_xreclaim_segments, which has an additional parameter
min_reclaimable_blks. This parameter specifies the minimum number of
reclaimable blocks in a segment, before it can be cleaned. If a
segment is below this threshold, it is considered to be not worth
cleaning, because all the live blocks would need to be moved to a
new segment, which is expensive, and the number of reclaimable
blocks is too low. But it is still necessary to update the segment
usage information to turn the old segment into a new one.
This is basically a shortcut to cleaning the segment. It is still
necessary to read the segment summary information, but the writing
of the live blocks can be skipped if it's not worth it.
Additionally new options are introduced for the configuration file
and nilfs-clean to allow the user to specify the threshold.
This is potentially useful for all gc policies, but it is especially
beneficial for the timestamp policy. Lets assume for example a NILFS2
volume with 20% static files and lets assume these static files
are in the oldest segments. The current timestamp policy will
select the oldest segments and, since the data is static, move
them mostly unchanged to new segments. After a while they will
become the oldest segments again. Then timestamp will move them
again. These moving operations are expensive and unnecessary.
Regards,
Andreas Rohner
---
v3->v4
* nilfs-utils: Rebase on refactored nilfs_reclaim_segments (Ryusuke)
* nilfs-utils: Add no_timeout if cleaning was deferred
v2->v3
* Alignment in nilfs_suinfo_update
* Add missing comments
* nilfs2: Extra validity checks in nilfs_sufile_set_suinfo
* nilfs2: Update sh_ncleansegs, sh_ndirtysegs if flags change
* nilfs2: Fix bugs in nilfs_sufile_set_suinfo
* nilfs2: Use vmalloc instead of ioctl_wrap_copy
* nilfs-utils: Separate nilfs_relaim_segments_with_threshold
* nilfs-utils: Allow different units for min_reclaimable_blocks
* nilfs-utils: Introduce flag to disable the optimization
* nilfs-utils: Disable optimization if kernel retruns ENOTTY
* nilfs-utils: Remove EGCTRYAGAIN error return code
* nilfs-utils: Rename option to min_reclaimable_blocks
v1->v2
* Implementation of NILFS_IOCTL_SET_SUINFO
* Added mc_min_free_blocks_threshold config option
(if clean segments < min_clean_segments)
* Added new command line param for nilfs-clean
* Update man- and config-file
--
Andreas Rohner (6):
nilfs-utils: cldconfig add an option to set min. reclaimable blocks
nilfs-utils: add NILFS_OPT_SET_SUINFO
nilfs-utils: nilfs-clean add cmdline param min-reclaimable-blocks
nilfs-utils: add suport for NILFS_IOCTL_SET_SUINFO ioctl
nilfs-utils: add optimized version of nilfs_reclaim_segments
nilfs-utils: add a no_timeout flag to enable faster loop
include/nilfs.h | 9 +-
include/nilfs2_fs.h | 43 ++++++++++
include/nilfs_cleaner.h | 19 +++--
include/nilfs_gc.h | 7 +-
lib/gc.c | 63 +++++++++++++-
lib/nilfs.c | 63 ++++++++++++++
man/nilfs-clean.8 | 4 +
man/nilfs_cleanerd.conf.5 | 22 +++++
sbin/cleanerd/cldconfig.c | 168 ++++++++++++++++++++++++++++----------
sbin/cleanerd/cldconfig.h | 8 ++
sbin/cleanerd/cleanerd.c | 55 ++++++++++++-
sbin/cleanerd/nilfs_cleanerd.conf | 13 +++
sbin/nilfs-clean/nilfs-clean.c | 44 ++++++++--
13 files changed, 450 insertions(+), 68 deletions(-)
--
1.8.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-02-05 2:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 18:37 [PATCH 0/2] refactor reclaim function Ryusuke Konishi
[not found] ` <1391539046-13046-1-git-send-email-konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-02-04 18:37 ` [PATCH 1/2] lib/gc.c: " Ryusuke Konishi
2014-02-04 18:37 ` [PATCH 2/2] cleanerd: use nilfs_xreclaim_segment() Ryusuke Konishi
2014-02-04 18:42 ` [PATCH 0/2] refactor reclaim function Ryusuke Konishi
[not found] ` <20140205.034242.281476472.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-02-04 20:46 ` Andreas Rohner
2014-02-05 2:16 ` Andreas Rohner [this message]
[not found] ` <cover.1391566347.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-05 2:16 ` [PATCH v4 1/6] nilfs-utils: cldconfig add an option to set min. reclaimable blocks Andreas Rohner
[not found] ` <ede3809c3f131ed641336d7a078c4dc1d9d4b578.1391566347.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-05 18:47 ` Ryusuke Konishi
2014-02-05 2:16 ` [PATCH v4 2/6] nilfs-utils: add NILFS_OPT_SET_SUINFO Andreas Rohner
[not found] ` <a55d555da27aea71386cfe777a0adec95e6ded2e.1391566347.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-05 18:50 ` Ryusuke Konishi
2014-02-05 2:16 ` [PATCH v4 3/6] nilfs-utils: nilfs-clean add cmdline param min-reclaimable-blocks Andreas Rohner
[not found] ` <9004dd6e3a276447371eda93413a6f0766821510.1391566347.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-05 19:16 ` Ryusuke Konishi
2014-02-05 2:16 ` [PATCH v4 4/6] nilfs-utils: add suport for NILFS_IOCTL_SET_SUINFO ioctl Andreas Rohner
[not found] ` <6b62cd72448c48055cfab9017753349cb2cd7da9.1391566347.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-05 19:25 ` Ryusuke Konishi
[not found] ` <20140206.042518.139122814.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-02-05 23:43 ` Andreas Rohner
[not found] ` <52F2CC85.3000004-hi6Y0CQ0nG0@public.gmane.org>
2014-02-06 0:04 ` Ryusuke Konishi
2014-02-05 2:16 ` [PATCH v4 5/6] nilfs-utils: add optimized version of nilfs_xreclaim_segments Andreas Rohner
[not found] ` <f5be23fa1b72d7e7e2d1403bdd043ebeafd4407d.1391566347.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-06 0:09 ` Andreas Rohner
[not found] ` <52F2D2B5.1080109-hi6Y0CQ0nG0@public.gmane.org>
2014-02-06 0:24 ` Ryusuke Konishi
2014-02-05 2:16 ` [PATCH v4 6/6] nilfs-utils: add a no_timeout flag to enable faster loop Andreas Rohner
[not found] ` <43f9673512b7a2e95d3036f2e829aa80fb2cca03.1391566347.git.andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-02-06 1:16 ` Ryusuke Konishi
[not found] ` <20140206.101641.184822830.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-02-06 14:37 ` Andreas Rohner
[not found] ` <52F39E20.8000803-hi6Y0CQ0nG0@public.gmane.org>
2014-02-06 15:07 ` Andreas Rohner
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=cover.1391566347.git.andreas.rohner@gmx.net \
--to=andreas.rohner-hi6y0cq0ng0@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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