search for: page_cache_release

Displaying 20 results from an estimated 68 matches for "page_cache_release".

2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...an offset of 2 (page cache reference + additional reference from filemap_nopage). That removes the state transitions on the minor fault path. A page that has been mapped will eventually be unmapped again. On the unmap path each page that has been removed from the page table is freed with a call to page_cache_release. In general that causes an unnecessary page state transition from volatile to volatile. Not what we want. To get rid of these state transitions as well special variants of put_page_testzero/ page_cache_release are introduced that do not attempt to make the page volatile. page_cache_release_nocheck...
2007 Apr 18
0
[patch 7/9] Guest page hinting: minor fault optimization.
...an offset of 2 (page cache reference + additional reference from filemap_nopage). That removes the state transitions on the minor fault path. A page that has been mapped will eventually be unmapped again. On the unmap path each page that has been removed from the page table is freed with a call to page_cache_release. In general that causes an unnecessary page state transition from volatile to volatile. Not what we want. To get rid of these state transitions as well special variants of put_page_testzero/ page_cache_release are introduced that do not attempt to make the page volatile. page_cache_release_nocheck...
2001 Nov 06
2
2.2.14 integration with lvs
...Tue Nov 6 10:17:55 2001 @@ -218,14 +218,16 @@ static int lo_send(struct loop_device *l index++; pos += size; UnlockPage(page); - deactivate_page(page); + /* deactivate_page(page); + */ page_cache_release(page); } return 0; unlock: UnlockPage(page); - deactivate_page(page); + /*deactivate_page(page); + */ page_cache_release(page); fail: return -1; and --- fs/buffer.c.orig Tue Oct 30 11:15:43 2001 +++ fs/buffer.c Tue Oct 30 11:03:31 20...
2010 Jul 13
0
[PATCH 1/2] btrfs: restructure try_release_extent_buffer()
...r *eb, + unsigned long start_idx) +{ + unsigned long index; + struct page *page; + + if (!eb->first_page) + return; + + index = num_extent_pages(eb->start, eb->len); + if (start_idx >= index) + return; + + do { + index--; + page = extent_buffer_page(eb, index); + if (page) + page_cache_release(page); + } while (index != start_idx); +} + +/* + * Helper for releasing the extent buffer. + */ +static inline void btrfs_release_extent_buffer(struct extent_buffer *eb) +{ + btrfs_release_extent_buffer_page(eb, 0); + __free_extent_buffer(eb); +} + struct extent_buffer *alloc_extent_buffer(struc...
2013 Oct 09
2
[PATCH] Btrfs: add tests for find_lock_delalloc_range
...min_t(unsigned long, nr_pages, + ARRAY_SIZE(pages)), pages); + for (i = 0; i < ret; i++) { + if (flags & PROCESS_TEST_LOCKED && + !PageLocked(pages[i])) + count++; + if (flags & PROCESS_UNLOCK && PageLocked(pages[i])) + unlock_page(pages[i]); + page_cache_release(pages[i]); + if (flags & PROCESS_RELEASE) + page_cache_release(pages[i]); + } + nr_pages -= ret; + index += ret; + cond_resched(); + loops++; + if (loops > 100000) { + printk(KERN_ERR "stuck in a loop, start %Lu, end %Lu, nr_pages %lu, ret %d\n", start, end, nr_pages,...
2007 Jun 28
6
[patch 0/6] resend: guest page hinting version 5.
Greetings, after Carsten pitched CMM2 on the kvm mini summit here is a repost of version 5 of the guest page hinting patches. The code is still the same but has been adapted to the latest git level. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
2007 Jun 28
6
[patch 0/6] resend: guest page hinting version 5.
Greetings, after Carsten pitched CMM2 on the kvm mini summit here is a repost of version 5 of the guest page hinting patches. The code is still the same but has been adapted to the latest git level. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.
2007 May 11
6
[patch 0/6] [rfc] guest page hinting version 5
After way to many months here is the fifth version of the guest page hinting patches. Compared to version four a few improvements have been added: - Avoid page_host_discards() calls outside of page-states.h - The discard list is now implemented via the page_free_discarded hook and architecture specific code. - PG_state_change page flag has been replaced with architecture specficic
2007 May 11
6
[patch 0/6] [rfc] guest page hinting version 5
After way to many months here is the fifth version of the guest page hinting patches. Compared to version four a few improvements have been added: - Avoid page_host_discards() calls outside of page-states.h - The discard list is now implemented via the page_free_discarded hook and architecture specific code. - PG_state_change page flag has been replaced with architecture specficic
2012 Jul 10
6
[PATCH RFC] Btrfs: improve multi-thread buffer read
...NULL; for (page_idx = 0; page_idx < nr_pages; page_idx++) { struct page *page = list_entry(pages->prev, struct page, lru); prefetchw(&page->flags); list_del(&page->lru); + + if (!pagelst) + pagelst = kmalloc(sizeof(*pagelst), GFP_NOFS); + + if (!pagelst) { + page_cache_release(page); + continue; + } if (!add_to_page_cache_lru(page, mapping, page->index, GFP_NOFS)) { - __extent_read_full_page(tree, page, get_extent, - &bio, 0, &bio_flags); + pagelst->page = page; + list_add(&pagelst->lst, &page_pool); + page_cache_get(page...
2012 Jan 25
3
[PATCH] Btrfs: Check for NULL page in extent_range_uptodate
...ent_io.c +++ b/fs/btrfs/extent_io.c @@ -3909,6 +3909,8 @@ int extent_range_uptodate(struct extent_io_tree *tree, while (start <= end) { index = start >> PAGE_CACHE_SHIFT; page = find_get_page(tree->mapping, index); + if (!page) + return 1; uptodate = PageUptodate(page); page_cache_release(page); if (!uptodate) { -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2007 Apr 18
2
[patch 4/9] Guest page hinting: volatile swap cache.
...(&mapping->tree_lock); - __put_page(page); + if (PageSwapCache(page)) { + swp_entry_t entry = { .val = page_private(page) }; + write_lock_irq(&swapper_space.tree_lock); + __delete_from_swap_cache_nocheck(page); + write_unlock_irq(&swapper_space.tree_lock); + swap_free(entry); + page_cache_release(page); + } else { + write_lock_irq(&mapping->tree_lock); + __remove_from_page_cache_nocheck(page); + write_unlock_irq(&mapping->tree_lock); + __put_page(page); + } } /** diff -urpN linux-2.6/mm/rmap.c linux-2.6-patched/mm/rmap.c --- linux-2.6/mm/rmap.c 2006-09-01 12:50:23.000...
2007 Apr 18
2
[patch 4/9] Guest page hinting: volatile swap cache.
...(&mapping->tree_lock); - __put_page(page); + if (PageSwapCache(page)) { + swp_entry_t entry = { .val = page_private(page) }; + write_lock_irq(&swapper_space.tree_lock); + __delete_from_swap_cache_nocheck(page); + write_unlock_irq(&swapper_space.tree_lock); + swap_free(entry); + page_cache_release(page); + } else { + write_lock_irq(&mapping->tree_lock); + __remove_from_page_cache_nocheck(page); + write_unlock_irq(&mapping->tree_lock); + __put_page(page); + } } /** diff -urpN linux-2.6/mm/rmap.c linux-2.6-patched/mm/rmap.c --- linux-2.6/mm/rmap.c 2006-09-01 12:50:23.000...
2007 Apr 18
4
[patch 3/9] Guest page hinting: volatile page cache.
...ched/fs/buffer.c --- linux-2.6/fs/buffer.c 2006-09-01 12:49:30.000000000 +0200 +++ linux-2.6-patched/fs/buffer.c 2006-09-01 12:49:36.000000000 +0200 @@ -105,6 +105,7 @@ __clear_page_buffers(struct page *page) { ClearPagePrivate(page); set_page_private(page, 0); + page_make_volatile(page, 2); page_cache_release(page); } diff -urpN linux-2.6/include/linux/mm.h linux-2.6-patched/include/linux/mm.h --- linux-2.6/include/linux/mm.h 2006-09-01 12:49:36.000000000 +0200 +++ linux-2.6-patched/include/linux/mm.h 2006-09-01 12:49:36.000000000 +0200 @@ -308,11 +308,17 @@ struct page { /* * Drop a ref, return...
2007 Apr 18
4
[patch 3/9] Guest page hinting: volatile page cache.
...ched/fs/buffer.c --- linux-2.6/fs/buffer.c 2006-09-01 12:49:30.000000000 +0200 +++ linux-2.6-patched/fs/buffer.c 2006-09-01 12:49:36.000000000 +0200 @@ -105,6 +105,7 @@ __clear_page_buffers(struct page *page) { ClearPagePrivate(page); set_page_private(page, 0); + page_make_volatile(page, 2); page_cache_release(page); } diff -urpN linux-2.6/include/linux/mm.h linux-2.6-patched/include/linux/mm.h --- linux-2.6/include/linux/mm.h 2006-09-01 12:49:36.000000000 +0200 +++ linux-2.6-patched/include/linux/mm.h 2006-09-01 12:49:36.000000000 +0200 @@ -308,11 +308,17 @@ struct page { /* * Drop a ref, return...
2010 Apr 26
0
[PATCH V2 11/12] Btrfs: Pre-allocate space for data relocation
...i_mapping, index); if (!page) { + btrfs_delalloc_release_metadata(inode, + PAGE_CACHE_SIZE); ret = -ENOMEM; - goto out_unlock; + goto out; } } @@ -2639,8 +2687,10 @@ static int relocate_file_extent_cluster( if (!PageUptodate(page)) { unlock_page(page); page_cache_release(page); + btrfs_delalloc_release_metadata(inode, + PAGE_CACHE_SIZE); ret = -EIO; - goto out_unlock; + goto out; } } @@ -2659,10 +2709,9 @@ static int relocate_file_extent_cluster( EXTENT_BOUNDARY, GFP_NOFS); nr++; } - btrfs_set_extent_delalloc(inode, page_s...
2010 Jul 16
1
[PATCH] ocfs2: make __ocfs2_page_mkwrite handle file end properly.
__ocfs2_page_mkwrite now is broken in handling file end. 1. the last page should be the page contains i_size - 1. 2. the len in the last page is also calculated wrong. So change them accordingly. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/mmap.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index
2007 Apr 18
1
[patch 5/9] Guest page hinting: mlocked pages.
...while (rlen > 0) { + struct page *page_refs[32]; + int chunk, cret, i; + + chunk = rlen < 32 ? rlen : 32; + cret = get_user_pages(current, current->mm, addr, + chunk, write, 0, + page_refs, NULL); + if (cret > 0) { + for (i = 0; i < cret; i++) + page_cache_release(page_refs[i]); + ret += cret; + } + if (cret < chunk) + return ret ? : cret; + addr += 32*PAGE_SIZE; + rlen -= 32; + } + return ret == len ? 0 : -1; + } + ret = get_user_pages(current, current->mm, addr, len, write, 0, NULL, NULL); if (ret < 0) diff -urpN linux-2.6/...
2007 Apr 18
1
[patch 5/9] Guest page hinting: mlocked pages.
...while (rlen > 0) { + struct page *page_refs[32]; + int chunk, cret, i; + + chunk = rlen < 32 ? rlen : 32; + cret = get_user_pages(current, current->mm, addr, + chunk, write, 0, + page_refs, NULL); + if (cret > 0) { + for (i = 0; i < cret; i++) + page_cache_release(page_refs[i]); + ret += cret; + } + if (cret < chunk) + return ret ? : cret; + addr += 32*PAGE_SIZE; + rlen -= 32; + } + return ret == len ? 0 : -1; + } + ret = get_user_pages(current, current->mm, addr, len, write, 0, NULL, NULL); if (ret < 0) diff -urpN linux-2.6/...
2013 Oct 25
1
[PATCH] Btrfs: stop using vfs_read in send
...unsigned, len, PAGE_CACHE_SIZE); + + page = find_or_create_page(inode->i_mapping, index, GFP_NOFS); + if (!page) { + ret = -ENOMEM; + break; + } + + if (!PageUptodate(page)) { + btrfs_readpage(NULL, page); + lock_page(page); + if (!PageUptodate(page)) { + unlock_page(page); + page_cache_release(page); + ret = -EIO; + break; + } + } + + addr = kmap(page); + memcpy(sctx->read_buf + ret, addr + pg_offset, cur_len); + kunmap(page); + unlock_page(page); + page_cache_release(page); + index++; + pg_offset = 0; + len -= cur_len; + ret += cur_len; + } +out: + iput(inode); + re...