From: Greg Kroah-Hartman Date: Thu, 3 Jul 2014 03:34:49 +0000 (-0700) Subject: delete xfs patch from 3.15 and 3.14 queues. X-Git-Tag: v3.4.97~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4a4dc5e25a57df6d5dd9844b0626d9735f9dfd8;p=thirdparty%2Fkernel%2Fstable-queue.git delete xfs patch from 3.15 and 3.14 queues. --- diff --git a/queue-3.14/series b/queue-3.14/series index 59955067462..7badf211192 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -44,6 +44,5 @@ powerpc-fix-typo-config_ppc_cpu.patch powerpc-don-t-setup-cpus-with-bad-status.patch powerpc-add-at_hwcap2-to-indicate-v.crypto-category-support.patch powerpc-don-t-skip-epapr-spin-table-cpus.patch -xfs-block-allocation-work-needs-to-be-kswapd-aware.patch xfs-xfs_readsb-needs-to-check-for-magic-numbers.patch reiserfs-call-truncate_setsize-under-tailpack-mutex.patch diff --git a/queue-3.14/xfs-block-allocation-work-needs-to-be-kswapd-aware.patch b/queue-3.14/xfs-block-allocation-work-needs-to-be-kswapd-aware.patch deleted file mode 100644 index 25bda5f8edb..00000000000 --- a/queue-3.14/xfs-block-allocation-work-needs-to-be-kswapd-aware.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 1f6d64829db78a7e1d63e15c9f48f0a5d2b5a679 Mon Sep 17 00:00:00 2001 -From: Dave Chinner -Date: Fri, 6 Jun 2014 15:59:59 +1000 -Subject: xfs: block allocation work needs to be kswapd aware - -From: Dave Chinner - -commit 1f6d64829db78a7e1d63e15c9f48f0a5d2b5a679 upstream. - -Upon memory pressure, kswapd calls xfs_vm_writepage() from -shrink_page_list(). This can result in delayed allocation occurring -and that gets deferred to the the allocation workqueue. - -The allocation then runs outside kswapd context, which means if it -needs memory (and it does to demand page metadata from disk) it can -block in shrink_inactive_list() waiting for IO congestion. These -blocking waits are normally avoiding in kswapd context, so under -memory pressure writeback from kswapd can be arbitrarily delayed by -memory reclaim. - -To avoid this, pass the kswapd context to the allocation being done -by the workqueue, so that memory reclaim understands correctly that -the work is being done for kswapd and therefore it is not blocked -and does not delay memory reclaim. - -To avoid issues with int->char conversion of flag fields (as noticed -in v1 of this patch) convert the flag fields in the struct -xfs_bmalloca to bool types. pahole indicates these variables are -still single byte variables, so no extra space is consumed by this -change. - -Reported-by: Tetsuo Handa -Signed-off-by: Dave Chinner -Reviewed-by: Christoph Hellwig -Signed-off-by: Dave Chinner -Signed-off-by: Greg Kroah-Hartman - ---- - fs/xfs/xfs_bmap_util.c | 16 +++++++++++++--- - fs/xfs/xfs_bmap_util.h | 13 +++++++------ - 2 files changed, 20 insertions(+), 9 deletions(-) - ---- a/fs/xfs/xfs_bmap_util.c -+++ b/fs/xfs/xfs_bmap_util.c -@@ -258,14 +258,23 @@ xfs_bmapi_allocate_worker( - struct xfs_bmalloca *args = container_of(work, - struct xfs_bmalloca, work); - unsigned long pflags; -+ unsigned long new_pflags = PF_FSTRANS; - -- /* we are in a transaction context here */ -- current_set_flags_nested(&pflags, PF_FSTRANS); -+ /* -+ * we are in a transaction context here, but may also be doing work -+ * in kswapd context, and hence we may need to inherit that state -+ * temporarily to ensure that we don't block waiting for memory reclaim -+ * in any way. -+ */ -+ if (args->kswapd) -+ new_pflags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD; -+ -+ current_set_flags_nested(&pflags, new_pflags); - - args->result = __xfs_bmapi_allocate(args); - complete(args->done); - -- current_restore_flags_nested(&pflags, PF_FSTRANS); -+ current_restore_flags_nested(&pflags, new_pflags); - } - - /* -@@ -284,6 +293,7 @@ xfs_bmapi_allocate( - - - args->done = &done; -+ args->kswapd = current_is_kswapd(); - INIT_WORK_ONSTACK(&args->work, xfs_bmapi_allocate_worker); - queue_work(xfs_alloc_wq, &args->work); - wait_for_completion(&done); ---- a/fs/xfs/xfs_bmap_util.h -+++ b/fs/xfs/xfs_bmap_util.h -@@ -50,12 +50,13 @@ struct xfs_bmalloca { - xfs_extlen_t total; /* total blocks needed for xaction */ - xfs_extlen_t minlen; /* minimum allocation size (blocks) */ - xfs_extlen_t minleft; /* amount must be left after alloc */ -- char eof; /* set if allocating past last extent */ -- char wasdel; /* replacing a delayed allocation */ -- char userdata;/* set if is user data */ -- char aeof; /* allocated space at eof */ -- char conv; /* overwriting unwritten extents */ -- char stack_switch; -+ bool eof; /* set if allocating past last extent */ -+ bool wasdel; /* replacing a delayed allocation */ -+ bool userdata;/* set if is user data */ -+ bool aeof; /* allocated space at eof */ -+ bool conv; /* overwriting unwritten extents */ -+ bool stack_switch; -+ bool kswapd; /* allocation in kswapd context */ - int flags; - struct completion *done; - struct work_struct work; diff --git a/queue-3.15/series b/queue-3.15/series index b79fe9386a9..b4c20c93333 100644 --- a/queue-3.15/series +++ b/queue-3.15/series @@ -49,7 +49,6 @@ powerpc-fix-typo-config_ppc_cpu.patch powerpc-don-t-setup-cpus-with-bad-status.patch powerpc-add-at_hwcap2-to-indicate-v.crypto-category-support.patch powerpc-don-t-skip-epapr-spin-table-cpus.patch -xfs-block-allocation-work-needs-to-be-kswapd-aware.patch xfs-xfs_readsb-needs-to-check-for-magic-numbers.patch reiserfs-call-truncate_setsize-under-tailpack-mutex.patch cpufreq-ppc-corenet-cpu-freq-do_div-use-quotient.patch diff --git a/queue-3.15/xfs-block-allocation-work-needs-to-be-kswapd-aware.patch b/queue-3.15/xfs-block-allocation-work-needs-to-be-kswapd-aware.patch deleted file mode 100644 index 25bda5f8edb..00000000000 --- a/queue-3.15/xfs-block-allocation-work-needs-to-be-kswapd-aware.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 1f6d64829db78a7e1d63e15c9f48f0a5d2b5a679 Mon Sep 17 00:00:00 2001 -From: Dave Chinner -Date: Fri, 6 Jun 2014 15:59:59 +1000 -Subject: xfs: block allocation work needs to be kswapd aware - -From: Dave Chinner - -commit 1f6d64829db78a7e1d63e15c9f48f0a5d2b5a679 upstream. - -Upon memory pressure, kswapd calls xfs_vm_writepage() from -shrink_page_list(). This can result in delayed allocation occurring -and that gets deferred to the the allocation workqueue. - -The allocation then runs outside kswapd context, which means if it -needs memory (and it does to demand page metadata from disk) it can -block in shrink_inactive_list() waiting for IO congestion. These -blocking waits are normally avoiding in kswapd context, so under -memory pressure writeback from kswapd can be arbitrarily delayed by -memory reclaim. - -To avoid this, pass the kswapd context to the allocation being done -by the workqueue, so that memory reclaim understands correctly that -the work is being done for kswapd and therefore it is not blocked -and does not delay memory reclaim. - -To avoid issues with int->char conversion of flag fields (as noticed -in v1 of this patch) convert the flag fields in the struct -xfs_bmalloca to bool types. pahole indicates these variables are -still single byte variables, so no extra space is consumed by this -change. - -Reported-by: Tetsuo Handa -Signed-off-by: Dave Chinner -Reviewed-by: Christoph Hellwig -Signed-off-by: Dave Chinner -Signed-off-by: Greg Kroah-Hartman - ---- - fs/xfs/xfs_bmap_util.c | 16 +++++++++++++--- - fs/xfs/xfs_bmap_util.h | 13 +++++++------ - 2 files changed, 20 insertions(+), 9 deletions(-) - ---- a/fs/xfs/xfs_bmap_util.c -+++ b/fs/xfs/xfs_bmap_util.c -@@ -258,14 +258,23 @@ xfs_bmapi_allocate_worker( - struct xfs_bmalloca *args = container_of(work, - struct xfs_bmalloca, work); - unsigned long pflags; -+ unsigned long new_pflags = PF_FSTRANS; - -- /* we are in a transaction context here */ -- current_set_flags_nested(&pflags, PF_FSTRANS); -+ /* -+ * we are in a transaction context here, but may also be doing work -+ * in kswapd context, and hence we may need to inherit that state -+ * temporarily to ensure that we don't block waiting for memory reclaim -+ * in any way. -+ */ -+ if (args->kswapd) -+ new_pflags |= PF_MEMALLOC | PF_SWAPWRITE | PF_KSWAPD; -+ -+ current_set_flags_nested(&pflags, new_pflags); - - args->result = __xfs_bmapi_allocate(args); - complete(args->done); - -- current_restore_flags_nested(&pflags, PF_FSTRANS); -+ current_restore_flags_nested(&pflags, new_pflags); - } - - /* -@@ -284,6 +293,7 @@ xfs_bmapi_allocate( - - - args->done = &done; -+ args->kswapd = current_is_kswapd(); - INIT_WORK_ONSTACK(&args->work, xfs_bmapi_allocate_worker); - queue_work(xfs_alloc_wq, &args->work); - wait_for_completion(&done); ---- a/fs/xfs/xfs_bmap_util.h -+++ b/fs/xfs/xfs_bmap_util.h -@@ -50,12 +50,13 @@ struct xfs_bmalloca { - xfs_extlen_t total; /* total blocks needed for xaction */ - xfs_extlen_t minlen; /* minimum allocation size (blocks) */ - xfs_extlen_t minleft; /* amount must be left after alloc */ -- char eof; /* set if allocating past last extent */ -- char wasdel; /* replacing a delayed allocation */ -- char userdata;/* set if is user data */ -- char aeof; /* allocated space at eof */ -- char conv; /* overwriting unwritten extents */ -- char stack_switch; -+ bool eof; /* set if allocating past last extent */ -+ bool wasdel; /* replacing a delayed allocation */ -+ bool userdata;/* set if is user data */ -+ bool aeof; /* allocated space at eof */ -+ bool conv; /* overwriting unwritten extents */ -+ bool stack_switch; -+ bool kswapd; /* allocation in kswapd context */ - int flags; - struct completion *done; - struct work_struct work;