search for: ofs_in_page

Displaying 8 results from an estimated 8 matches for "ofs_in_page".

2016 Mar 15
2
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...6 16:30), Minchan Kim wrote: > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > +static void objidx_to_page_and_ofs(struct size_class *class, > + struct page *first_page, > + unsigned long obj_idx, > + struct page **obj_page, > + unsigned long *ofs_in_page) this looks big; 5 params, function "returning" both page and offset... any chance to split it in two steps, perhaps? besides, it is more intuitive (at least to me) when 'offset' shortened to 'offt', not 'ofs'. -ss > { > - unsigned long obj; > + int...
2016 Mar 15
2
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...6 16:30), Minchan Kim wrote: > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > +static void objidx_to_page_and_ofs(struct size_class *class, > + struct page *first_page, > + unsigned long obj_idx, > + struct page **obj_page, > + unsigned long *ofs_in_page) this looks big; 5 params, function "returning" both page and offset... any chance to split it in two steps, perhaps? besides, it is more intuitive (at least to me) when 'offset' shortened to 'offt', not 'ofs'. -ss > { > - unsigned long obj; > + int...
2016 Mar 17
1
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...c void *location_to_obj(struct page *page, unsigned long obj_idx) >>> +static void objidx_to_page_and_ofs(struct size_class *class, >>> + struct page *first_page, >>> + unsigned long obj_idx, >>> + struct page **obj_page, >>> + unsigned long *ofs_in_page) >> >> this looks big; 5 params, function "returning" both page and offset... >> any chance to split it in two steps, perhaps? > > Yes, it's rather ugly but I don't have a good idea. > Feel free to suggest if you have a better idea. > >> >&g...
2016 Mar 17
1
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...c void *location_to_obj(struct page *page, unsigned long obj_idx) >>> +static void objidx_to_page_and_ofs(struct size_class *class, >>> + struct page *first_page, >>> + unsigned long obj_idx, >>> + struct page **obj_page, >>> + unsigned long *ofs_in_page) >> >> this looks big; 5 params, function "returning" both page and offset... >> any chance to split it in two steps, perhaps? > > Yes, it's rather ugly but I don't have a good idea. > Feel free to suggest if you have a better idea. > >> >&g...
2016 Mar 15
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...gt; > -static void *location_to_obj(struct page *page, unsigned long obj_idx) > > +static void objidx_to_page_and_ofs(struct size_class *class, > > + struct page *first_page, > > + unsigned long obj_idx, > > + struct page **obj_page, > > + unsigned long *ofs_in_page) > > this looks big; 5 params, function "returning" both page and offset... > any chance to split it in two steps, perhaps? Yes, it's rather ugly but I don't have a good idea. Feel free to suggest if you have a better idea. > > besides, it is more intuitive (at...
2016 Mar 11
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...alue. - * We use the least bit of handle for tagging. - */ -static void *location_to_obj(struct page *page, unsigned long obj_idx) +static void objidx_to_page_and_ofs(struct size_class *class, + struct page *first_page, + unsigned long obj_idx, + struct page **obj_page, + unsigned long *ofs_in_page) { - unsigned long obj; + int i; + unsigned long ofs; + struct page *cursor; + int nr_page; - if (!page) { - VM_BUG_ON(obj_idx); - return NULL; - } + ofs = obj_idx * class->size; + cursor = first_page; + nr_page = ofs >> PAGE_SHIFT; - obj = page_to_pfn(page) << OBJ_INDEX_BITS;...
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.