Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565210 > unrolled thread
| Started by | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| First post | 2017-01-23 19:20 +0100 |
| Last post | 2017-01-26 14:20 +0100 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/5] mm: vmscan: scan dirty pages even in laptop mode Johannes Weiner <hannes@cmpxchg.org> - 2017-01-23 19:20 +0100
Re: [PATCH 1/5] mm: vmscan: scan dirty pages even in laptop mode Minchan Kim <minchan@kernel.org> - 2017-01-26 02:30 +0100
Re: [PATCH 1/5] mm: vmscan: scan dirty pages even in laptop mode Mel Gorman <mgorman@suse.de> - 2017-01-26 11:00 +0100
Re: [PATCH 1/5] mm: vmscan: scan dirty pages even in laptop mode Michal Hocko <mhocko@kernel.org> - 2017-01-26 14:20 +0100
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Date | 2017-01-23 19:20 +0100 |
| Subject | [PATCH 1/5] mm: vmscan: scan dirty pages even in laptop mode |
| Message-ID | <t2RnI-1o4-11@gated-at.bofh.it> |
We have an elaborate dirty/writeback throttling mechanism inside the
reclaim scanner, but for that to work the pages have to go through
shrink_page_list() and get counted for what they are. Otherwise, we
mess up the LRU order and don't match reclaim speed to writeback.
Especially during deactivation, there is never a reason to skip dirty
pages; nothing is even trying to write them out from there. Don't mess
up the LRU order for nothing, shuffle these pages along.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
include/linux/mmzone.h | 2 --
mm/vmscan.c | 14 ++------------
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index df992831fde7..338a786a993f 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -236,8 +236,6 @@ struct lruvec {
#define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON))
#define LRU_ALL ((1 << NR_LRU_LISTS) - 1)
-/* Isolate clean file */
-#define ISOLATE_CLEAN ((__force isolate_mode_t)0x1)
/* Isolate unmapped file */
#define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x2)
/* Isolate for asynchronous migration */
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 7bb23ff229b6..0d05f7f3b532 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -87,6 +87,7 @@ struct scan_control {
/* The highest zone to isolate pages for reclaim from */
enum zone_type reclaim_idx;
+ /* Writepage batching in laptop mode; RECLAIM_WRITE */
unsigned int may_writepage:1;
/* Can mapped pages be reclaimed? */
@@ -1373,13 +1374,10 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
* wants to isolate pages it will be able to operate on without
* blocking - clean pages for the most part.
*
- * ISOLATE_CLEAN means that only clean pages should be isolated. This
- * is used by reclaim when it is cannot write to backing storage
- *
* ISOLATE_ASYNC_MIGRATE is used to indicate that it only wants to pages
* that it is possible to migrate without blocking
*/
- if (mode & (ISOLATE_CLEAN|ISOLATE_ASYNC_MIGRATE)) {
+ if (mode & ISOLATE_ASYNC_MIGRATE) {
/* All the caller can do on PageWriteback is block */
if (PageWriteback(page))
return ret;
@@ -1387,10 +1385,6 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
if (PageDirty(page)) {
struct address_space *mapping;
- /* ISOLATE_CLEAN means only clean pages */
- if (mode & ISOLATE_CLEAN)
- return ret;
-
/*
* Only pages without mappings or that have a
* ->migratepage callback are possible to migrate
@@ -1731,8 +1725,6 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
if (!sc->may_unmap)
isolate_mode |= ISOLATE_UNMAPPED;
- if (!sc->may_writepage)
- isolate_mode |= ISOLATE_CLEAN;
spin_lock_irq(&pgdat->lru_lock);
@@ -1929,8 +1921,6 @@ static void shrink_active_list(unsigned long nr_to_scan,
if (!sc->may_unmap)
isolate_mode |= ISOLATE_UNMAPPED;
- if (!sc->may_writepage)
- isolate_mode |= ISOLATE_CLEAN;
spin_lock_irq(&pgdat->lru_lock);
--
2.11.0
[toc] | [next] | [standalone]
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Date | 2017-01-26 02:30 +0100 |
| Message-ID | <t3H2W-Zx-9@gated-at.bofh.it> |
| In reply to | #1565210 |
On Mon, Jan 23, 2017 at 01:16:37PM -0500, Johannes Weiner wrote: > We have an elaborate dirty/writeback throttling mechanism inside the > reclaim scanner, but for that to work the pages have to go through > shrink_page_list() and get counted for what they are. Otherwise, we > mess up the LRU order and don't match reclaim speed to writeback. > > Especially during deactivation, there is never a reason to skip dirty > pages; nothing is even trying to write them out from there. Don't mess > up the LRU order for nothing, shuffle these pages along. > > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Minchan Kim <minchan@kernel.org>
[toc] | [prev] | [next] | [standalone]
| From | Mel Gorman <mgorman@suse.de> |
|---|---|
| Date | 2017-01-26 11:00 +0100 |
| Message-ID | <t3P0v-5Js-41@gated-at.bofh.it> |
| In reply to | #1565210 |
On Mon, Jan 23, 2017 at 01:16:37PM -0500, Johannes Weiner wrote: > We have an elaborate dirty/writeback throttling mechanism inside the > reclaim scanner, but for that to work the pages have to go through > shrink_page_list() and get counted for what they are. Otherwise, we > mess up the LRU order and don't match reclaim speed to writeback. > > Especially during deactivation, there is never a reason to skip dirty > pages; nothing is even trying to write them out from there. Don't mess > up the LRU order for nothing, shuffle these pages along. > > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Mel Gorman <mgorman@suse.de> -- Mel Gorman SUSE Labs
[toc] | [prev] | [next] | [standalone]
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Date | 2017-01-26 14:20 +0100 |
| Message-ID | <t3S82-7Sg-23@gated-at.bofh.it> |
| In reply to | #1565210 |
On Mon 23-01-17 13:16:37, Johannes Weiner wrote:
> We have an elaborate dirty/writeback throttling mechanism inside the
> reclaim scanner, but for that to work the pages have to go through
> shrink_page_list() and get counted for what they are. Otherwise, we
> mess up the LRU order and don't match reclaim speed to writeback.
>
> Especially during deactivation, there is never a reason to skip dirty
> pages; nothing is even trying to write them out from there. Don't mess
> up the LRU order for nothing, shuffle these pages along.
absolutely agreed.
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> include/linux/mmzone.h | 2 --
> mm/vmscan.c | 14 ++------------
> 2 files changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index df992831fde7..338a786a993f 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -236,8 +236,6 @@ struct lruvec {
> #define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON))
> #define LRU_ALL ((1 << NR_LRU_LISTS) - 1)
>
> -/* Isolate clean file */
> -#define ISOLATE_CLEAN ((__force isolate_mode_t)0x1)
> /* Isolate unmapped file */
> #define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x2)
> /* Isolate for asynchronous migration */
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 7bb23ff229b6..0d05f7f3b532 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -87,6 +87,7 @@ struct scan_control {
> /* The highest zone to isolate pages for reclaim from */
> enum zone_type reclaim_idx;
>
> + /* Writepage batching in laptop mode; RECLAIM_WRITE */
> unsigned int may_writepage:1;
>
> /* Can mapped pages be reclaimed? */
> @@ -1373,13 +1374,10 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
> * wants to isolate pages it will be able to operate on without
> * blocking - clean pages for the most part.
> *
> - * ISOLATE_CLEAN means that only clean pages should be isolated. This
> - * is used by reclaim when it is cannot write to backing storage
> - *
> * ISOLATE_ASYNC_MIGRATE is used to indicate that it only wants to pages
> * that it is possible to migrate without blocking
> */
> - if (mode & (ISOLATE_CLEAN|ISOLATE_ASYNC_MIGRATE)) {
> + if (mode & ISOLATE_ASYNC_MIGRATE) {
> /* All the caller can do on PageWriteback is block */
> if (PageWriteback(page))
> return ret;
> @@ -1387,10 +1385,6 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
> if (PageDirty(page)) {
> struct address_space *mapping;
>
> - /* ISOLATE_CLEAN means only clean pages */
> - if (mode & ISOLATE_CLEAN)
> - return ret;
> -
> /*
> * Only pages without mappings or that have a
> * ->migratepage callback are possible to migrate
> @@ -1731,8 +1725,6 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
>
> if (!sc->may_unmap)
> isolate_mode |= ISOLATE_UNMAPPED;
> - if (!sc->may_writepage)
> - isolate_mode |= ISOLATE_CLEAN;
>
> spin_lock_irq(&pgdat->lru_lock);
>
> @@ -1929,8 +1921,6 @@ static void shrink_active_list(unsigned long nr_to_scan,
>
> if (!sc->may_unmap)
> isolate_mode |= ISOLATE_UNMAPPED;
> - if (!sc->may_writepage)
> - isolate_mode |= ISOLATE_CLEAN;
>
> spin_lock_irq(&pgdat->lru_lock);
>
> --
> 2.11.0
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Michal Hocko
SUSE Labs
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web