Displaying 15 results from an estimated 15 matches for "obj_index_bits".
2016 Mar 15
2
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...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;
> - obj |= ((obj_idx) & OBJ_INDEX_MASK);
> - obj <<= OBJ_TAG_BITS;
> + *ofs_in_page = ofs & ~PAGE_MASK;
> +
> + for (i = 0; i < nr_page; i++)
> + cursor = get_next_page(cursor);
>
> - return (void *)obj;
> + *obj_page = cursor;
> }
2016 Mar 15
2
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...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;
> - obj |= ((obj_idx) & OBJ_INDEX_MASK);
> - obj <<= OBJ_TAG_BITS;
> + *ofs_in_page = ofs & ~PAGE_MASK;
> +
> + for (i = 0; i < nr_page; i++)
> + cursor = get_next_page(cursor);
>
> - return (void *)obj;
> + *obj_page = cursor;
> }
2016 Mar 30
0
[PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping
...n_page)
{
- unsigned long obj;
+ int i;
+ unsigned long offset;
+ struct page *cursor;
+ int nr_page;
- if (!page) {
- VM_BUG_ON(obj_idx);
- return NULL;
- }
+ offset = obj_idx * class->size;
+ cursor = first_page;
+ nr_page = offset >> PAGE_SHIFT;
- obj = page_to_pfn(page) << OBJ_INDEX_BITS;
- obj |= ((obj_idx) & OBJ_INDEX_MASK);
- obj <<= OBJ_TAG_BITS;
+ *offset_in_page = offset & ~PAGE_MASK;
+
+ for (i = 0; i < nr_page; i++)
+ cursor = get_next_page(cursor);
- return (void *)obj;
+ *obj_page = cursor;
}
-/*
- * Decode <page, obj_idx> pair from the given...
2016 Mar 11
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...ng *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;
- obj |= ((obj_idx) & OBJ_INDEX_MASK);
- obj <<= OBJ_TAG_BITS;
+ *ofs_in_page = ofs & ~PAGE_MASK;
+
+ for (i = 0; i < nr_page; i++)
+ cursor = get_next_page(cursor);
- return (void *)obj;
+ *obj_page = cursor;
}
-/*
- * Decode <page, obj_idx> pair from the given object...
2016 Mar 15
0
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...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;
> > - obj |= ((obj_idx) & OBJ_INDEX_MASK);
> > - obj <<= OBJ_TAG_BITS;
> > + *ofs_in_page = ofs & ~PAGE_MASK;
> > +
> > + for (i = 0; i < nr_page; i++)
> > + cursor = get_next_page(cursor);
> >
> > - return (void *)obj;
> >...
2016 Apr 17
1
[PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping
...s->size) & ~PAGE_MASK;
so we don't need to supply it to this function, nor modify it there.
which can save ~40 instructions on my system. does this sound silly?
-ss
> + cursor = first_page;
> + nr_page = offset >> PAGE_SHIFT;
>
> - obj = page_to_pfn(page) << OBJ_INDEX_BITS;
> - obj |= ((obj_idx) & OBJ_INDEX_MASK);
> - obj <<= OBJ_TAG_BITS;
> + *offset_in_page = offset & ~PAGE_MASK;
> +
> + for (i = 0; i < nr_page; i++)
> + cursor = get_next_page(cursor);
>
> - return (void *)obj;
> + *obj_page = cursor;
> }
-ss
2016 Apr 17
1
[PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping
...s->size) & ~PAGE_MASK;
so we don't need to supply it to this function, nor modify it there.
which can save ~40 instructions on my system. does this sound silly?
-ss
> + cursor = first_page;
> + nr_page = offset >> PAGE_SHIFT;
>
> - obj = page_to_pfn(page) << OBJ_INDEX_BITS;
> - obj |= ((obj_idx) & OBJ_INDEX_MASK);
> - obj <<= OBJ_TAG_BITS;
> + *offset_in_page = offset & ~PAGE_MASK;
> +
> + for (i = 0; i < nr_page; i++)
> + cursor = get_next_page(cursor);
>
> - return (void *)obj;
> + *obj_page = cursor;
> }
-ss
2016 Mar 17
1
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...>> - 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;
>>> - obj |= ((obj_idx) & OBJ_INDEX_MASK);
>>> - obj <<= OBJ_TAG_BITS;
>>> + *ofs_in_page = ofs & ~PAGE_MASK;
>>> +
>>> + for (i = 0; i < nr_page; i++)
>>> + cursor = get_next_page(cursor);
>>>
>>> - return (...
2016 Mar 17
1
[PATCH v1 11/19] zsmalloc: squeeze freelist into page->mapping
...>> - 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;
>>> - obj |= ((obj_idx) & OBJ_INDEX_MASK);
>>> - obj <<= OBJ_TAG_BITS;
>>> + *ofs_in_page = ofs & ~PAGE_MASK;
>>> +
>>> + for (i = 0; i < nr_page; i++)
>>> + cursor = get_next_page(cursor);
>>>
>>> - return (...
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 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 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.