search for: page_num

Displaying 20 results from an estimated 30 matches for "page_num".

2016 Jul 27
4
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
On 07/26/2016 06:23 PM, Liang Li wrote: > + for_each_migratetype_order(order, t) { > + list_for_each(curr, &zone->free_area[order].free_list[t]) { > + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > + if (pfn >= start_pfn && pfn <= end_pfn) { > + page_num = 1UL << order; > + if (pfn + page_num > end_pfn) > + page_num = end_pfn - pfn; > + bitmap_set(bitmap, pfn - start_pfn, page_num); > + } > + } > + } Nit: The 'page_num' nomenclature really confused me here. It is the number of bits being set in the...
2016 Jul 27
4
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
On 07/26/2016 06:23 PM, Liang Li wrote: > + for_each_migratetype_order(order, t) { > + list_for_each(curr, &zone->free_area[order].free_list[t]) { > + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > + if (pfn >= start_pfn && pfn <= end_pfn) { > + page_num = 1UL << order; > + if (pfn + page_num > end_pfn) > + page_num = end_pfn - pfn; > + bitmap_set(bitmap, pfn - start_pfn, page_num); > + } > + } > + } Nit: The 'page_num' nomenclature really confused me here. It is the number of bits being set in the...
2016 Jul 27
2
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...>>> + for_each_migratetype_order(order, t) { >>> + list_for_each(curr, &zone->free_area[order].free_list[t]) { >>> + pfn = page_to_pfn(list_entry(curr, struct page, lru)); >>> + if (pfn >= start_pfn && pfn <= end_pfn) { >>> + page_num = 1UL << order; >>> + if (pfn + page_num > end_pfn) >>> + page_num = end_pfn - pfn; >>> + bitmap_set(bitmap, pfn - start_pfn, page_num); >>> + } >>> + } >>> + } >> >> Nit: The 'page_num' nomenclature re...
2016 Jul 27
2
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...>>> + for_each_migratetype_order(order, t) { >>> + list_for_each(curr, &zone->free_area[order].free_list[t]) { >>> + pfn = page_to_pfn(list_entry(curr, struct page, lru)); >>> + if (pfn >= start_pfn && pfn <= end_pfn) { >>> + page_num = 1UL << order; >>> + if (pfn + page_num > end_pfn) >>> + page_num = end_pfn - pfn; >>> + bitmap_set(bitmap, pfn - start_pfn, page_num); >>> + } >>> + } >>> + } >> >> Nit: The 'page_num' nomenclature re...
2005 Dec 02
4
How to get the count of matching documents
I''m trying to generate a rails pagination helper for some ferret search results, and I need to know how many total matches there are to my search query. I don''t see an obvious way of finding this. Any help would be appreciated. Thanks, Carl Youngblood
2016 Jul 27
0
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...iang Li wrote: > > + for_each_migratetype_order(order, t) { > > + list_for_each(curr, &zone->free_area[order].free_list[t]) { > > + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > > + if (pfn >= start_pfn && pfn <= end_pfn) { > > + page_num = 1UL << order; > > + if (pfn + page_num > end_pfn) > > + page_num = end_pfn - pfn; > > + bitmap_set(bitmap, pfn - start_pfn, page_num); > > + } > > + } > > + } > > Nit: The 'page_num' nomenclature really confused me here. I...
2016 Jul 27
0
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...ge_alloc.c +++ b/mm/page_alloc.c @@ -4523,6 +4523,52 @@ unsigned long get_max_pfn(void) } EXPORT_SYMBOL(get_max_pfn); +static void mark_free_pages_bitmap(struct zone *zone, unsigned long start_pfn, + unsigned long end_pfn, unsigned long *bitmap, unsigned long len) +{ + unsigned long pfn, flags, page_num; + unsigned int order, t; + struct list_head *curr; + + if (zone_is_empty(zone)) + return; + end_pfn = min(start_pfn + len, end_pfn); + spin_lock_irqsave(&zone->lock, flags); + + for_each_migratetype_order(order, t) { + list_for_each(curr, &zone->free_area[order].free_list[t]) { +...
2016 Jul 28
0
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...iang Li wrote: > > + for_each_migratetype_order(order, t) { > > + list_for_each(curr, &zone->free_area[order].free_list[t]) { > > + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > > + if (pfn >= start_pfn && pfn <= end_pfn) { > > + page_num = 1UL << order; > > + if (pfn + page_num > end_pfn) > > + page_num = end_pfn - pfn; > > + bitmap_set(bitmap, pfn - start_pfn, > page_num); > > + } > > + } > > + } > > Nit: The 'page_num' nomenclature really confused me her...
2016 Jul 28
0
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...ach_migratetype_order(order, t) { > >>> + list_for_each(curr, &zone->free_area[order].free_list[t]) { > >>> + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > >>> + if (pfn >= start_pfn && pfn <= end_pfn) { > >>> + page_num = 1UL << order; > >>> + if (pfn + page_num > end_pfn) > >>> + page_num = end_pfn - pfn; > >>> + bitmap_set(bitmap, pfn - start_pfn, > page_num); > >>> + } > >>> + } > >>> + } > >> > >>...
2016 Jul 27
1
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...-4523,6 +4523,52 @@ unsigned long get_max_pfn(void) > } > EXPORT_SYMBOL(get_max_pfn); > > +static void mark_free_pages_bitmap(struct zone *zone, unsigned long start_pfn, > + unsigned long end_pfn, unsigned long *bitmap, unsigned long len) > +{ > + unsigned long pfn, flags, page_num; > + unsigned int order, t; > + struct list_head *curr; > + > + if (zone_is_empty(zone)) > + return; > + end_pfn = min(start_pfn + len, end_pfn); > + spin_lock_irqsave(&zone->lock, flags); > + > + for_each_migratetype_order(order, t) { Why not do each order separ...
2016 Jul 27
1
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...-4523,6 +4523,52 @@ unsigned long get_max_pfn(void) > } > EXPORT_SYMBOL(get_max_pfn); > > +static void mark_free_pages_bitmap(struct zone *zone, unsigned long start_pfn, > + unsigned long end_pfn, unsigned long *bitmap, unsigned long len) > +{ > + unsigned long pfn, flags, page_num; > + unsigned int order, t; > + struct list_head *curr; > + > + if (zone_is_empty(zone)) > + return; > + end_pfn = min(start_pfn + len, end_pfn); > + spin_lock_irqsave(&zone->lock, flags); > + > + for_each_migratetype_order(order, t) { Why not do each order separ...
2016 Jul 27
0
[PATCH v2 repost 6/7] mm: add the related functions to get free page info
...ach_migratetype_order(order, t) { > >>> + list_for_each(curr, &zone->free_area[order].free_list[t]) { > >>> + pfn = page_to_pfn(list_entry(curr, struct page, lru)); > >>> + if (pfn >= start_pfn && pfn <= end_pfn) { > >>> + page_num = 1UL << order; > >>> + if (pfn + page_num > end_pfn) > >>> + page_num = end_pfn - pfn; > >>> + bitmap_set(bitmap, pfn - start_pfn, page_num); > >>> + } > >>> + } > >>> + } > >> > >> Nit:...
2005 Nov 26
3
Get number of found documents
...100". Rather usual situation. But to create this links I need to know how many documents Ferret found in index. For now I am doing it with following code index = FerretConfig::INDEX index_size = index.search(query).size @document_pages = Paginator.new self, index_size, PAGE_SIZE, page_num But I am not sure that statement index.search(query).size will be effective here. Because it returns an array of found documents. What if such documents will be 100000?? I don''t want to select all this documents, just to know how many found, and then select for example 10 of them ind...
2007 Oct 09
5
Playing with ReadFileScatter()
Hi all, Looking at the IO.readlines source in io.c, it looks to me like they grab 8k chunks, split on the input record separator, and buffer accordingly. Since it looks like ReadFileScatter() does some of that work automatically (in page file sized chunks), I thought I''d give it a try. Here''s what I''ve got, but it doesn''t work. I have an incorrect parameter
2016 Jul 27
14
[PATCH v2 repost 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patchset is for kernel and contains two parts of change to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by
2016 Jul 27
14
[PATCH v2 repost 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patchset is for kernel and contains two parts of change to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by
2012 May 03
1
[PATCH] Btrfs: fix crash in scrub repair code when device is missing
...bdev is NULL */ page->bdev = bbio->stripes[mirror_index].dev->bdev; page->mirror_num = mirror_index + 1; page->page = alloc_page(GFP_NOFS); @@ -1042,6 +1043,12 @@ static int scrub_recheck_block(struct btrfs_fs_info *fs_info, struct scrub_page *page = sblock->pagev + page_num; DECLARE_COMPLETION_ONSTACK(complete); + if (page->bdev == NULL) { + page->io_error = 1; + sblock->no_io_error_seen = 0; + continue; + } + BUG_ON(!page->page); bio = bio_alloc(GFP_NOFS, 1); if (!bio) -- 1.7.10.1.362.g242cab3 -- To unsubscribe from this list: send...
2016 Jun 29
11
[PATCH v2 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2016 Jun 29
11
[PATCH v2 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2012 Nov 22
0
[resend PATCH] drm/nouveau: unpin buffers before releasing to prevent lockdep warnings
...;gem->export_dma_buf == dma_buf) nvbo->gem->export_dma_buf = NULL; - drm_gem_object_unreference_unlocked(nvbo->gem); - } + + nouveau_bo_unpin(nvbo); + drm_gem_object_unreference_unlocked(nvbo->gem); } static void *nouveau_gem_kmap_atomic(struct dma_buf *dma_buf, unsigned long page_num) @@ -175,13 +176,17 @@ struct dma_buf *nouveau_gem_prime_export(struct drm_device *dev, { struct nouveau_bo *nvbo = nouveau_gem_object(obj); int ret = 0; + struct dma_buf *buf; /* pin buffer into GTT */ ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_TT); if (ret) return ERR_PTR(-EINVAL);...