Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1282898 > unrolled thread

[PATCH]mm:Correctly update number of rotated pages on active list.

Started by"Pradeep Goswami (Pradeep Kumar Goswami)" <Pradeep.Goswami@spreadtrum.com>
First post2015-12-03 11:20 +0100
Last post2015-12-03 15:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH]mm:Correctly update number of rotated pages on active list. "Pradeep Goswami (Pradeep Kumar Goswami)"   <Pradeep.Goswami@spreadtrum.com> - 2015-12-03 11:20 +0100
    Re: [PATCH]mm:Correctly update number of rotated pages on active  list. Michal Hocko <mhocko@kernel.org> - 2015-12-03 12:00 +0100
      Re: [PATCH]mm:Correctly update number of rotated pages on active  list. "Pradeep Goswami (Pradeep Kumar Goswami)"   <Pradeep.Goswami@spreadtrum.com> - 2015-12-03 15:50 +0100

#1282898 — [PATCH]mm:Correctly update number of rotated pages on active list.

From"Pradeep Goswami (Pradeep Kumar Goswami)" <Pradeep.Goswami@spreadtrum.com>
Date2015-12-03 11:20 +0100
Subject[PATCH]mm:Correctly update number of rotated pages on active list.
Message-ID<qBz9v-3CM-1@gated-at.bofh.it>
This patch corrects the number of pages which are rotated on active list.
The counter for rotated pages effects the number of pages
to be scanned on active pages list in  low memory situations.

Signed-off-by: Pradeep Goswami <pradeep.goswami@spredtrum.com>
Cc: Rebecca Schultz Zavin <rebecca@android.com>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
--- a/mm/vmscan.c       2015-11-18 20:55:38.208838142 +0800
+++ b/mm/vmscan.c       2015-11-19 14:37:31.189838998 +0800
@@ -1806,7 +1806,6 @@ static void shrink_active_list(unsigned
 
                if (page_referenced(page, 0, sc->target_mem_cgroup,
                                    &vm_flags)) {
-                       nr_rotated += hpage_nr_pages(page);
                        /*  
                         * Identify referenced, file-backed active pages and 
                         * give them one more trip around the active list. So
@@ -1818,6 +1817,7 @@ static void shrink_active_list(unsigned
                         */  
                        if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) {
                                list_add(&page->lru, &l_active);
+                               nr_rotated += hpage_nr_pages(page);
                                continue;
                        }   
                }   

Thanks,
Pradeep.--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1282937 — Re: [PATCH]mm:Correctly update number of rotated pages on active list.

FromMichal Hocko <mhocko@kernel.org>
Date2015-12-03 12:00 +0100
SubjectRe: [PATCH]mm:Correctly update number of rotated pages on active list.
Message-ID<qBzMd-3RU-1@gated-at.bofh.it>
In reply to#1282898
On Thu 03-12-15 10:08:11, Pradeep Goswami (Pradeep Kumar Goswami) wrote:
> This patch corrects the number of pages which are rotated on active list.
> The counter for rotated pages effects the number of pages
> to be scanned on active pages list in  low memory situations.

Why this should be changed?

This seems to be deliberate:
        /*
         * Count referenced pages from currently used mappings as rotated,
         * even though only some of them are actually re-activated.  This
         * helps balance scan pressure between file and anonymous pages in
         * get_scan_count.
         */
        reclaim_stat->recent_rotated[file] += nr_rotated;

What kind of problem are you trying to fix?

> 
> Signed-off-by: Pradeep Goswami <pradeep.goswami@spredtrum.com>
> Cc: Rebecca Schultz Zavin <rebecca@android.com>
> Cc: Vladimir Davydov <vdavydov@parallels.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> ---
> --- a/mm/vmscan.c       2015-11-18 20:55:38.208838142 +0800
> +++ b/mm/vmscan.c       2015-11-19 14:37:31.189838998 +0800
> @@ -1806,7 +1806,6 @@ static void shrink_active_list(unsigned
>  
>                 if (page_referenced(page, 0, sc->target_mem_cgroup,
>                                     &vm_flags)) {
> -                       nr_rotated += hpage_nr_pages(page);
>                         /*  
>                          * Identify referenced, file-backed active pages and 
>                          * give them one more trip around the active list. So
> @@ -1818,6 +1817,7 @@ static void shrink_active_list(unsigned
>                          */  
>                         if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) {
>                                 list_add(&page->lru, &l_active);
> +                               nr_rotated += hpage_nr_pages(page);
>                                 continue;
>                         }   
>                 }   
> 
> Thanks,
> Pradeep.
> --
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1283095 — Re: [PATCH]mm:Correctly update number of rotated pages on active list.

From"Pradeep Goswami (Pradeep Kumar Goswami)" <Pradeep.Goswami@spreadtrum.com>
Date2015-12-03 15:50 +0100
SubjectRe: [PATCH]mm:Correctly update number of rotated pages on active list.
Message-ID<qBDmN-6pd-19@gated-at.bofh.it>
In reply to#1282937
On Thu, Dec 03, 2015 at 11:59:48AM +0100, Michal Hocko wrote:
> On Thu 03-12-15 10:08:11, Pradeep Goswami (Pradeep Kumar Goswami) wrote:
> > This patch corrects the number of pages which are rotated on active list.
> > The counter for rotated pages effects the number of pages
> > to be scanned on active pages list in  low memory situations.
> 
> Why this should be changed?
> 
> This seems to be deliberate:
>         /*
>          * Count referenced pages from currently used mappings as rotated,
>          * even though only some of them are actually re-activated.  This
>          * helps balance scan pressure between file and anonymous pages in
>          * get_scan_count.
>          */
>         reclaim_stat->recent_rotated[file] += nr_rotated;
> 
> What kind of problem are you trying to fix?
Actually the numeber of pages which are actually rotated are wrongly
updated, So I thought this might be minor coding error but as pointed
out above, this seems to be deliberate. Thanks for clarifying.
> 
> > 
> > Signed-off-by: Pradeep Goswami <pradeep.goswami@spredtrum.com>
> > Cc: Rebecca Schultz Zavin <rebecca@android.com>
> > Cc: Vladimir Davydov <vdavydov@parallels.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > --- a/mm/vmscan.c       2015-11-18 20:55:38.208838142 +0800
> > +++ b/mm/vmscan.c       2015-11-19 14:37:31.189838998 +0800
> > @@ -1806,7 +1806,6 @@ static void shrink_active_list(unsigned
> >  
> >                 if (page_referenced(page, 0, sc->target_mem_cgroup,
> >                                     &vm_flags)) {
> > -                       nr_rotated += hpage_nr_pages(page);
> >                         /*  
> >                          * Identify referenced, file-backed active pages and 
> >                          * give them one more trip around the active list. So
> > @@ -1818,6 +1817,7 @@ static void shrink_active_list(unsigned
> >                          */  
> >                         if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) {
> >                                 list_add(&page->lru, &l_active);
> > +                               nr_rotated += hpage_nr_pages(page);
> >                                 continue;
> >                         }   
> >                 }   
> > 
> > Thanks,
> > Pradeep.
> > --
> > 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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web