search for: tree_lock

Displaying 20 results from an estimated 34 matches for "tree_lock".

2007 Apr 18
2
[patch 4/9] Guest page hinting: volatile swap cache.
...e_page(struct address_space *m return !! radix_tree_lookup(&mapping->page_tree, offset); } +#if defined(CONFIG_PAGE_STATES) + +struct page * find_get_page_nodiscard(struct address_space *mapping, + unsigned long offset) +{ + struct page *page; + + read_lock_irq(&mapping->tree_lock); + page = radix_tree_lookup(&mapping->page_tree, offset); + if (page) + page_cache_get(page); + read_unlock_irq(&mapping->tree_lock); + return page; +} + +EXPORT_SYMBOL(find_get_page_nodiscard); + +#endif + /* * Here we just do not bother to grab the page, it's meaningless an...
2007 Apr 18
2
[patch 4/9] Guest page hinting: volatile swap cache.
...e_page(struct address_space *m return !! radix_tree_lookup(&mapping->page_tree, offset); } +#if defined(CONFIG_PAGE_STATES) + +struct page * find_get_page_nodiscard(struct address_space *mapping, + unsigned long offset) +{ + struct page *page; + + read_lock_irq(&mapping->tree_lock); + page = radix_tree_lookup(&mapping->page_tree, offset); + if (page) + page_cache_get(page); + read_unlock_irq(&mapping->tree_lock); + return page; +} + +EXPORT_SYMBOL(find_get_page_nodiscard); + +#endif + /* * Here we just do not bother to grab the page, it's meaningless an...
2011 Mar 31
4
[PATCH] Btrfs: fix free space cache when there are pinned extents and clusters
...fs_fs_info *fs_info, u64 num_entries; u64 num_bitmaps; u64 generation; + u64 used = btrfs_block_group_used(&block_group->item); u32 cur_crc = ~(u32)0; pgoff_t index = 0; unsigned long first_page_offset; @@ -467,6 +469,17 @@ next: index++; } + spin_lock(&block_group->tree_lock); + if (btrfs_block_group_free_space(block_group) != + (block_group->key.offset - used - block_group->bytes_super)) { + spin_unlock(&block_group->tree_lock); + printk(KERN_ERR "block group %llu has an wrong amount of free " + "space\n", block_group-&gt...
2007 Apr 18
4
[patch 3/9] Guest page hinting: volatile page cache.
...6-09-01 12:49:33.000000000 +0200 +++ linux-2.6-patched/mm/filemap.c 2006-09-01 12:49:36.000000000 +0200 @@ -118,7 +118,7 @@ extern u32 readahead_debug_level; * sure the page is locked and that nobody else uses it - or that usage * is safe. The caller must hold a write_lock on the mapping's tree_lock. */ -void __remove_from_page_cache(struct page *page) +void inline __remove_from_page_cache_nocheck(struct page *page) { struct address_space *mapping = page->mapping; @@ -127,6 +127,28 @@ void __remove_from_page_cache(struct pag mapping->nrpages--; __dec_zone_page_state(page, NR_F...
2007 Apr 18
4
[patch 3/9] Guest page hinting: volatile page cache.
...6-09-01 12:49:33.000000000 +0200 +++ linux-2.6-patched/mm/filemap.c 2006-09-01 12:49:36.000000000 +0200 @@ -118,7 +118,7 @@ extern u32 readahead_debug_level; * sure the page is locked and that nobody else uses it - or that usage * is safe. The caller must hold a write_lock on the mapping's tree_lock. */ -void __remove_from_page_cache(struct page *page) +void inline __remove_from_page_cache_nocheck(struct page *page) { struct address_space *mapping = page->mapping; @@ -127,6 +127,28 @@ void __remove_from_page_cache(struct pag mapping->nrpages--; __dec_zone_page_state(page, NR_F...
2012 Jan 11
12
[PATCH 00/11] Btrfs: some patches for 3.3
The biggest one is a fix for fstrim, and there''s a fix for on-disk free space cache. Others are small fixes and cleanups. The last three have been sent weeks ago. The patchset is also available in this repo: git://repo.or.cz/linux-btrfs-devel.git for-chris Note there''s a small confict with Al Viro''s vfs changes. Li Zefan (11): Btrfs: add pinned extents to
2013 Mar 15
0
[PATCH] Btrfs: add some free space cache tests
...there is free space in the + * range at all we will return 1. + */ +static int check_exists(struct btrfs_block_group_cache *cache, u64 offset, + u64 bytes) +{ + struct btrfs_free_space_ctl *ctl = cache->free_space_ctl; + struct btrfs_free_space *info; + int ret = 0; + + spin_lock(&ctl->tree_lock); + info = tree_search_offset(ctl, offset, 0, 0); + if (!info) { + info = tree_search_offset(ctl, offset_to_bitmap(ctl, offset), + 1, 0); + if (!info) + goto out; + } + +have_info: + if (info->bitmap) { + u64 bit_off, bit_bytes; + struct rb_node *n; + struct btrfs_free_space *tmp; +...
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 Nov 07
8
[PATCH v11 0/7] make balloon pages movable by compaction
Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number of transparent huge pages that could be used by the guest workload. This patch-set follows the main idea discussed at 2012 LSFMMS session: "Ballooning for transparent huge
2012 Nov 07
8
[PATCH v11 0/7] make balloon pages movable by compaction
Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number of transparent huge pages that could be used by the guest workload. This patch-set follows the main idea discussed at 2012 LSFMMS session: "Ballooning for transparent huge
2012 Nov 11
8
[PATCH v12 0/7] make balloon pages movable by compaction
Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number of transparent huge pages that could be used by the guest workload. This patch-set follows the main idea discussed at 2012 LSFMMS session: "Ballooning for transparent huge
2012 Nov 11
8
[PATCH v12 0/7] make balloon pages movable by compaction
Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number of transparent huge pages that could be used by the guest workload. This patch-set follows the main idea discussed at 2012 LSFMMS session: "Ballooning for transparent huge
2011 Dec 28
13
fstrim on BTRFS
Hi! With 3.2-rc4 (probably earlier), Ext4 seems to remember what areas it trimmed: merkaba:~> fstrim -v /boot /boot: 224657408 bytes were trimmed merkaba:~> fstrim -v /boot /boot: 0 bytes were trimmed But BTRFS does not: merkaba:~> fstrim -v / /: 4431613952 bytes were trimmed merkaba:~> fstrim -v / /: 4341846016 bytes were trimmed Is it planned to add this feature to BTRFS
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...n ret; diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 6377713..85bbac9 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -2462,20 +2462,13 @@ int btrfs_trim_block_group(struct btrfs_block_group_cache *block_group, spin_unlock(&ctl->tree_lock); if (bytes >= minlen) { - int update_ret; - update_ret = btrfs_update_reserved_bytes(block_group, - bytes, 1, 1); - ret = btrfs_error_discard_extent(fs_info->extent_root, + block_group, start, bytes, &actually_trimmed); btrfs_a...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...n ret; diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 6377713..85bbac9 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -2462,20 +2462,13 @@ int btrfs_trim_block_group(struct btrfs_block_group_cache *block_group, spin_unlock(&ctl->tree_lock); if (bytes >= minlen) { - int update_ret; - update_ret = btrfs_update_reserved_bytes(block_group, - bytes, 1, 1); - ret = btrfs_error_discard_extent(fs_info->extent_root, + block_group, start, bytes, &actually_trimmed); btrfs_a...
2012 Jun 25
5
[PATCH 0/4] make balloon pages movable by compaction
This patchset follows the main idea discussed at 2012 LSFMMS section: "Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/ to introduce the required changes to the virtio_balloon driver, as well as changes to the core compaction & migration bits, in order to allow memory balloon pages become movable within a guest. Rafael Aquini (4): mm: introduce compaction
2012 Jun 25
5
[PATCH 0/4] make balloon pages movable by compaction
This patchset follows the main idea discussed at 2012 LSFMMS section: "Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/ to introduce the required changes to the virtio_balloon driver, as well as changes to the core compaction & migration bits, in order to allow memory balloon pages become movable within a guest. Rafael Aquini (4): mm: introduce compaction