diff for duplicates of <20100826172038.GA6873@barrios-desktop> diff --git a/a/1.txt b/N1/1.txt index 0ac298e..dd7de98 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -55,88 +55,4 @@ How about this? If you don't mind, I will send the patch based on this patch series after your patch settle down or Could you add this to your patch series? -But I admit this doesn't almost affect your experiment. - ->From 70d6584e125c3954d74a69bfcb72de17244635d2 Mon Sep 17 00:00:00 2001 -From: Minchan Kim <minchan.kim@gmail.com> -Date: Fri, 27 Aug 2010 02:06:45 +0900 -Subject: [PATCH] Wait regardless of congestion if too many pages are isolated - -Suddenly, many processes could enter into the direct reclaim path -regradless of congestion. backing dev congestion is just one of them. -But current implementation calls congestion_wait if too many pages are isolated. - -if congestion_wait returns without calling io_schedule_timeout, -too_many_isolated can schedule_timeout to wait for the system's calm -to preventing OOM killing. - -Signed-off-by: Minchan Kim <minchan.kim@gmail.com> ---- - mm/backing-dev.c | 5 ++--- - mm/compaction.c | 6 +++++- - mm/vmscan.c | 6 +++++- - 3 files changed, 12 insertions(+), 5 deletions(-) - -diff --git a/mm/backing-dev.c b/mm/backing-dev.c -index 6abe860..9431bca 100644 ---- a/mm/backing-dev.c -+++ b/mm/backing-dev.c -@@ -756,8 +756,7 @@ EXPORT_SYMBOL(set_bdi_congested); - * @timeout: timeout in jiffies - * - * Waits for up to @timeout jiffies for a backing_dev (any backing_dev) to exit -- * write congestion. If no backing_devs are congested then just wait for the -- * next write to be completed. -+ * write congestion. If no backing_devs are congested then just returns. - */ - long congestion_wait(int sync, long timeout) - { -@@ -776,7 +775,7 @@ long congestion_wait(int sync, long timeout) - if (atomic_read(&nr_bdi_congested[sync]) == 0) { - unnecessary = true; - cond_resched(); -- ret = 0; -+ ret = timeout; - } else { - prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE); - ret = io_schedule_timeout(timeout); -diff --git a/mm/compaction.c b/mm/compaction.c -index 94cce51..7370683 100644 ---- a/mm/compaction.c -+++ b/mm/compaction.c -@@ -253,7 +253,11 @@ static unsigned long isolate_migratepages(struct zone *zone, - * delay for some time until fewer pages are isolated - */ - while (unlikely(too_many_isolated(zone))) { -- congestion_wait(BLK_RW_ASYNC, HZ/10); -+ long timeout = HZ/10; -+ if (timeout == congestion_wait(BLK_RW_ASYNC, timeout)) { -+ set_current_state(TASK_INTERRUPTIBLE); -+ schedule_timeout(timeout); -+ } - - if (fatal_signal_pending(current)) - return 0; -diff --git a/mm/vmscan.c b/mm/vmscan.c -index 3109ff7..f5e3e28 100644 ---- a/mm/vmscan.c -+++ b/mm/vmscan.c -@@ -1337,7 +1337,11 @@ shrink_inactive_list(unsigned long nr_to_scan, struct zone *zone, - unsigned long nr_dirty; - while (unlikely(too_many_isolated(zone, file, sc))) { -- congestion_wait(BLK_RW_ASYNC, HZ/10); -+ long timeout = HZ/10; -+ if (timeout == congestion_wait(BLK_RW_ASYNC, timeout)) { -+ set_current_state(TASK_INTERRUPTIBLE); -+ schedule_timeout(timeout); -+ } - - /* We are about to die and free our memory. Return now. */ - if (fatal_signal_pending(current)) --- -1.7.0.5 - - --- -Kind regards, -Minchan Kim +But I admit this doesn't almost affect your experiment. diff --git a/a/content_digest b/N1/content_digest index f2d6ab3..e9198d6 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -73,90 +73,6 @@ "\n" "If you don't mind, I will send the patch based on this patch series \n" "after your patch settle down or Could you add this to your patch series?\n" - "But I admit this doesn't almost affect your experiment. \n" - "\n" - ">From 70d6584e125c3954d74a69bfcb72de17244635d2 Mon Sep 17 00:00:00 2001\n" - "From: Minchan Kim <minchan.kim@gmail.com>\n" - "Date: Fri, 27 Aug 2010 02:06:45 +0900\n" - "Subject: [PATCH] Wait regardless of congestion if too many pages are isolated\n" - "\n" - "Suddenly, many processes could enter into the direct reclaim path\n" - "regradless of congestion. backing dev congestion is just one of them.\n" - "But current implementation calls congestion_wait if too many pages are isolated.\n" - "\n" - "if congestion_wait returns without calling io_schedule_timeout,\n" - "too_many_isolated can schedule_timeout to wait for the system's calm\n" - "to preventing OOM killing.\n" - "\n" - "Signed-off-by: Minchan Kim <minchan.kim@gmail.com>\n" - "---\n" - " mm/backing-dev.c | 5 ++---\n" - " mm/compaction.c | 6 +++++-\n" - " mm/vmscan.c | 6 +++++-\n" - " 3 files changed, 12 insertions(+), 5 deletions(-)\n" - "\n" - "diff --git a/mm/backing-dev.c b/mm/backing-dev.c\n" - "index 6abe860..9431bca 100644\n" - "--- a/mm/backing-dev.c\n" - "+++ b/mm/backing-dev.c\n" - "@@ -756,8 +756,7 @@ EXPORT_SYMBOL(set_bdi_congested);\n" - " * @timeout: timeout in jiffies\n" - " *\n" - " * Waits for up to @timeout jiffies for a backing_dev (any backing_dev) to exit\n" - "- * write congestion. If no backing_devs are congested then just wait for the\n" - "- * next write to be completed.\n" - "+ * write congestion. If no backing_devs are congested then just returns.\n" - " */ \n" - " long congestion_wait(int sync, long timeout)\n" - " {\n" - "@@ -776,7 +775,7 @@ long congestion_wait(int sync, long timeout)\n" - " if (atomic_read(&nr_bdi_congested[sync]) == 0) {\n" - " unnecessary = true;\n" - " cond_resched();\n" - "- ret = 0;\n" - "+ ret = timeout;\n" - " } else {\n" - " prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE);\n" - " ret = io_schedule_timeout(timeout);\n" - "diff --git a/mm/compaction.c b/mm/compaction.c\n" - "index 94cce51..7370683 100644\n" - "--- a/mm/compaction.c\n" - "+++ b/mm/compaction.c\n" - "@@ -253,7 +253,11 @@ static unsigned long isolate_migratepages(struct zone *zone,\n" - " * delay for some time until fewer pages are isolated\n" - " */ \n" - " while (unlikely(too_many_isolated(zone))) {\n" - "- congestion_wait(BLK_RW_ASYNC, HZ/10);\n" - "+ long timeout = HZ/10;\n" - "+ if (timeout == congestion_wait(BLK_RW_ASYNC, timeout)) {\n" - "+ set_current_state(TASK_INTERRUPTIBLE);\n" - "+ schedule_timeout(timeout);\n" - "+ }\n" - "\n" - " if (fatal_signal_pending(current))\n" - " return 0;\n" - "diff --git a/mm/vmscan.c b/mm/vmscan.c\n" - "index 3109ff7..f5e3e28 100644\n" - "--- a/mm/vmscan.c\n" - "+++ b/mm/vmscan.c\n" - "@@ -1337,7 +1337,11 @@ shrink_inactive_list(unsigned long nr_to_scan, struct zone *zone,\n" - " unsigned long nr_dirty;\n" - " while (unlikely(too_many_isolated(zone, file, sc))) {\n" - "- congestion_wait(BLK_RW_ASYNC, HZ/10);\n" - "+ long timeout = HZ/10;\n" - "+ if (timeout == congestion_wait(BLK_RW_ASYNC, timeout)) {\n" - "+ set_current_state(TASK_INTERRUPTIBLE);\n" - "+ schedule_timeout(timeout);\n" - "+ }\n" - "\n" - " /* We are about to die and free our memory. Return now. */\n" - " if (fatal_signal_pending(current))\n" - "-- \n" - "1.7.0.5\n" - "\n" - "\n" - "-- \n" - "Kind regards,\n" - Minchan Kim + But I admit this doesn't almost affect your experiment. -f400c2f873a229f4dc546b2c858d86d72408ff9600255cf45a483a950a58752e +0252adacbd2bdc9d6386e829999b75d8767005a5931f6f8cf4ffd222669e9022
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.