Skip to contentSkip to conversation

XFS: Mark no-more-exist xfsbufd related sysctl parameters as obsolete.

PATCH In review Satoru Takeuchi 2 participants 3 messages Dec 9, 2012 – Dec 10, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 XFS: Mark no-more-exist xfsbufd related sysctl parameters as obsolete.

From: Satoru Takeuchi <[email protected]>

xfsbufd is removed since commit 43ff2122e6492bcc88b065c433453dce88223b30. But there stille be two sysctl parameters about it (fs.xfs.{xfsbufd_centisecs,age_buffer_centisecs}.)

This patch marks these parameters as obsolete. In adition, prints a warning message if someone tries to use these parameters.

---
 Documentation/filesystems/xfs.txt |    8 ++++----
 fs/xfs/xfs_globals.c              |    2 --
 fs/xfs/xfs_linux.h                |    2 --
 fs/xfs/xfs_sysctl.c               |   36 ++++++++++++++++++++++++------------
 fs/xfs/xfs_sysctl.h               |    2 --
 5 files changed, 28 insertions(+), 22 deletions(-)
Documentation/filesystems/xfs.txt +4 -4
index 3fc0c31..31d6ec6 100644
@@ -183,11 +183,11 @@ The following sysctls are available for the XFS filesystem:
   	out to disk.  This thread will flush log activity out, and
   	do some processing on unlinked inodes.
 
-  fs.xfs.xfsbufd_centisecs	(Min: 50  Default: 100	Max: 3000)
-	The interval at which xfsbufd scans the dirty metadata buffers list.
+  fs.xfs.xfsbufd_centisecs
+	Obsolete. Don't use it.
 
-  fs.xfs.age_buffer_centisecs	(Min: 100  Default: 1500  Max: 720000)
-	The age at which xfsbufd flushes dirty metadata buffers to disk.
+  fs.xfs.age_buffer_centisecs
+	Obsolete. Don't use it.
 
   fs.xfs.error_level		(Min: 0  Default: 3  Max: 11)
 	A volume knob for error reporting when internal errors occur.
fs/xfs/xfs_globals.c +0 -2
index 76e81cf..ea77e2a 100644
@@ -34,8 +34,6 @@ xfs_param_t xfs_params = {
 	.inherit_sync	= {	0,		1,		1	},
 	.inherit_nodump	= {	0,		1,		1	},
 	.inherit_noatim = {	0,		1,		1	},
-	.xfs_buf_timer	= {	100/2,		1*100,		30*100	},
-	.xfs_buf_age	= {	1*100,		15*100,		7200*100},
 	.inherit_nosym	= {	0,		0,		1	},
 	.rotorstep	= {	1,		1,		255	},
 	.inherit_nodfrg	= {	0,		1,		1	},
fs/xfs/xfs_linux.h +0 -2
index 828662f..f9420f4 100644
@@ -112,8 +112,6 @@
 #define xfs_inherit_sync	xfs_params.inherit_sync.val
 #define xfs_inherit_nodump	xfs_params.inherit_nodump.val
 #define xfs_inherit_noatime	xfs_params.inherit_noatim.val
-#define xfs_buf_timer_centisecs	xfs_params.xfs_buf_timer.val
-#define xfs_buf_age_centisecs	xfs_params.xfs_buf_age.val
 #define xfs_inherit_nosymlinks	xfs_params.inherit_nosym.val
 #define xfs_rotorstep		xfs_params.rotorstep.val
 #define xfs_inherit_nodefrag	xfs_params.inherit_nodfrg.val
fs/xfs/xfs_sysctl.c +24 -12
index ee2d2ad..a4b7cb2 100644
@@ -74,6 +74,26 @@ xfs_panic_mask_proc_handler(
 }
 #endif /* CONFIG_PROC_FS */
 
+static int xfs_proc_obsolete(struct ctl_table *table, int write,
+			void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+	char kbuf[] = "0\n";
+
+	if (*ppos) {
+		*lenp = 0;
+		return 0;
+	}
+
+	if (copy_to_user(buffer, kbuf, sizeof(kbuf)))
+		return -EFAULT;
+	pr_warn("XFS: %s sysctl parameter is obsolete.\n",
+	       table->procname);
+
+	*lenp = 2;
+	*ppos += *lenp;
+	return 2;
+}
+
 static ctl_table xfs_table[] = {
 	{
 		.procname	= "irix_sgid_inherit",
@@ -150,21 +170,13 @@ static ctl_table xfs_table[] = {
 	},
 	{
 		.procname	= "xfsbufd_centisecs",
-		.data		= &xfs_params.xfs_buf_timer.val,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &xfs_params.xfs_buf_timer.min,
-		.extra2		= &xfs_params.xfs_buf_timer.max
+		.mode		= 0444,
+		.proc_handler	= xfs_proc_obsolete,
 	},
 	{
 		.procname	= "age_buffer_centisecs",
-		.data		= &xfs_params.xfs_buf_age.val,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= proc_dointvec_minmax,
-		.extra1		= &xfs_params.xfs_buf_age.min,
-		.extra2		= &xfs_params.xfs_buf_age.max
+		.mode		= 0444,
+		.proc_handler	= xfs_proc_obsolete,
 	},
 	{
 		.procname	= "inherit_nosymlinks",
fs/xfs/xfs_sysctl.h +0 -2
index af152eb..23b430e 100644
@@ -41,8 +41,6 @@ typedef struct xfs_param {
 	xfs_sysctl_val_t inherit_sync;	/* Inherit the "sync" inode flag. */
 	xfs_sysctl_val_t inherit_nodump;/* Inherit the "nodump" inode flag. */
 	xfs_sysctl_val_t inherit_noatim;/* Inherit the "noatime" inode flag. */
-	xfs_sysctl_val_t xfs_buf_timer;	/* Interval between xfsbufd wakeups. */
-	xfs_sysctl_val_t xfs_buf_age;	/* Metadata buffer age before flush. */
 	xfs_sysctl_val_t inherit_nosym;	/* Inherit the "nosymlinks" flag. */
 	xfs_sysctl_val_t rotorstep;	/* inode32 AG rotoring control knob */
 	xfs_sysctl_val_t inherit_nodfrg;/* Inherit the "nodefrag" inode flag. */

-- 1.7.10.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 9 lines · Satoru Takeuchi

From: Satoru Takeuchi <[email protected]>

xfsbufd is removed since commit 43ff2122e6492bcc88b065c433453dce88223b30. But there stille be two sysctl parameters about it (fs.xfs.{xfsbufd_centisecs,age_buffer_centisecs}.)

This patch marks these parameters as obsolete. In adition, prints a warning message if someone tries to use these parameters.

While we currently don't use them, I'm not sure they are obsolete. We need to integrate the AIL flushing with time-based log idling (i.e. flushing to an empty state), and part of that work is making the AIL log items have a age-based flush component.
i.e. how often it will wake to try to flush/idle the log when there is no pressure, and how long items should wait before being flushed even when there is activity.

Those two parameters are exactly what the xfsbufd parameters have historically controlled, so rather than introduce new sysctls for the same purpose, I was planning on just re-using them. Hence I suspect that marking them obsolete is probably the wrong thing to do right now - adding the time-based component to the AIL flushing would be a better solution.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
Quoted 19 lines · Dave Chinner
Quoted 9 lines · Satoru Takeuchi

From: Satoru Takeuchi <[email protected]>

xfsbufd is removed since commit 43ff2122e6492bcc88b065c433453dce88223b30. But there stille be two sysctl parameters about it (fs.xfs.{xfsbufd_centisecs,age_buffer_centisecs}.)

This patch marks these parameters as obsolete. In adition, prints a warning message if someone tries to use these parameters.

While we currently don't use them, I'm not sure they are obsolete. We need to integrate the AIL flushing with time-based log idling (i.e. flushing to an empty state), and part of that work is making the AIL log items have a age-based flush component.
i.e. how often it will wake to try to flush/idle the log when there is no pressure, and how long items should wait before being flushed even when there is activity.

Quoted 6 lines

Those two parameters are exactly what the xfsbufd parameters have historically controlled, so rather than introduce new sysctls for the same purpose, I was planning on just re-using them. Hence I suspect that marking them obsolete is probably the wrong thing to do right now - adding the time-based component to the AIL flushing would be a better solution.

OK, got it.

Satoru

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs