Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1261106 > unrolled thread
| Started by | Minchan Kim <minchan@kernel.org> |
|---|---|
| First post | 2015-11-03 02:20 +0100 |
| Last post | 2015-11-04 09:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 6/8] mm: lru_deactivate_fn should clear PG_referenced Minchan Kim <minchan@kernel.org> - 2015-11-03 02:20 +0100
Re: [PATCH 6/8] mm: lru_deactivate_fn should clear PG_referenced Michal Hocko <mhocko@kernel.org> - 2015-11-04 09:30 +0100
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Date | 2015-11-03 02:20 +0100 |
| Subject | Re: [PATCH 6/8] mm: lru_deactivate_fn should clear PG_referenced |
| Message-ID | <qqyqu-4js-7@gated-at.bofh.it> |
On Fri, Oct 30, 2015 at 01:47:11PM +0100, Michal Hocko wrote: > On Fri 30-10-15 16:01:42, Minchan Kim wrote: > > deactivate_page aims for accelerate for reclaiming through > > moving pages from active list to inactive list so we should > > clear PG_referenced for the goal. > > I might be missing something but aren't we using PG_referenced only for > pagecache (and shmem) pages? You don't miss anything. For pages which are candidate of MADV_FREEing( ie, normal anonymous page, not shmem, tmpfs), they shouldn't have any PG_referenced. Although normal anonymous pages have it, VM doesn't respect it. One thing I suspect is GUP with FOLL_TOUCH which calls mark_page_accesssed on anonymous page and will mark PG_referenced. Technically, it's not a problem but just want to notice in this time. Primary reason was I want to make deactivate_page *general* so it could be used for file page as well as anon pages in future. But at the moment, user of deactivate_page is only MADV_FREE so it might be better to merge the logic for anon page deactivation into deactivate_file_page and rename it as general "deactivate_page" if you're thinking it's better. > > > > > Acked-by: Hugh Dickins <hughd@google.com> > > Suggested-by: Andrew Morton <akpm@linux-foundation.org> > > Signed-off-by: Minchan Kim <minchan@kernel.org> > > --- > > mm/swap.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/mm/swap.c b/mm/swap.c > > index d0eacc5f62a3..4a6aec976ab1 100644 > > --- a/mm/swap.c > > +++ b/mm/swap.c > > @@ -810,6 +810,7 @@ static void lru_deactivate_fn(struct page *page, struct lruvec *lruvec, > > > > del_page_from_lru_list(page, lruvec, lru + LRU_ACTIVE); > > ClearPageActive(page); > > + ClearPageReferenced(page); > > add_page_to_lru_list(page, lruvec, lru); > > > > __count_vm_event(PGDEACTIVATE); > > -- > > 1.9.1 > > -- > 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] | [next] | [standalone]
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Date | 2015-11-04 09:30 +0100 |
| Message-ID | <qr1C9-6qv-3@gated-at.bofh.it> |
| In reply to | #1261106 |
On Tue 03-11-15 10:10:30, Minchan Kim wrote: > One thing I suspect is GUP with FOLL_TOUCH which calls mark_page_accesssed > on anonymous page and will mark PG_referenced. OK, this is what I've missed. -- 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