Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1171783
| From | Joonsoo Kim <iamjoonsoo.kim@lge.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 04/10] mm/compaction: clean-up restarting condition check |
| Date | 2015-06-25 02:50 +0200 |
| Message-ID | <pF3wB-W9-15@gated-at.bofh.it> (permalink) |
| References | <pF3wB-W9-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Rename check function and move one outer condition check to this function.
There is no functional change.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
mm/compaction.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index 2d8e211..dd2063b 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -188,8 +188,11 @@ void compaction_defer_reset(struct zone *zone, int order,
}
/* Returns true if restarting compaction after many failures */
-bool compaction_restarting(struct zone *zone, int order)
+static bool compaction_direct_restarting(struct zone *zone, int order)
{
+ if (current_is_kswapd())
+ return false;
+
if (order < zone->compact_order_failed)
return false;
@@ -1327,7 +1330,7 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
* is about to be retried after being deferred. kswapd does not do
* this reset as it'll reset the cached information when going to sleep.
*/
- if (compaction_restarting(zone, cc->order) && !current_is_kswapd())
+ if (compaction_direct_restarting(zone, cc->order))
__reset_isolation_suitable(zone);
/*
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 00/10] redesign compaction algorithm Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-06-25 02:50 +0200
[RFC PATCH 04/10] mm/compaction: clean-up restarting condition check Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-06-25 02:50 +0200
[RFC PATCH 08/10] mm/compaction: remove compaction deferring Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-06-25 02:50 +0200
[RFC PATCH 03/10] mm/compaction: always update cached pfn Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-06-25 02:50 +0200
Re: [RFC PATCH 03/10] mm/compaction: always update cached pfn Vlastimil Babka <vbabka@suse.cz> - 2015-06-25 11:10 +0200
[RFC PATCH 05/10] mm/compaction: make freepage scanner scans non-movable pageblock Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-06-25 02:50 +0200
[RFC PATCH 01/10] mm/compaction: update skip-bit if whole pageblock is really scanned Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2015-06-25 02:50 +0200
Re: [RFC PATCH 00/10] redesign compaction algorithm Joonsoo Kim <js1304@gmail.com> - 2015-06-26 04:10 +0200
Re: [RFC PATCH 00/10] redesign compaction algorithm Joonsoo Kim <js1304@gmail.com> - 2015-06-26 04:20 +0200
csiph-web