[PATCH 1/3] xfs: restrict allocate worker to x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Restrict the allocation worker to X86_64 machines. This will improve
performance on non-X86-64 machines and avoid the AGF buffer hang.

Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
---
 fs/xfs/xfs_alloc.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

Index: b/fs/xfs/xfs_alloc.c
===================================================================
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -2417,6 +2417,7 @@ error0:
 	return error;
 }
 
+#if defined(CONFIG_X86_64)
 static void
 xfs_alloc_vextent_worker(
 	struct work_struct	*work)
@@ -2433,6 +2434,7 @@ xfs_alloc_vextent_worker(
 
 	current_restore_flags_nested(&pflags, PF_FSTRANS);
 }
+#endif
 
 /*
  * Data allocation requests often come in with little stack to work on. Push
@@ -2444,6 +2446,7 @@ int
 xfs_alloc_vextent(
 	struct xfs_alloc_arg	*args)
 {
+#if defined(CONFIG_X86_64)
 	DECLARE_COMPLETION_ONSTACK(done);
 
 	if (!args->userdata)
@@ -2455,6 +2458,14 @@ xfs_alloc_vextent(
 	queue_work(xfs_alloc_wq, &args->work);
 	wait_for_completion(&done);
 	return args->result;
+#else
+	/* The allocation worker is needed by the i386_64.
+	 * Do not use the worker for other platforms. This will
+	 * allow those platforms avoid the performance hit and
+	 * the potential AGF buffer deadlock issue.
+	 */
+	return __xfs_alloc_vextent(args);
+#endif
 }
 
 /*

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux