search for: first_pag

Displaying 20 results from an estimated 47 matches for "first_pag".

Did you mean: first_page
2016 Apr 17
1
[PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping
Hello, On (03/30/16 16:12), Minchan Kim wrote: [..] > +static int get_zspage_inuse(struct page *first_page) > +{ > + struct zs_meta *m; > + > + VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > + > + m = (struct zs_meta *)&first_page->mapping; .. > +static void set_zspage_inuse(struct page *first_page, int val) > +{ > + struct zs_meta *m; > + > + VM_BUG_O...
2016 Apr 17
1
[PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping
Hello, On (03/30/16 16:12), Minchan Kim wrote: [..] > +static int get_zspage_inuse(struct page *first_page) > +{ > + struct zs_meta *m; > + > + VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > + > + m = (struct zs_meta *)&first_page->mapping; .. > +static void set_zspage_inuse(struct page *first_page, int val) > +{ > + struct zs_meta *m; > + > + VM_BUG_O...
2016 Mar 21
0
[PATCH v2 17/18] zsmalloc: migrate tail pages in zspage
...+++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 115 insertions(+), 16 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 9b4b03d8f993..35bafa0bc3f1 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -551,6 +551,19 @@ static void set_zspage_mapping(struct page *first_page, m->class = class_idx; } +static bool check_isolated_page(struct page *first_page) +{ + struct page *cursor; + + for (cursor = first_page; cursor != NULL; cursor = + get_next_page(cursor)) { + if (PageIsolated(cursor)) + return true; + } + + return false; +} + /* * zsmalloc divid...
2016 Mar 11
0
[PATCH v1 06/19] zsmalloc: clean up many BUG_ON
...m/zsmalloc.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index bb29203ec6b3..3c82011cc405 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -419,7 +419,7 @@ static void get_zspage_mapping(struct page *first_page, enum fullness_group *fullness) { unsigned long m; - BUG_ON(!is_first_page(first_page)); + VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); m = (unsigned long)first_page->mapping; *fullness = m & FULLNESS_MASK; @@ -431,7 +431,7 @@ static void set_zspage_mapping(struct p...
2016 Mar 21
2
[PATCH v2 17/18] zsmalloc: migrate tail pages in zspage
Hi Minchan, [auto build test WARNING on next-20160318] [cannot apply to v4.5-rc7 v4.5-rc6 v4.5-rc5 v4.5] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Minchan-Kim/Support-non-lru-page-migration/20160321-143339 coccinelle warnings: (new ones prefixed by >>) >>
2016 Mar 21
2
[PATCH v2 17/18] zsmalloc: migrate tail pages in zspage
Hi Minchan, [auto build test WARNING on next-20160318] [cannot apply to v4.5-rc7 v4.5-rc6 v4.5-rc5 v4.5] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Minchan-Kim/Support-non-lru-page-migration/20160321-143339 coccinelle warnings: (new ones prefixed by >>) >>
2016 Mar 30
0
[PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping
...d long class:CLASS_BITS; + unsigned long fullness:FULLNESS_BITS; + unsigned long inuse:INUSE_BITS; +}; struct mapping_area { #ifdef CONFIG_PGTABLE_MAPPING @@ -412,28 +415,61 @@ static int is_last_page(struct page *page) return PagePrivate2(page); } +static int get_zspage_inuse(struct page *first_page) +{ + struct zs_meta *m; + + VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); + + m = (struct zs_meta *)&first_page->mapping; + + return m->inuse; +} + +static void set_zspage_inuse(struct page *first_page, int val) +{ + struct zs_meta *m; + + VM_BUG_ON_PAGE(!is_first_page(first_p...
2016 Mar 11
31
[PATCH v1 00/19] Support non-lru page migration
...mm: use put_page to free page instead of putback_lru_page fs/anon_inodes: new interface to create new inode mm/compaction: support non-lru movable page migration 2. rework KVM memory-ballooning mm/balloon: use general movable page feature into balloon 3. rework zsmalloc zsmalloc: use first_page rather than page zsmalloc: clean up many BUG_ON zsmalloc: reordering function parameter zsmalloc: remove unused pool param in obj_free zsmalloc: keep max_object in size_class zsmalloc: squeeze inuse into page->mapping zsmalloc: squeeze freelist into page->mapping zsmalloc: move...
2016 Mar 11
31
[PATCH v1 00/19] Support non-lru page migration
...mm: use put_page to free page instead of putback_lru_page fs/anon_inodes: new interface to create new inode mm/compaction: support non-lru movable page migration 2. rework KVM memory-ballooning mm/balloon: use general movable page feature into balloon 3. rework zsmalloc zsmalloc: use first_page rather than page zsmalloc: clean up many BUG_ON zsmalloc: reordering function parameter zsmalloc: remove unused pool param in obj_free zsmalloc: keep max_object in size_class zsmalloc: squeeze inuse into page->mapping zsmalloc: squeeze freelist into page->mapping zsmalloc: move...
2016 Mar 30
0
[PATCH v3 09/16] zsmalloc: move struct zs_meta from mapping to freelist
...ically forming list of zspages in a fullness group. - * page->mapping: override by struct zs_meta + * page->freelist: override by struct zs_meta * * Usage of struct page flags: * PG_private: identifies the first component page @@ -418,7 +418,7 @@ static int get_zspage_inuse(struct page *first_page) VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); - m = (struct zs_meta *)&first_page->mapping; + m = (struct zs_meta *)&first_page->freelist; return m->inuse; } @@ -429,7 +429,7 @@ static void set_zspage_inuse(struct page *first_page, int val) VM_BUG_ON_PAGE...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...------ > 1 file changed, 45 insertions(+), 33 deletions(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index bfc6a048afac..f86f8aaeb902 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -977,7 +977,9 @@ static void init_zspage(struct size_class *class, struct page *first_page) > unsigned long off = 0; > struct page *page = first_page; > > - VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > + first_page->freelist = NULL; > + INIT_LIST_HEAD(&first_page->lru); > + set_zspage_inuse(first_page, 0); > > while (page) { &gt...
2016 Mar 12
1
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...------ > 1 file changed, 45 insertions(+), 33 deletions(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index bfc6a048afac..f86f8aaeb902 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -977,7 +977,9 @@ static void init_zspage(struct size_class *class, struct page *first_page) > unsigned long off = 0; > struct page *page = first_page; > > - VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > + first_page->freelist = NULL; > + INIT_LIST_HEAD(&first_page->lru); > + set_zspage_inuse(first_page, 0); > > while (page) { &gt...
2016 Mar 21
22
[PATCH v2 00/18] Support non-lru page migration
...hlebnikov. He really heped Gioh at that time so he should deserve to have many credit, too. Thanks, Konstantin! This patchset consists of five parts 1. clean up migration mm: use put_page to free page instead of putback_lru_page 2. zsmalloc clean-up for preparing page migration zsmalloc: use first_page rather than page zsmalloc: clean up many BUG_ON zsmalloc: reordering function parameter zsmalloc: remove unused pool param in obj_free zsmalloc: keep max_object in size_class zsmalloc: squeeze inuse into page->mapping zsmalloc: squeeze freelist into page->mapping zsmalloc: move...
2016 Mar 21
22
[PATCH v2 00/18] Support non-lru page migration
...hlebnikov. He really heped Gioh at that time so he should deserve to have many credit, too. Thanks, Konstantin! This patchset consists of five parts 1. clean up migration mm: use put_page to free page instead of putback_lru_page 2. zsmalloc clean-up for preparing page migration zsmalloc: use first_page rather than page zsmalloc: clean up many BUG_ON zsmalloc: reordering function parameter zsmalloc: remove unused pool param in obj_free zsmalloc: keep max_object in size_class zsmalloc: squeeze inuse into page->mapping zsmalloc: squeeze freelist into page->mapping zsmalloc: move...
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...truct zs_size_stat stats; > @@ -622,21 +621,22 @@ static inline void zs_pool_stat_destroy(struct zs_pool *pool) > * the pool (not yet implemented). This function returns fullness > * status of the given page. > */ > -static enum fullness_group get_fullness_group(struct page *first_page) > +static enum fullness_group get_fullness_group(struct size_class *class, > + struct page *first_page) > { > - int inuse, max_objects; > + int inuse, objs_per_zspage; > enum fullness_group fg; > > VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > &...
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...truct zs_size_stat stats; > @@ -622,21 +621,22 @@ static inline void zs_pool_stat_destroy(struct zs_pool *pool) > * the pool (not yet implemented). This function returns fullness > * status of the given page. > */ > -static enum fullness_group get_fullness_group(struct page *first_page) > +static enum fullness_group get_fullness_group(struct size_class *class, > + struct page *first_page) > { > - int inuse, max_objects; > + int inuse, objs_per_zspage; > enum fullness_group fg; > > VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > &...
2016 Mar 11
0
[PATCH v1 05/19] zsmalloc: use first_page rather than page
This patch cleans up function parameter "struct page". Many functions of zsmalloc expects that page paramter is "first_page" so use "first_page" rather than "page" for code readability. Signed-off-by: Minchan Kim <minchan at kernel.org> --- mm/zsmalloc.c | 62 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/mm/z...
2016 Mar 30
0
[PATCH v3 10/16] zsmalloc: factor page chain functionality out
...++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index d4d33a819832..14bcc741eead 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -981,7 +981,9 @@ static void init_zspage(struct size_class *class, struct page *first_page) unsigned long off = 0; struct page *page = first_page; - VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); + first_page->freelist = NULL; + INIT_LIST_HEAD(&first_page->lru); + set_zspage_inuse(first_page, 0); while (page) { struct page *next_page; @@ -1026,13 +1028,44...
2016 Mar 11
0
[PATCH v1 13/19] zsmalloc: factor page chain functionality out
...++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index bfc6a048afac..f86f8aaeb902 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -977,7 +977,9 @@ static void init_zspage(struct size_class *class, struct page *first_page) unsigned long off = 0; struct page *page = first_page; - VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); + first_page->freelist = NULL; + INIT_LIST_HEAD(&first_page->lru); + set_zspage_inuse(first_page, 0); while (page) { struct page *next_page; @@ -1022,13 +1024,44...
2016 Mar 30
33
[PATCH v3 00/16] Support non-lru page migration
Recently, I got many reports about perfermance degradation in embedded system(Android mobile phone, webOS TV and so on) and failed to fork easily. The problem was fragmentation caused by zram and GPU driver pages. Their pages cannot be migrated so compaction cannot work well, either so reclaimer ends up shrinking all of working set pages. It made system very slow and even to fail to fork easily.