search for: vring_add_indirect

Displaying 20 results from an estimated 107 matches for "vring_add_indirect".

2013 Oct 02
2
Kmemleak: false-positive in vring_add_indirect ?
Hello, I have been hunting a memory-leak warning in vring_add_indirect: unreferenced object 0xffff88003d467e20 (size 32): comm "softirq", pid 0, jiffies 4295197765 (age 6.364s) hex dump (first 32 bytes): 28 19 bf 3d 00 00 00 00 0c 00 00 00 01 00 01 00 (..=............ 02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00 ..Q<....V....... backtr...
2013 Oct 02
2
Kmemleak: false-positive in vring_add_indirect ?
Hello, I have been hunting a memory-leak warning in vring_add_indirect: unreferenced object 0xffff88003d467e20 (size 32): comm "softirq", pid 0, jiffies 4295197765 (age 6.364s) hex dump (first 32 bytes): 28 19 bf 3d 00 00 00 00 0c 00 00 00 01 00 01 00 (..=............ 02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00 ..Q<....V....... backtr...
2013 Oct 03
0
Kmemleak: false-positive in vring_add_indirect ?
Christoph Paasch <christoph.paasch at uclouvain.be> writes: > Hello, > > I have been hunting a memory-leak warning in vring_add_indirect: > > unreferenced object 0xffff88003d467e20 (size 32): > comm "softirq", pid 0, jiffies 4295197765 (age 6.364s) > hex dump (first 32 bytes): > 28 19 bf 3d 00 00 00 00 0c 00 00 00 01 00 01 00 (..=............ > 02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00...
2013 Oct 04
1
Kmemleak: false-positive in vring_add_indirect ?
...0 00 00 0c 00 00 00 01 00 01 00 (..=............ > 02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00 ..Q<....V....... > backtrace: > [<ffffffff8152db19>] kmemleak_alloc+0x59/0xc0 > [<ffffffff81102e93>] __kmalloc+0xf3/0x180 > [<ffffffff812db5d6>] vring_add_indirect+0x36/0x280 > [<ffffffff812dc59f>] virtqueue_add_outbuf+0xbf/0x4e0 > [<ffffffff813a8b30>] start_xmit+0x1a0/0x3b0 > [<ffffffff81445861>] dev_hard_start_xmit+0x2d1/0x4d0 > [<ffffffff81460052>] sch_direct_xmit+0xf2/0x1c0 > [<ffffffff81445c28...
2013 Oct 04
1
Kmemleak: false-positive in vring_add_indirect ?
...0 00 00 0c 00 00 00 01 00 01 00 (..=............ > 02 dc 51 3c 00 00 00 00 56 00 00 00 00 00 00 00 ..Q<....V....... > backtrace: > [<ffffffff8152db19>] kmemleak_alloc+0x59/0xc0 > [<ffffffff81102e93>] __kmalloc+0xf3/0x180 > [<ffffffff812db5d6>] vring_add_indirect+0x36/0x280 > [<ffffffff812dc59f>] virtqueue_add_outbuf+0xbf/0x4e0 > [<ffffffff813a8b30>] start_xmit+0x1a0/0x3b0 > [<ffffffff81445861>] dev_hard_start_xmit+0x2d1/0x4d0 > [<ffffffff81460052>] sch_direct_xmit+0xf2/0x1c0 > [<ffffffff81445c28...
2014 Aug 26
0
[PATCH 1/3] virtio_ring: Remove sg_next indirection
...nt *count) -{ - return sg_next(sg); -} - -static inline struct scatterlist *sg_next_arr(struct scatterlist *sg, - unsigned int *count) -{ - if (--(*count) == 0) - return NULL; - return sg + 1; -} - /* Set up an indirect table of descriptors and add it to the queue. */ static inline int vring_add_indirect(struct vring_virtqueue *vq, struct scatterlist *sgs[], - struct scatterlist *(*next) - (struct scatterlist *, unsigned int *), unsigned int total_sg, unsigned int total_out, unsigned int total_in, @@ -128,7 +112,7 @@ static inline int vring_...
2013 Jan 11
3
[PATCH] virtio: suppress kmemleak false positive
...ffffffff815b59b4>] mld_ifc_timer_expire+0x194/0x290 [<ffffffff8104b794>] call_timer_fn+0x74/0xf0 [<ffffffff8104bb1b>] run_timer_softirq+0x18b/0x220 [<ffffffff81045f81>] __do_softirq+0xe1/0x1c0 [<ffffffff8160a4fc>] call_softirq+0x1c/0x30 Seems the function vring_add_indirect stores an array of struct vring_desc by using virt_to_phys and kmemleak doesn't track the pointer. The following patch can fix this. Signed-off-by: Alexandru Copot <alex.mihai.c at gmail.com> CC: Daniel Baluta <dbaluta at ixiacom.com> --- drivers/virtio/virtio_ring.c | 2 ++ 1 fi...
2013 Jan 11
3
[PATCH] virtio: suppress kmemleak false positive
...ffffffff815b59b4>] mld_ifc_timer_expire+0x194/0x290 [<ffffffff8104b794>] call_timer_fn+0x74/0xf0 [<ffffffff8104bb1b>] run_timer_softirq+0x18b/0x220 [<ffffffff81045f81>] __do_softirq+0xe1/0x1c0 [<ffffffff8160a4fc>] call_softirq+0x1c/0x30 Seems the function vring_add_indirect stores an array of struct vring_desc by using virt_to_phys and kmemleak doesn't track the pointer. The following patch can fix this. Signed-off-by: Alexandru Copot <alex.mihai.c at gmail.com> CC: Daniel Baluta <dbaluta at ixiacom.com> --- drivers/virtio/virtio_ring.c | 2 ++ 1 fi...
2014 Sep 03
0
[PATCH 2/3] virtio_ring: assume sgs are always well-formed.
...nt *count) -{ - return sg_next(sg); -} - -static inline struct scatterlist *sg_next_arr(struct scatterlist *sg, - unsigned int *count) -{ - if (--(*count) == 0) - return NULL; - return sg + 1; -} - /* Set up an indirect table of descriptors and add it to the queue. */ static inline int vring_add_indirect(struct vring_virtqueue *vq, struct scatterlist *sgs[], - struct scatterlist *(*next) - (struct scatterlist *, unsigned int *), unsigned int total_sg, - unsigned int total_out, - unsigned int total_in, unsigned int out_sgs, un...
2014 Sep 03
8
[PATCH 0/3] virtio: simplify virtio_ring.
I resurrected these patches after prompting from Andy Lutomirski's recent patches. I put them on the back-burner because vring_bench had a 15% slowdown on my laptop: pktgen testing revealed a speedup, if anything, so I've cleaned them up. Rusty Russell (3): virtio_net: pass well-formed sgs to virtqueue_add_*() virtio_ring: assume sgs are always well-formed. virtio_ring: unify
2014 Sep 03
8
[PATCH 0/3] virtio: simplify virtio_ring.
I resurrected these patches after prompting from Andy Lutomirski's recent patches. I put them on the back-burner because vring_bench had a 15% slowdown on my laptop: pktgen testing revealed a speedup, if anything, so I've cleaned them up. Rusty Russell (3): virtio_net: pass well-formed sgs to virtqueue_add_*() virtio_ring: assume sgs are always well-formed. virtio_ring: unify
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches, everything works. There
2014 Aug 26
10
[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API
This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here: https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git Without these patches, the guest hangs forever. With these patches, everything works. There
2013 Mar 06
7
[PATCH 0/6] virtio_add_buf replacement.
OK, so I've spent a few days benchmarking. Turns out 80% of virtio_add_buf cases are uni-directional (including the always-performance-sensitive networking code), and that gets no performance penalty (though tests with real networking would be appreciated!). I'm not reposting all the "convert driver to virtio_add_outbuf()" patches: just the scsi one which I didn't have
2013 Mar 06
7
[PATCH 0/6] virtio_add_buf replacement.
OK, so I've spent a few days benchmarking. Turns out 80% of virtio_add_buf cases are uni-directional (including the always-performance-sensitive networking code), and that gets no performance penalty (though tests with real networking would be appreciated!). I'm not reposting all the "convert driver to virtio_add_outbuf()" patches: just the scsi one which I didn't have
2014 Oct 12
0
[PATCH net-next RFC 1/3] virtio: support for urgent descriptors
.....a5188c6 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -115,6 +115,7 @@ static inline struct scatterlist *sg_next_arr(struct scatterlist *sg, > > /* Set up an indirect table of descriptors and add it to the queue. */ > static inline int vring_add_indirect(struct vring_virtqueue *vq, > + bool urgent, > struct scatterlist *sgs[], > struct scatterlist *(*next) > (struct scatterlist *, unsigned int *), > @@ -173,6 +174,8 @@ static inline int vring_add_indirect(struct vring_virtqueue *vq, > /* U...
2014 Sep 03
0
[PATCH 3/3] virtio_ring: unify direct/indirect code paths.
virtqueue_add() populates the virtqueue descriptor table from the sgs given. If it uses an indirect descriptor table, then it puts a single descriptor in the descriptor table pointing to the kmalloc'ed indirect table where the sg is populated. Previously vring_add_indirect() did the allocation and the simple linear layout. We replace that with alloc_indirect() which allocates the indirect table then chains it like the normal descriptor table so we can reuse the core logic. This slows down pktgen by less than 1/2 a percent (which uses direct descriptors), as well as...
2014 Sep 01
2
[PATCH 1/3] virtio_ring: Remove sg_next indirection
...nt *count) -{ - return sg_next(sg); -} - -static inline struct scatterlist *sg_next_arr(struct scatterlist *sg, - unsigned int *count) -{ - if (--(*count) == 0) - return NULL; - return sg + 1; -} - /* Set up an indirect table of descriptors and add it to the queue. */ static inline int vring_add_indirect(struct vring_virtqueue *vq, struct scatterlist *sgs[], - struct scatterlist *(*next) - (struct scatterlist *, unsigned int *), unsigned int total_sg, - unsigned int total_out, - unsigned int total_in, unsigned int out_sgs, un...
2014 Sep 01
2
[PATCH 1/3] virtio_ring: Remove sg_next indirection
...nt *count) -{ - return sg_next(sg); -} - -static inline struct scatterlist *sg_next_arr(struct scatterlist *sg, - unsigned int *count) -{ - if (--(*count) == 0) - return NULL; - return sg + 1; -} - /* Set up an indirect table of descriptors and add it to the queue. */ static inline int vring_add_indirect(struct vring_virtqueue *vq, struct scatterlist *sgs[], - struct scatterlist *(*next) - (struct scatterlist *, unsigned int *), unsigned int total_sg, - unsigned int total_out, - unsigned int total_in, unsigned int out_sgs, un...
2012 Oct 16
6
[PATCH 1/5] virtio: move queue_index and num_free fields into core struct virtqueue.
...,9 +104,6 @@ struct vring_virtqueue /* How to notify other side. FIXME: commonalize hcalls! */ void (*notify)(struct virtqueue *vq); - /* Index of the queue */ - int queue_index; - #ifdef DEBUG /* They're supposed to lock for us. */ unsigned int in_use; @@ -160,7 +155,7 @@ static int vring_add_indirect(struct vring_virtqueue *vq, desc[i-1].next = 0; /* We're about to use a buffer */ - vq->num_free--; + vq->vq.num_free--; /* Use a single buffer which doesn't continue */ head = vq->free_head; @@ -174,13 +169,6 @@ static int vring_add_indirect(struct vring_virtqueue *vq,...