search for: is_first_pag

Displaying 20 results from an estimated 31 matches for "is_first_pag".

Did you mean: is_first_page
2016 Mar 11
0
[PATCH v1 06/19] zsmalloc: clean up many BUG_ON
...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 page *first_page, enum fullness_group fullness) { unsigned long m; - BUG_ON(...
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_ON_PAGE(!is_first_page(first_page), first_page); > + > + m = (struct zs_me...
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_ON_PAGE(!is_first_page(first_page), first_page); > + > + m = (struct zs_me...
2016 Mar 11
0
[PATCH v1 05/19] zsmalloc: use first_page rather than page
...nt is_last_page(struct page *page) return PagePrivate2(page); } -static void get_zspage_mapping(struct page *page, unsigned int *class_idx, +static void get_zspage_mapping(struct page *first_page, + unsigned int *class_idx, enum fullness_group *fullness) { unsigned long m; - BUG_ON(!is_first_page(page)); + BUG_ON(!is_first_page(first_page)); - m = (unsigned long)page->mapping; + m = (unsigned long)first_page->mapping; *fullness = m & FULLNESS_MASK; *class_idx = (m >> FULLNESS_BITS) & CLASS_IDX_MASK; } -static void set_zspage_mapping(struct page *page, unsigned...
2016 Mar 30
0
[PATCH v3 09/16] zsmalloc: move struct zs_meta from mapping to freelist
...n 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(!is_first_page(first_page), first_...
2016 Mar 30
0
[PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping
...SS_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_page), first_page); + + m = (struct zs_meta *)&first_pag...
2016 Mar 11
31
[PATCH v1 00/19] 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.
2016 Mar 11
31
[PATCH v1 00/19] 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.
2016 Mar 21
22
[PATCH v2 00/18] 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.
2016 Mar 21
22
[PATCH v2 00/18] 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.
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...roup 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); > > inuse = first_page->inuse; > - max_objects = first_page->objects; > + objs_per_zspage = class->objs_per_zspage; > > if (inuse == 0) > fg = ZS_EMPTY; > - else if (inuse == max_objects) > + else if (inuse == objs_per_zspage)...
2016 Mar 12
1
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...roup 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); > > inuse = first_page->inuse; > - max_objects = first_page->objects; > + objs_per_zspage = class->objs_per_zspage; > > if (inuse == 0) > fg = ZS_EMPTY; > - else if (inuse == max_objects) > + else if (inuse == objs_per_zspage)...
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.
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.
2016 Mar 11
0
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...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); inuse = first_page->inuse; - max_objects = first_page->objects; + objs_per_zspage = class->objs_per_zspage; if (inuse == 0) fg = ZS_EMPTY; - else if (inuse == max_objects) + else if (inuse == objs_per_zspage) fg = ZS_FULL; - else if (inuse <= 3 *...
2016 Mar 30
0
[PATCH v3 05/16] zsmalloc: keep max_object in size_class
...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); inuse = first_page->inuse; - max_objects = first_page->objects; + objs_per_zspage = class->objs_per_zspage; if (inuse == 0) fg = ZS_EMPTY; - else if (inuse == max_objects) + else if (inuse == objs_per_zspage) fg = ZS_FULL; - else if (inuse <= 3 *...
2016 Mar 14
0
[PATCH v1 09/19] zsmalloc: keep max_object in size_class
...ge *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); > > > > inuse = first_page->inuse; > >- max_objects = first_page->objects; > >+ objs_per_zspage = class->objs_per_zspage; > > > > if (inuse == 0) > > fg = ZS_EMPTY; > >- else if (inuse == max_objects) > &g...
2016 Mar 30
0
[PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping
...CLASS_BITS; unsigned long fullness:FULLNESS_BITS; unsigned long inuse:INUSE_BITS; @@ -446,6 +443,26 @@ static void mod_zspage_inuse(struct page *first_page, int val) m->inuse += val; } +static void set_freeobj(struct page *first_page, int idx) +{ + struct zs_meta *m; + + VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); + + m = (struct zs_meta *)&first_page->mapping; + m->freeobj = idx; +} + +static unsigned long get_freeobj(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->...
2016 Mar 11
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...CLASS_BITS; unsigned long fullness:FULLNESS_BITS; unsigned long inuse:INUSE_BITS; @@ -447,6 +444,26 @@ static void mod_zspage_inuse(struct page *first_page, int val) m->inuse += val; } +static void set_freeobj(struct page *first_page, int idx) +{ + struct zs_meta *m; + + VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); + + m = (struct zs_meta *)&first_page->mapping; + m->freeobj = idx; +} + +static unsigned long get_freeobj(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->...
2016 Mar 17
1
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...struct page *first_page, unsigned long obj_idx) { struct page *cursor = first_page; unsigned long offset = obj_idx * class->size; int nr_page = offset >> PAGE_SHIFT; unsigned long offset_in_page = offset & ~PAGE_MASK; void *addr; int i; if (class->huge) { VM_BUG_ON_PAGE(!is_first_page(page), page); return &page_private(page); } for (i = 0; i < nr_page; i++) cursor = get_next_page(cursor); addr = kmap_atomic(cursor); return addr + offset_in_page; } static void unmap_handle(unsigned long *addr) { if (class->huge) { return; } kunmap_atomic(addr & ~...