diff for duplicates of <20090508121549.GA17077@localhost> diff --git a/a/1.txt b/N1/1.txt index 20b346b..e0ba255 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -5,22 +5,22 @@ On Fri, May 08, 2009 at 08:09:24PM +0800, Minchan Kim wrote: > >> > >> > > @@ -1269,8 +1270,15 @@ static void shrink_active_list(unsigned > >> > > -> >> > > /* page_referenced clears PageReferenced */ -> >> > > if (page_mapping_inuse(page) && -> >> > > - page_referenced(page, 0, sc->mem_cgroup)) -> >> > > + page_referenced(page, 0, sc->mem_cgroup)) { -> >> > > + struct address_space *mapping = page_mapping(page); +> >> > > A A A A A /* page_referenced clears PageReferenced */ +> >> > > A A A A A if (page_mapping_inuse(page) && +> >> > > - A A A A A A page_referenced(page, 0, sc->mem_cgroup)) +> >> > > + A A A A A A page_referenced(page, 0, sc->mem_cgroup)) { +> >> > > + A A A A A A A A struct address_space *mapping = page_mapping(page); > >> > > + -> >> > > pgmoved++; -> >> > > + if (mapping && test_bit(AS_EXEC, &mapping->flags)) { -> >> > > + list_add(&page->lru, &l_active); -> >> > > + continue; -> >> > > + } -> >> > > + } +> >> > > A A A A A A A A A pgmoved++; +> >> > > + A A A A A A A A if (mapping && test_bit(AS_EXEC, &mapping->flags)) { +> >> > > + A A A A A A A A A A A A list_add(&page->lru, &l_active); +> >> > > + A A A A A A A A A A A A continue; +> >> > > + A A A A A A A A } +> >> > > + A A A A } > >> > > >> > Since we walk the VMAs in page_referenced anyway, wouldn't it be -> >> > better to check if one of them is executable? This would even work -> >> > for executable anon pages. After all, there are applications that cow +> >> > better to check if one of them is executable? A This would even work +> >> > for executable anon pages. A After all, there are applications that cow > >> > executable mappings (sbcl and other language environments that use an > >> > executable, run-time modified core image come to mind). > >> @@ -42,59 +42,59 @@ On Fri, May 08, 2009 at 08:09:24PM +0800, Minchan Kim wrote: > > > > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> > > --- -> > include/linux/rmap.h | 5 +++-- -> > mm/rmap.c | 30 +++++++++++++++++++++--------- -> > mm/vmscan.c | 7 +++++-- -> > 3 files changed, 29 insertions(+), 13 deletions(-) +> > A include/linux/rmap.h | A A 5 +++-- +> > A mm/rmap.c A A A A A A | A 30 +++++++++++++++++++++--------- +> > A mm/vmscan.c A A A A A | A A 7 +++++-- +> > A 3 files changed, 29 insertions(+), 13 deletions(-) > > > > --- linux.orig/include/linux/rmap.h > > +++ linux/include/linux/rmap.h > > @@ -83,7 +83,8 @@ static inline void page_dup_rmap(struct -> > /* -> > * Called from mm/vmscan.c to handle paging out -> > */ +> > A /* +> > A * Called from mm/vmscan.c to handle paging out +> > A */ > > -int page_referenced(struct page *, int is_locked, struct mem_cgroup *cnt); > > +int page_referenced(struct page *, int is_locked, -> > + struct mem_cgroup *cnt, unsigned long *vm_flags); -> > int try_to_unmap(struct page *, int ignore_refs); +> > + A A A A A A A A A A A struct mem_cgroup *cnt, unsigned long *vm_flags); +> > A int try_to_unmap(struct page *, int ignore_refs); > > -> > /* +> > A /* > > @@ -128,7 +129,7 @@ int page_wrprotect(struct page *page, in -> > #define anon_vma_prepare(vma) (0) -> > #define anon_vma_link(vma) do {} while (0) +> > A #define anon_vma_prepare(vma) A (0) +> > A #define anon_vma_link(vma) A A do {} while (0) > > > > -#define page_referenced(page,l,cnt) TestClearPageReferenced(page) > > +#define page_referenced(page, locked, cnt, flags) TestClearPageReferenced(page) -> > #define try_to_unmap(page, refs) SWAP_FAIL +> > A #define try_to_unmap(page, refs) SWAP_FAIL > > -> > static inline int page_mkclean(struct page *page) +> > A static inline int page_mkclean(struct page *page) > > --- linux.orig/mm/rmap.c > > +++ linux/mm/rmap.c > > @@ -333,7 +333,8 @@ static int page_mapped_in_vma(struct pag -> > * repeatedly from either page_referenced_anon or page_referenced_file. -> > */ -> > static int page_referenced_one(struct page *page, -> > - struct vm_area_struct *vma, unsigned int *mapcount) -> > + struct vm_area_struct *vma, -> > + unsigned int *mapcount) -> > { -> > struct mm_struct *mm = vma->vm_mm; -> > unsigned long address; +> > A * repeatedly from either page_referenced_anon or page_referenced_file. +> > A */ +> > A static int page_referenced_one(struct page *page, +> > - A A A struct vm_area_struct *vma, unsigned int *mapcount) +> > + A A A A A A A A A A A A A A A struct vm_area_struct *vma, +> > + A A A A A A A A A A A A A A A unsigned int *mapcount) +> > A { +> > A A A A struct mm_struct *mm = vma->vm_mm; +> > A A A A unsigned long address; > > @@ -385,7 +386,8 @@ out: -> > } +> > A } > > -> > static int page_referenced_anon(struct page *page, -> > - struct mem_cgroup *mem_cont) -> > + struct mem_cgroup *mem_cont, -> > + unsigned long *vm_flags) -> > { -> > unsigned int mapcount; -> > struct anon_vma *anon_vma; +> > A static int page_referenced_anon(struct page *page, +> > - A A A A A A A A A A A A A A A struct mem_cgroup *mem_cont) +> > + A A A A A A A A A A A A A A A struct mem_cgroup *mem_cont, +> > + A A A A A A A A A A A A A A A unsigned long *vm_flags) +> > A { +> > A A A A unsigned int mapcount; +> > A A A A struct anon_vma *anon_vma; > > @@ -406,6 +408,7 @@ static int page_referenced_anon(struct p -> > if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont)) -> > continue; -> > referenced += page_referenced_one(page, vma, &mapcount); -> > + *vm_flags |= vma->vm_flags; +> > A A A A A A A A if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont)) +> > A A A A A A A A A A A A continue; +> > A A A A A A A A referenced += page_referenced_one(page, vma, &mapcount); +> > + A A A A A A A *vm_flags |= vma->vm_flags; > > Sometime this vma don't contain the anon page. > That's why we need page_check_address. @@ -104,3 +104,9 @@ On Fri, May 08, 2009 at 08:09:24PM +0800, Minchan Kim wrote: Yes I'm aware of that - the VMA area covers that page, but have no pte actually installed for that page. That should be OK - the presentation of such VMA is a good indication of it being some executable text. + +-- +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 0718017..3a35c2d 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -32,22 +32,22 @@ "> >>\n" "> >> > > @@ -1269,8 +1270,15 @@ static void shrink_active_list(unsigned\n" "> >> > >\n" - "> >> > > \302\240 \302\240 \302\240 \302\240 \302\240 /* page_referenced clears PageReferenced */\n" - "> >> > > \302\240 \302\240 \302\240 \302\240 \302\240 if (page_mapping_inuse(page) &&\n" - "> >> > > - \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 page_referenced(page, 0, sc->mem_cgroup))\n" - "> >> > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 page_referenced(page, 0, sc->mem_cgroup)) {\n" - "> >> > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 struct address_space *mapping = page_mapping(page);\n" + "> >> > > A A A A A /* page_referenced clears PageReferenced */\n" + "> >> > > A A A A A if (page_mapping_inuse(page) &&\n" + "> >> > > - A A A A A A page_referenced(page, 0, sc->mem_cgroup))\n" + "> >> > > + A A A A A A page_referenced(page, 0, sc->mem_cgroup)) {\n" + "> >> > > + A A A A A A A A struct address_space *mapping = page_mapping(page);\n" "> >> > > +\n" - "> >> > > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 pgmoved++;\n" - "> >> > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 if (mapping && test_bit(AS_EXEC, &mapping->flags)) {\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 list_add(&page->lru, &l_active);\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 continue;\n" - "> >> > > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 }\n" - "> >> > > + \302\240 \302\240 \302\240 \302\240 }\n" + "> >> > > A A A A A A A A A pgmoved++;\n" + "> >> > > + A A A A A A A A if (mapping && test_bit(AS_EXEC, &mapping->flags)) {\n" + "> >> > > + A A A A A A A A A A A A list_add(&page->lru, &l_active);\n" + "> >> > > + A A A A A A A A A A A A continue;\n" + "> >> > > + A A A A A A A A }\n" + "> >> > > + A A A A }\n" "> >> >\n" "> >> > Since we walk the VMAs in page_referenced anyway, wouldn't it be\n" - "> >> > better to check if one of them is executable? \302\240This would even work\n" - "> >> > for executable anon pages. \302\240After all, there are applications that cow\n" + "> >> > better to check if one of them is executable? A This would even work\n" + "> >> > for executable anon pages. A After all, there are applications that cow\n" "> >> > executable mappings (sbcl and other language environments that use an\n" "> >> > executable, run-time modified core image come to mind).\n" "> >>\n" @@ -69,59 +69,59 @@ "> >\n" "> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>\n" "> > ---\n" - "> > \302\240include/linux/rmap.h | \302\240 \302\2405 +++--\n" - "> > \302\240mm/rmap.c \302\240 \302\240 \302\240 \302\240 \302\240 \302\240| \302\240 30 +++++++++++++++++++++---------\n" - "> > \302\240mm/vmscan.c \302\240 \302\240 \302\240 \302\240 \302\240| \302\240 \302\2407 +++++--\n" - "> > \302\2403 files changed, 29 insertions(+), 13 deletions(-)\n" + "> > A include/linux/rmap.h | A A 5 +++--\n" + "> > A mm/rmap.c A A A A A A | A 30 +++++++++++++++++++++---------\n" + "> > A mm/vmscan.c A A A A A | A A 7 +++++--\n" + "> > A 3 files changed, 29 insertions(+), 13 deletions(-)\n" "> >\n" "> > --- linux.orig/include/linux/rmap.h\n" "> > +++ linux/include/linux/rmap.h\n" "> > @@ -83,7 +83,8 @@ static inline void page_dup_rmap(struct\n" - "> > \302\240/*\n" - "> > \302\240* Called from mm/vmscan.c to handle paging out\n" - "> > \302\240*/\n" + "> > A /*\n" + "> > A * Called from mm/vmscan.c to handle paging out\n" + "> > A */\n" "> > -int page_referenced(struct page *, int is_locked, struct mem_cgroup *cnt);\n" "> > +int page_referenced(struct page *, int is_locked,\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 struct mem_cgroup *cnt, unsigned long *vm_flags);\n" - "> > \302\240int try_to_unmap(struct page *, int ignore_refs);\n" + "> > + A A A A A A A A A A A struct mem_cgroup *cnt, unsigned long *vm_flags);\n" + "> > A int try_to_unmap(struct page *, int ignore_refs);\n" "> >\n" - "> > \302\240/*\n" + "> > A /*\n" "> > @@ -128,7 +129,7 @@ int page_wrprotect(struct page *page, in\n" - "> > \302\240#define anon_vma_prepare(vma) \302\240(0)\n" - "> > \302\240#define anon_vma_link(vma) \302\240 \302\240 do {} while (0)\n" + "> > A #define anon_vma_prepare(vma) A (0)\n" + "> > A #define anon_vma_link(vma) A A do {} while (0)\n" "> >\n" "> > -#define page_referenced(page,l,cnt) TestClearPageReferenced(page)\n" "> > +#define page_referenced(page, locked, cnt, flags) TestClearPageReferenced(page)\n" - "> > \302\240#define try_to_unmap(page, refs) SWAP_FAIL\n" + "> > A #define try_to_unmap(page, refs) SWAP_FAIL\n" "> >\n" - "> > \302\240static inline int page_mkclean(struct page *page)\n" + "> > A static inline int page_mkclean(struct page *page)\n" "> > --- linux.orig/mm/rmap.c\n" "> > +++ linux/mm/rmap.c\n" "> > @@ -333,7 +333,8 @@ static int page_mapped_in_vma(struct pag\n" - "> > \302\240* repeatedly from either page_referenced_anon or page_referenced_file.\n" - "> > \302\240*/\n" - "> > \302\240static int page_referenced_one(struct page *page,\n" - "> > - \302\240 \302\240 \302\240 struct vm_area_struct *vma, unsigned int *mapcount)\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\240struct vm_area_struct *vma,\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\240unsigned int *mapcount)\n" - "> > \302\240{\n" - "> > \302\240 \302\240 \302\240 \302\240struct mm_struct *mm = vma->vm_mm;\n" - "> > \302\240 \302\240 \302\240 \302\240unsigned long address;\n" + "> > A * repeatedly from either page_referenced_anon or page_referenced_file.\n" + "> > A */\n" + "> > A static int page_referenced_one(struct page *page,\n" + "> > - A A A struct vm_area_struct *vma, unsigned int *mapcount)\n" + "> > + A A A A A A A A A A A A A A A struct vm_area_struct *vma,\n" + "> > + A A A A A A A A A A A A A A A unsigned int *mapcount)\n" + "> > A {\n" + "> > A A A A struct mm_struct *mm = vma->vm_mm;\n" + "> > A A A A unsigned long address;\n" "> > @@ -385,7 +386,8 @@ out:\n" - "> > \302\240}\n" + "> > A }\n" "> >\n" - "> > \302\240static int page_referenced_anon(struct 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 struct mem_cgroup *mem_cont)\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 struct mem_cgroup *mem_cont,\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 unsigned long *vm_flags)\n" - "> > \302\240{\n" - "> > \302\240 \302\240 \302\240 \302\240unsigned int mapcount;\n" - "> > \302\240 \302\240 \302\240 \302\240struct anon_vma *anon_vma;\n" + "> > A static int page_referenced_anon(struct page *page,\n" + "> > - A A A A A A A A A A A A A A A struct mem_cgroup *mem_cont)\n" + "> > + A A A A A A A A A A A A A A A struct mem_cgroup *mem_cont,\n" + "> > + A A A A A A A A A A A A A A A unsigned long *vm_flags)\n" + "> > A {\n" + "> > A A A A unsigned int mapcount;\n" + "> > A A A A struct anon_vma *anon_vma;\n" "> > @@ -406,6 +408,7 @@ static int page_referenced_anon(struct p\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont))\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240continue;\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240referenced += page_referenced_one(page, vma, &mapcount);\n" - "> > + \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 *vm_flags |= vma->vm_flags;\n" + "> > A A A A A A A A if (mem_cont && !mm_match_cgroup(vma->vm_mm, mem_cont))\n" + "> > A A A A A A A A A A A A continue;\n" + "> > A A A A A A A A referenced += page_referenced_one(page, vma, &mapcount);\n" + "> > + A A A A A A A *vm_flags |= vma->vm_flags;\n" "> \n" "> Sometime this vma don't contain the anon page.\n" "> That's why we need page_check_address.\n" @@ -130,6 +130,12 @@ "\n" "Yes I'm aware of that - the VMA area covers that page, but have no pte\n" "actually installed for that page. That should be OK - the presentation\n" - of such VMA is a good indication of it being some executable text. + "of such VMA is a good indication of it being some executable text.\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>" -ffdcae89a0cee022397b5b519d4007b826b56c27fbed47bab3f1a9a6fb1a20fb +b6b7fad56f4074a78d2c8295229edf6156c249de16c9163da06476ed705c19ed
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.