search for: page_to_chunk

Displaying 9 results from an estimated 9 matches for "page_to_chunk".

2017 Mar 10
4
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
On Fri, Mar 10, 2017 at 07:37:28PM +0800, Wei Wang wrote: > On 03/09/2017 10:14 PM, Matthew Wilcox wrote: > > On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: > > > From: Liang Li <liang.z.li at intel.com> > > > 1) allocating pages (6.5%) > > > 2) sending PFNs to host (68.3%) > > > 3) address translation (6.1%) > > > 4) madvise
2017 Mar 10
4
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
On Fri, Mar 10, 2017 at 07:37:28PM +0800, Wei Wang wrote: > On 03/09/2017 10:14 PM, Matthew Wilcox wrote: > > On Fri, Mar 03, 2017 at 01:40:28PM +0800, Wei Wang wrote: > > > From: Liang Li <liang.z.li at intel.com> > > > 1) allocating pages (6.5%) > > > 2) sending PFNs to host (68.3%) > > > 3) address translation (6.1%) > > > 4) madvise
2017 Mar 10
4
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...bits 15-63 for PFN, page size 32k bits 0-3 set, bit 4 clear => bits 5-15 for page count, bits 16-63 for PFN, page size 64k That means we can always pass 2048 pages (of whatever page size) in a single chunk. And we support arbitrary power of two page sizes. I suggest something like this: u64 page_to_chunk(struct page *page) { u64 chunk = page_to_pfn(page) << PAGE_SHIFT; chunk |= (1UL << compound_order(page)) - 1; } (note this is a single page of order N, so we leave the page count bits set to 0, meaning one page). > Two things to consider: > - host should pass its base page siz...
2017 Mar 10
1
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...0-3 set, bit 4 clear => bits 5-15 for page count, bits 16-63 for PFN, page size 64k > > That means we can always pass 2048 pages (of whatever page size) in a single chunk. And > > we support arbitrary power of two page sizes. I suggest something like this: > > > > u64 page_to_chunk(struct page *page) > > { > > u64 chunk = page_to_pfn(page) << PAGE_SHIFT; > > chunk |= (1UL << compound_order(page)) - 1; > > } > > You need to fill in the size, do you not? I think I did ... (1UL << compound_order(page)) - 1 sets the bottom N bit...
2017 Mar 10
1
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...0-3 set, bit 4 clear => bits 5-15 for page count, bits 16-63 for PFN, page size 64k > > That means we can always pass 2048 pages (of whatever page size) in a single chunk. And > > we support arbitrary power of two page sizes. I suggest something like this: > > > > u64 page_to_chunk(struct page *page) > > { > > u64 chunk = page_to_pfn(page) << PAGE_SHIFT; > > chunk |= (1UL << compound_order(page)) - 1; > > } > > You need to fill in the size, do you not? I think I did ... (1UL << compound_order(page)) - 1 sets the bottom N bit...
2017 Mar 11
0
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...ze 32k > bits 0-3 set, bit 4 clear => bits 5-15 for page count, bits 16-63 for PFN, page size 64k > > That means we can always pass 2048 pages (of whatever page size) in a single chunk. And > we support arbitrary power of two page sizes. I suggest something like this: > > u64 page_to_chunk(struct page *page) > { > u64 chunk = page_to_pfn(page) << PAGE_SHIFT; > chunk |= (1UL << compound_order(page)) - 1; > } > > (note this is a single page of order N, so we leave the page count bits > set to 0, meaning one page). > I'm thinking what if the gu...
2017 Mar 10
0
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...ear => bits 5-15 for page count, bits 16-63 for PFN, page size 64k huge page sizes go up to gigabytes. > That means we can always pass 2048 pages (of whatever page size) in a single chunk. And > we support arbitrary power of two page sizes. I suggest something like this: > > u64 page_to_chunk(struct page *page) > { > u64 chunk = page_to_pfn(page) << PAGE_SHIFT; > chunk |= (1UL << compound_order(page)) - 1; > } > > (note this is a single page of order N, so we leave the page count bits > set to 0, meaning one page). > > > Two things to consid...
2017 Mar 12
0
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...r => bits 5-15 for page count, bits 16-63 for PFN, page size 64k > > > That means we can always pass 2048 pages (of whatever page size) in a single chunk. And > > > we support arbitrary power of two page sizes. I suggest something like this: > > > > > > u64 page_to_chunk(struct page *page) > > > { > > > u64 chunk = page_to_pfn(page) << PAGE_SHIFT; > > > chunk |= (1UL << compound_order(page)) - 1; > > > } > > > > You need to fill in the size, do you not? > > I think I did ... (1UL << compoun...
2017 Mar 10
0
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...e size 32k > bits 0-3 set, bit 4 clear => bits 5-15 for page count, bits 16-63 for PFN, page size 64k > That means we can always pass 2048 pages (of whatever page size) in a single chunk. And > we support arbitrary power of two page sizes. I suggest something like this: > > u64 page_to_chunk(struct page *page) > { > u64 chunk = page_to_pfn(page) << PAGE_SHIFT; > chunk |= (1UL << compound_order(page)) - 1; > } You need to fill in the size, do you not? > > (note this is a single page of order N, so we leave the page count bits > set to 0, meaning one...