diff for duplicates of <20090617133708.GA7839@localhost> diff --git a/a/1.txt b/N1/1.txt index ae955a0..7de1147 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -23,25 +23,25 @@ On Wed, Jun 17, 2009 at 09:27:36PM +0800, Minchan Kim wrote: > >> > > > > > Signed-off-by: Andi Kleen <ak@linux.intel.com> > >> > > > > > > >> > > > > > --- -> >> > > > > > include/linux/rmap.h | 1 + -> >> > > > > > mm/rmap.c | 9 ++++++++- -> >> > > > > > 2 files changed, 9 insertions(+), 1 deletion(-) +> >> > > > > > A include/linux/rmap.h | A A 1 + +> >> > > > > > A mm/rmap.c A A A A A A | A A 9 ++++++++- +> >> > > > > > A 2 files changed, 9 insertions(+), 1 deletion(-) > >> > > > > > > >> > > > > > --- sound-2.6.orig/mm/rmap.c > >> > > > > > +++ sound-2.6/mm/rmap.c > >> > > > > > @@ -958,7 +958,14 @@ static int try_to_unmap_one(struct page -> >> > > > > > /* Update high watermark before we lower rss */ -> >> > > > > > update_hiwater_rss(mm); +> >> > > > > > A A A A /* Update high watermark before we lower rss */ +> >> > > > > > A A A A update_hiwater_rss(mm); > >> > > > > > -> >> > > > > > - if (PageAnon(page)) { -> >> > > > > > + if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) { -> >> > > > > > + if (PageAnon(page)) -> >> > > > > > + dec_mm_counter(mm, anon_rss); -> >> > > > > > + else if (!is_migration_entry(pte_to_swp_entry(*pte))) +> >> > > > > > - A A A if (PageAnon(page)) { +> >> > > > > > + A A A if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) { +> >> > > > > > + A A A A A A A if (PageAnon(page)) +> >> > > > > > + A A A A A A A A A A A dec_mm_counter(mm, anon_rss); +> >> > > > > > + A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte))) > >> > > > > > >> > > > > Isn't it straightforward to use !is_hwpoison_entry ? > >> > > > -> >> > > > Good catch! It looks like a redundant check: the +> >> > > > Good catch! A It looks like a redundant check: the > >> > > > page_check_address() at the beginning of the function guarantees that > >> > > > !is_migration_entry() or !is_migration_entry() tests will all be TRUE. > >> > > > So let's do this? @@ -53,9 +53,9 @@ On Wed, Jun 17, 2009 at 09:27:36PM +0800, Minchan Kim wrote: > >> > page_check_address() calls pte_present() which returns the > >> > (_PAGE_PRESENT | _PAGE_PROTNONE) bits. While x86-64 defines > >> > -> >> > #define __swp_entry(type, offset) ((swp_entry_t) { \ -> >> > ((type) << (_PAGE_BIT_PRESENT + 1)) \ -> >> > | ((offset) << SWP_OFFSET_SHIFT) }) +> >> > #define __swp_entry(type, offset) A A A ((swp_entry_t) { \ +> >> > A A A A A A A A A A A A A A A A A A A A A ((type) << (_PAGE_BIT_PRESENT + 1)) \ +> >> > A A A A A A A A A A A A A A A A A A A A A | ((offset) << SWP_OFFSET_SHIFT) }) > >> > > >> > where SWP_OFFSET_SHIFT is defined to the bigger one of > >> > max(_PAGE_BIT_PROTNONE + 1, _PAGE_BIT_FILE + 1) = max(8+1, 6+1) = 9. @@ -82,8 +82,8 @@ On Wed, Jun 17, 2009 at 09:27:36PM +0800, Minchan Kim wrote: > >> Okay. then, how about this ? > >> We should not increase file_rss on trying to migrate the poisoned page > >> -> >> - else if (!is_migration_entry(pte_to_swp_entry(*pte))) -> >> + else if (!(PAGE_MIGRATION && migration)) +> >> - A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte))) +> >> + A A A A A A A else if (!(PAGE_MIGRATION && migration)) > > > > This is good if we are going to stop the hwpoison page from being > > consumed by move_to_new_page(), but I highly doubt we'll ever add @@ -91,10 +91,10 @@ On Wed, Jun 17, 2009 at 09:27:36PM +0800, Minchan Kim wrote: > > > > Because this race window is small enough: > > -> > TestSetPageHWPoison(p); -> > lock_page(page); -> > try_to_unmap(page, TTU_MIGRATION|...); -> > lock_page_nosync(p); +> > A A A A TestSetPageHWPoison(p); +> > A A A A A A A A A A A A A A A A A lock_page(page); +> > A A A A A A A A A A A A A A A A A try_to_unmap(page, TTU_MIGRATION|...); +> > A A A A lock_page_nosync(p); > > > > such small race windows can be found all over the kernel, it's just > > insane to try to fix any of them. @@ -111,3 +111,9 @@ accessing/consuming the poisoned page anyway :( Thanks, Fengguang + +-- +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> diff --git a/a/content_digest b/N1/content_digest index c967376..3d3bbfd 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -52,25 +52,25 @@ "> >> > > > > > Signed-off-by: Andi Kleen <ak@linux.intel.com>\n" "> >> > > > > >\n" "> >> > > > > > ---\n" - "> >> > > > > > \302\240include/linux/rmap.h | \302\240 \302\2401 +\n" - "> >> > > > > > \302\240mm/rmap.c \302\240 \302\240 \302\240 \302\240 \302\240 \302\240| \302\240 \302\2409 ++++++++-\n" - "> >> > > > > > \302\2402 files changed, 9 insertions(+), 1 deletion(-)\n" + "> >> > > > > > A include/linux/rmap.h | A A 1 +\n" + "> >> > > > > > A mm/rmap.c A A A A A A | A A 9 ++++++++-\n" + "> >> > > > > > A 2 files changed, 9 insertions(+), 1 deletion(-)\n" "> >> > > > > >\n" "> >> > > > > > --- sound-2.6.orig/mm/rmap.c\n" "> >> > > > > > +++ sound-2.6/mm/rmap.c\n" "> >> > > > > > @@ -958,7 +958,14 @@ static int try_to_unmap_one(struct page\n" - "> >> > > > > > \302\240 \302\240 \302\240 \302\240/* Update high watermark before we lower rss */\n" - "> >> > > > > > \302\240 \302\240 \302\240 \302\240update_hiwater_rss(mm);\n" + "> >> > > > > > A A A A /* Update high watermark before we lower rss */\n" + "> >> > > > > > A A A A update_hiwater_rss(mm);\n" "> >> > > > > >\n" - "> >> > > > > > - \302\240 \302\240 \302\240 if (PageAnon(page)) {\n" - "> >> > > > > > + \302\240 \302\240 \302\240 if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {\n" - "> >> > > > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (PageAnon(page))\n" - "> >> > > > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 dec_mm_counter(mm, anon_rss);\n" - "> >> > > > > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" + "> >> > > > > > - A A A if (PageAnon(page)) {\n" + "> >> > > > > > + A A A if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {\n" + "> >> > > > > > + A A A A A A A if (PageAnon(page))\n" + "> >> > > > > > + A A A A A A A A A A A dec_mm_counter(mm, anon_rss);\n" + "> >> > > > > > + A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" "> >> > > > >\n" "> >> > > > > Isn't it straightforward to use !is_hwpoison_entry ?\n" "> >> > > >\n" - "> >> > > > Good catch! \302\240It looks like a redundant check: the\n" + "> >> > > > Good catch! A It looks like a redundant check: the\n" "> >> > > > page_check_address() at the beginning of the function guarantees that\n" "> >> > > > !is_migration_entry() or !is_migration_entry() tests will all be TRUE.\n" "> >> > > > So let's do this?\n" @@ -82,9 +82,9 @@ "> >> > page_check_address() calls pte_present() which returns the\n" "> >> > (_PAGE_PRESENT | _PAGE_PROTNONE) bits. While x86-64 defines\n" "> >> >\n" - "> >> > #define __swp_entry(type, offset) \302\240 \302\240 \302\240 ((swp_entry_t) { \\\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240((type) << (_PAGE_BIT_PRESENT + 1)) \\\n" - "> >> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240| ((offset) << SWP_OFFSET_SHIFT) })\n" + "> >> > #define __swp_entry(type, offset) A A A ((swp_entry_t) { \\\n" + "> >> > A A A A A A A A A A A A A A A A A A A A A ((type) << (_PAGE_BIT_PRESENT + 1)) \\\n" + "> >> > A A A A A A A A A A A A A A A A A A A A A | ((offset) << SWP_OFFSET_SHIFT) })\n" "> >> >\n" "> >> > where SWP_OFFSET_SHIFT is defined to the bigger one of\n" "> >> > max(_PAGE_BIT_PROTNONE + 1, _PAGE_BIT_FILE + 1) = max(8+1, 6+1) = 9.\n" @@ -111,8 +111,8 @@ "> >> Okay. then, how about this ?\n" "> >> We should not increase file_rss on trying to migrate the poisoned page\n" "> >>\n" - "> >> - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" - "> >> + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 else if (!(PAGE_MIGRATION && migration))\n" + "> >> - A A A A A A A else if (!is_migration_entry(pte_to_swp_entry(*pte)))\n" + "> >> + A A A A A A A else if (!(PAGE_MIGRATION && migration))\n" "> >\n" "> > This is good if we are going to stop the hwpoison page from being\n" "> > consumed by move_to_new_page(), but I highly doubt we'll ever add\n" @@ -120,10 +120,10 @@ "> >\n" "> > Because this race window is small enough:\n" "> >\n" - "> > \302\240 \302\240 \302\240 \302\240TestSetPageHWPoison(p);\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 lock_page(page);\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 try_to_unmap(page, TTU_MIGRATION|...);\n" - "> > \302\240 \302\240 \302\240 \302\240lock_page_nosync(p);\n" + "> > A A A A TestSetPageHWPoison(p);\n" + "> > A A A A A A A A A A A A A A A A A lock_page(page);\n" + "> > A A A A A A A A A A A A A A A A A try_to_unmap(page, TTU_MIGRATION|...);\n" + "> > A A A A lock_page_nosync(p);\n" "> >\n" "> > such small race windows can be found all over the kernel, it's just\n" "> > insane to try to fix any of them.\n" @@ -139,6 +139,12 @@ "accessing/consuming the poisoned page anyway :(\n" "\n" "Thanks,\n" - Fengguang + "Fengguang\n" + "\n" + "--\n" + "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" + "the body to majordomo@kvack.org. For more info on Linux MM,\n" + "see: http://www.linux-mm.org/ .\n" + "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" -e9be91a5ae2405350c782d074be29f2e370ea63bf331c5904bbd44e5a24dd49b +5cad0a62538ae04a87cfb574f10dd66f073b98b8f8557f2be1d2fc123b026b19
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.