search for: virt_to_phys_hard

Displaying 2 results from an estimated 2 matches for "virt_to_phys_hard".

Did you mean: virt_to_phys_harder
2012 Oct 18
1
[PATCH] virtio: 9p: correctly pass physical address to userspace for high pages
...esc[head].flags = VRING_DESC_F_INDIRECT; > - vq->vring.desc[head].addr = virt_to_phys(desc); > + vq->vring.desc[head].addr = page_to_phys(kmap_to_page(desc)) + > + ((unsigned long)desc & ~PAGE_MASK); > vq->vring.desc[head].len = i * sizeof(struct vring_desc); Gah, virt_to_phys_harder()? What's the performance effect? If it's negligible, why doesn't virt_to_phys() just do this for us? We do have an alternate solution: masking out __GFP_HIGHMEM from the kmalloc of desc. If it fails, we will fall back to laying out the virtio request directly inside the ring; if...
2012 Oct 18
1
[PATCH] virtio: 9p: correctly pass physical address to userspace for high pages
...esc[head].flags = VRING_DESC_F_INDIRECT; > - vq->vring.desc[head].addr = virt_to_phys(desc); > + vq->vring.desc[head].addr = page_to_phys(kmap_to_page(desc)) + > + ((unsigned long)desc & ~PAGE_MASK); > vq->vring.desc[head].len = i * sizeof(struct vring_desc); Gah, virt_to_phys_harder()? What's the performance effect? If it's negligible, why doesn't virt_to_phys() just do this for us? We do have an alternate solution: masking out __GFP_HIGHMEM from the kmalloc of desc. If it fails, we will fall back to laying out the virtio request directly inside the ring; if...