search for: pagecompound

Displaying 20 results from an estimated 32 matches for "pagecompound".

2010 May 19
1
Re: Re: Xen-4 PVUSB kernel bug / Xenlinux 2.6.32
...of > slub.c). The corresponding register/stack dump from the SLAB case would certainly be interesting. Also, since your kernel may be arbitrarily patched from the original 2.6.32, it would be helpful if you could confirm that the line you get reported is in fact referring to BUG_ON(!PageCompound(page)); in slub.c''s kfree(). > Do you have any hints regarding this issue, do I perhaps miss some USB > related modules or similar? Missing modules cannot be the issue here, it must be something wrong within the USB backend that causes this misbehavior. Is your Dom0 kernel a pv...
2010 May 19
1
Re: Re: Xen-4 PVUSB kernel bug / Xenlinux 2.6.32
...of > slub.c). The corresponding register/stack dump from the SLAB case would certainly be interesting. Also, since your kernel may be arbitrarily patched from the original 2.6.32, it would be helpful if you could confirm that the line you get reported is in fact referring to BUG_ON(!PageCompound(page)); in slub.c''s kfree(). > Do you have any hints regarding this issue, do I perhaps miss some USB > related modules or similar? Missing modules cannot be the issue here, it must be something wrong within the USB backend that causes this misbehavior. Is your Dom0 kernel a pv...
2019 Jul 24
1
[PATCH 03/12] block: bio_release_pages: use flags arg instead of bool
...) +void bio_release_pages(struct bio *bio, enum bio_rp_flags_t flags) { struct bvec_iter_all iter_all; struct bio_vec *bvec; @@ -842,7 +842,7 @@ void bio_release_pages(struct bio *bio, bool mark_dirty) return; bio_for_each_segment_all(bvec, bio, iter_all) { - if (mark_dirty && !PageCompound(bvec->bv_page)) + if ((flags & BIO_RP_MARK_DIRTY) && !PageCompound(bvec->bv_page)) set_page_dirty_lock(bvec->bv_page); put_page(bvec->bv_page); } @@ -1421,7 +1421,7 @@ struct bio *bio_map_user_iov(struct request_queue *q, return bio; out_unmap: - bio_release_...
2020 Sep 02
0
[PATCH v2 4/7] mm/thp: add prep_transhuge_device_private_page()
...evice_private_page(struct page *page) +{ + prep_compound_page(page, HPAGE_PMD_ORDER); + prep_transhuge_page(page); + percpu_ref_put_many(page->pgmap->ref, HPAGE_PMD_NR - 1); +} +EXPORT_SYMBOL_GPL(prep_transhuge_device_private_page); + bool is_transparent_hugepage(struct page *page) { if (!PageCompound(page)) -- 2.20.1
2020 Nov 06
0
[PATCH v3 1/6] mm/thp: add prep_transhuge_device_private_page()
...page(page, HPAGE_PMD_ORDER); + prep_transhuge_page(page); + /* Only the head page has a reference to the pgmap. */ + percpu_ref_put_many(page->pgmap->ref, HPAGE_PMD_NR - 1); +} +EXPORT_SYMBOL_GPL(prep_transhuge_device_private_page); + bool is_transparent_hugepage(struct page *page) { if (!PageCompound(page)) -- 2.20.1
2016 Apr 04
1
[PATCH v3 03/16] mm: add non-lru movable page support document
...iver's data structure like LRU > * and reset page's flags. And it should be atomic > * and always successful > */ > page->put(page); > __ClearPageMovable(page); > } else if (PageCompound(page)) > __put_compound_page(page); > else > __put_single_page(page); > > } > > I'd like to avoid add new branch for not popular job in put_page which is hot. > (Might change in future but not popular at the moment) > So, rul...
2016 Apr 04
1
[PATCH v3 03/16] mm: add non-lru movable page support document
...iver's data structure like LRU > * and reset page's flags. And it should be atomic > * and always successful > */ > page->put(page); > __ClearPageMovable(page); > } else if (PageCompound(page)) > __put_compound_page(page); > else > __put_single_page(page); > > } > > I'd like to avoid add new branch for not popular job in put_page which is hot. > (Might change in future but not popular at the moment) > So, rul...
2016 Apr 01
2
[PATCH v3 03/16] mm: add non-lru movable page support document
On 03/30/2016 09:12 AM, Minchan Kim wrote: > This patch describes what a subsystem should do for non-lru movable > page supporting. Intentionally reading this first without studying the code to better catch things that would seem obvious otherwise. > Cc: Jonathan Corbet <corbet at lwn.net> > Signed-off-by: Minchan Kim <minchan at kernel.org> > --- >
2016 Apr 01
2
[PATCH v3 03/16] mm: add non-lru movable page support document
On 03/30/2016 09:12 AM, Minchan Kim wrote: > This patch describes what a subsystem should do for non-lru movable > page supporting. Intentionally reading this first without studying the code to better catch things that would seem obvious otherwise. > Cc: Jonathan Corbet <corbet at lwn.net> > Signed-off-by: Minchan Kim <minchan at kernel.org> > --- >
2016 Apr 04
0
[PATCH v3 03/16] mm: add non-lru movable page support document
...* It will tity up driver's data structure like LRU * and reset page's flags. And it should be atomic * and always successful */ page->put(page); __ClearPageMovable(page); } else if (PageCompound(page)) __put_compound_page(page); else __put_single_page(page); } I'd like to avoid add new branch for not popular job in put_page which is hot. (Might change in future but not popular at the moment) So, rule of driver is as fo...
2019 Sep 19
0
[PATCH RFC v3 6/9] mm: Allow to offline PageOffline() pages with a reference count of 0
...) { + /* + * Memory devices allow to offline a page if it is + * marked PG_offline and has a reference count of 0. So if + * somebody puts a reference of such a page and the + * reference count drops to 0, don't return the page to the + * buddy. + */ + return; } if (unlikely(PageCompound(page))) -- 2.21.0
2020 Sep 25
0
[PATCH 2/2] mm: remove extra ZONE_DEVICE struct page refcount
...ing, and instead, expect a call to - * put_page_testzero(). - */ - if (page_is_devmap_managed(page)) { - put_devmap_managed_page(page); - continue; - } - } - - page = compound_head(page); - if (!put_page_testzero(page)) + free_zone_device_page(page); continue; + } if (PageCompound(page)) { if (locked_pgdat) { @@ -1151,26 +1142,3 @@ void __init swap_setup(void) * _really_ don't want to cluster much more */ } - -#ifdef CONFIG_DEV_PAGEMAP_OPS -void put_devmap_managed_page(struct page *page) -{ - int count; - - if (WARN_ON_ONCE(!page_is_devmap_managed(page))) - r...
2016 May 27
2
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
On 05/20/2016 04:23 PM, Minchan Kim wrote: > We have allowed migration for only LRU pages until now and it was > enough to make high-order pages. But recently, embedded system(e.g., > webOS, android) uses lots of non-movable pages(e.g., zram, GPU memory) > so we have seen several reports about troubles of small high-order > allocation. For fixing the problem, there were several
2016 May 27
2
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
On 05/20/2016 04:23 PM, Minchan Kim wrote: > We have allowed migration for only LRU pages until now and it was > enough to make high-order pages. But recently, embedded system(e.g., > webOS, android) uses lots of non-movable pages(e.g., zram, GPU memory) > so we have seen several reports about troubles of small high-order > allocation. For fixing the problem, there were several
2020 Jun 19
0
[PATCH 13/16] mm: support THP migration to device private memory
...0,14 +2461,6 @@ static bool migrate_vma_check_page(struct page *page) */ int extra = 1; - /* - * FIXME support THP (transparent huge page), it is bit more complex to - * check them than regular pages, because they can be mapped with a pmd - * or with a pte (split pte mapping). - */ - if (PageCompound(page)) - return false; - /* Page from ZONE_DEVICE have one extra reference */ if (is_zone_device_page(page)) { /* @@ -2726,13 +2759,115 @@ int migrate_vma_setup(struct migrate_vma *args) } EXPORT_SYMBOL(migrate_vma_setup); +#ifdef CONFIG_ARCH_ENABLE_THP_MIGRATION +/* + * This code close...
2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...d_page_nocheck(struct page *page) +{ + page = (struct page *)page_private(page); + if (put_page_testzero_nocheck(page)) { + void (*dtor)(struct page *page); + + dtor = (void (*)(struct page *))page[1].lru.next; + (*dtor)(page); + } +} + +void put_page_nocheck(struct page *page) +{ + if (unlikely(PageCompound(page))) + put_compound_page_nocheck(page); + else if (put_page_testzero_nocheck(page)) + __page_cache_release(page); +} +EXPORT_SYMBOL(put_page_nocheck); + +#endif + /* * Writeback is about to end against a page which has been marked for immediate * reclaim. If it still appears to be reclai...
2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...d_page_nocheck(struct page *page) +{ + page = (struct page *)page_private(page); + if (put_page_testzero_nocheck(page)) { + void (*dtor)(struct page *page); + + dtor = (void (*)(struct page *))page[1].lru.next; + (*dtor)(page); + } +} + +void put_page_nocheck(struct page *page) +{ + if (unlikely(PageCompound(page))) + put_compound_page_nocheck(page); + else if (put_page_testzero_nocheck(page)) + __page_cache_release(page); +} +EXPORT_SYMBOL(put_page_nocheck); + +#endif + /* * Writeback is about to end against a page which has been marked for immediate * reclaim. If it still appears to be reclai...
2020 Oct 01
0
[RFC PATCH v3 2/2] mm: remove extra ZONE_DEVICE struct page refcount
...require special - * processing, and instead, expect a call to - * put_page_testzero(). - */ - if (page_is_devmap_managed(page)) { - put_devmap_managed_page(page); - continue; - } - } - - if (!put_page_testzero(page)) + free_zone_device_page(page); continue; + } if (PageCompound(page)) { if (locked_pgdat) { @@ -1188,26 +1179,3 @@ void __init swap_setup(void) * _really_ don't want to cluster much more */ } - -#ifdef CONFIG_DEV_PAGEMAP_OPS -void put_devmap_managed_page(struct page *page) -{ - int count; - - if (WARN_ON_ONCE(!page_is_devmap_managed(page))) - r...
2013 Jul 09
20
[PATCH 1/1] xen/netback: correctly calculate required slots of skb.
...- if (start_new_rx_buffer(copy_off, bytes, 0)) { - count++; - copy_off = 0; - } + offset += bytes; + size -= bytes; - if (copy_off + bytes > MAX_BUFFER_OFFSET) - bytes = MAX_BUFFER_OFFSET - copy_off; + /* Next frame */ + if (offset == PAGE_SIZE && size) { + BUG_ON(!PageCompound(page)); + page++; + offset = 0; + } - copy_off += bytes; + if (*head) + *count = *count + 1; + *head = 0; /* There must be something in this buffer now. */ + } +} + +unsigned int xen_netbk_count_skb_slots(struct xenvif *vif, struct sk_buff *skb) +{ + int i, copy_off = 0; + int nr_frags...
2016 May 30
0
[PATCH v6 02/12] mm: migrate: support non-lru movable page migration
...gt; alias with compound_mapcount. That can easily have a value matching > PageMovable flags and we'll proceed and start inspecting the > compound head in page_mapping()... maybe it's not a big deal, or we > better check and skip PageTail first, must think about it more... I thouht PageCompound check right before isolate_movable_page in isolate_migratepages_block will filter it out mostly but yeah it is racy without zone->lru_lock so it could reach to isolate_movable_page. However, PageMovable check in there investigates mapping, mapping->a_ops, and a_ops->isolate_page to verify...