diff for duplicates of <20090617141237.GA8528@localhost> diff --git a/a/1.txt b/N1/1.txt index 3b7830b..aef9626 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -27,25 +27,25 @@ On Wed, Jun 17, 2009 at 10:08:13PM +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? @@ -57,9 +57,9 @@ On Wed, Jun 17, 2009 at 10:08:13PM +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. @@ -86,8 +86,8 @@ On Wed, Jun 17, 2009 at 10:08:13PM +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 @@ -95,10 +95,10 @@ On Wed, Jun 17, 2009 at 10:08:13PM +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. @@ -108,7 +108,7 @@ On Wed, Jun 17, 2009 at 10:08:13PM +0800, Minchan Kim wrote: > >> >> I see your point. > >> >> My opinion is that at least we must be notified when such situation happen. > >> >> So I think it would be better to add some warning to fix up it when it -> >> >> happen even thought it is small race window. +> >> >> happen even thought A it is small race window. > >> > > >> > Notification is also pointless here: we'll die hard on > >> > accessing/consuming the poisoned page anyway :( @@ -136,3 +136,9 @@ On Wed, Jun 17, 2009 at 10:08:13PM +0800, Minchan Kim wrote: > Reviewed-by : Minchan Kim <minchan.kim@gmail.com> Thank you, I'll add comments to clearly state that goal and its rational :) + +-- +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 ea2cac9..82830ca 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -57,25 +57,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" @@ -87,9 +87,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" @@ -116,8 +116,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" @@ -125,10 +125,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" @@ -138,7 +138,7 @@ "> >> >> I see your point.\n" "> >> >> My opinion is that at least we must be notified when such situation happen.\n" "> >> >> So I think it would be better to add some warning to fix up it when it\n" - "> >> >> happen even thought \302\240it is small race window.\n" + "> >> >> happen even thought A it is small race window.\n" "> >> >\n" "> >> > Notification is also pointless here: we'll die hard on\n" "> >> > accessing/consuming the poisoned page anyway :(\n" @@ -165,6 +165,12 @@ "> \n" "> Reviewed-by : Minchan Kim <minchan.kim@gmail.com>\n" "\n" - Thank you, I'll add comments to clearly state that goal and its rational :) + "Thank you, I'll add comments to clearly state that goal and its rational :)\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>" -7d8dfb7d74f1e4f711aff17d5cc76e44674c5bc00067a372fa91040678bd2c08 +4f4f66549b30602b4ebf9c7c8ed91795913457835424815d00fbe0853df55319
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.