search for: add_chain_head

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

2017 Jul 23
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...9;t be > able to add_next and add_last. So, it would work like this: > > start: > ...get free page block.. > lock(vq) > retry: > ret = add_first(..,&num_free,); > if(ret == -ENOSPC) { > goto retry; > } else if (!num_free) { > add_chain_head(); > unlock(vq); > kick & wait; > goto start; > } > next_one: > ...get free page block.. > add_next(..,&num_free,); > if (!num_free) { > add_chain_head(); > unlock(vq); > kick & wait; >...
2017 Jul 23
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...9;t be > able to add_next and add_last. So, it would work like this: > > start: > ...get free page block.. > lock(vq) > retry: > ret = add_first(..,&num_free,); > if(ret == -ENOSPC) { > goto retry; > } else if (!num_free) { > add_chain_head(); > unlock(vq); > kick & wait; > goto start; > } > next_one: > ...get free page block.. > add_next(..,&num_free,); > if (!num_free) { > add_chain_head(); > unlock(vq); > kick & wait; >...
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > - internal wait - forces multiple APIs like kick/kick_sync > > note how kick_sync can fail but your code never checks return code > > - need to re-write the last descriptor - might
2017 Jul 13
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
On Thu, Jul 13, 2017 at 03:42:35PM +0800, Wei Wang wrote: > On 07/12/2017 09:56 PM, Michael S. Tsirkin wrote: > > > > So the way I see it, there are several issues: > > > > - internal wait - forces multiple APIs like kick/kick_sync > > note how kick_sync can fail but your code never checks return code > > - need to re-write the last descriptor - might
2017 Jul 14
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
..., num_free is 0 after add_first(), we wouldn't be able to add_next and add_last. So, it would work like this: start: ...get free page block.. lock(vq) retry: ret = add_first(..,&num_free,); if(ret == -ENOSPC) { goto retry; } else if (!num_free) { add_chain_head(); unlock(vq); kick & wait; goto start; } next_one: ...get free page block.. add_next(..,&num_free,); if (!num_free) { add_chain_head(); unlock(vq); kick & wait; goto start; } if (num_free == 1) {...
2017 Jul 26
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...t: > > > ...get free page block.. > > > lock(vq) > > > retry: > > > ret = add_first(..,&num_free,); > > > if(ret == -ENOSPC) { > > > goto retry; > > > } else if (!num_free) { > > > add_chain_head(); > > > unlock(vq); > > > kick & wait; > > > goto start; > > > } > > > next_one: > > > ...get free page block.. > > > add_next(..,&num_free,); > > > if (!num_free) { >...
2017 Jul 26
2
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...t: > > > ...get free page block.. > > > lock(vq) > > > retry: > > > ret = add_first(..,&num_free,); > > > if(ret == -ENOSPC) { > > > goto retry; > > > } else if (!num_free) { > > > add_chain_head(); > > > unlock(vq); > > > kick & wait; > > > goto start; > > > } > > > next_one: > > > ...get free page block.. > > > add_next(..,&num_free,); > > > if (!num_free) { >...
2017 Jul 26
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
...it would work like this: >> >> start: >> ...get free page block.. >> lock(vq) >> retry: >> ret = add_first(..,&num_free,); >> if(ret == -ENOSPC) { >> goto retry; >> } else if (!num_free) { >> add_chain_head(); >> unlock(vq); >> kick & wait; >> goto start; >> } >> next_one: >> ...get free page block.. >> add_next(..,&num_free,); >> if (!num_free) { >> add_chain_head(); >>...
2017 Jul 27
0
[PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG
......get free page block.. >>>> lock(vq) >>>> retry: >>>> ret = add_first(..,&num_free,); >>>> if(ret == -ENOSPC) { >>>> goto retry; >>>> } else if (!num_free) { >>>> add_chain_head(); >>>> unlock(vq); >>>> kick & wait; >>>> goto start; >>>> } >>>> next_one: >>>> ...get free page block.. >>>> add_next(..,&num_free,); >>>>...