Re: BUG_ON in virtio-ring.c

2013-05-26 Thread Rusty Russell
Dave Airlie writes: >>> correct. >>> >>> If I have an indirect ring and I'm adding sgs to it and the host is >>> delayed (say I've got a thread consuming things from the vring and its >>> off doing something interesting), >>> I'd really like to get ENOSPC back from virtqueue_add. However if the >>

Re: BUG_ON in virtio-ring.c

2013-05-26 Thread Rusty Russell
Dave Airlie writes: > Hi Rusty, > > current virtio-ring.c has a BUG_ON in virtqueue_add that checks > total_sg > vg->vring.num, however I'm not sure it really is 100% > correct. > > If I have an indirect ring and I'm adding sgs to it and the host is > delayed (say I've got a thread consuming thing

Re: [Qemu-devel] [PATCH v2 00/11] qemu: use virtio linux headers in portable code

2013-05-26 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Sun, May 26, 2013 at 03:49:53PM -0500, Anthony Liguori wrote: >> Paolo Bonzini writes: >> >> > Il 26/05/2013 22:02, Michael S. Tsirkin ha scritto: >> >> > My fault. I should have looked at linux/types.h (actually >> >> > asm-generic/). >> >> >> >> Not really

Re: [Qemu-devel] [PATCH v2 00/11] qemu: use virtio linux headers in portable code

2013-05-26 Thread Michael S. Tsirkin
On Sun, May 26, 2013 at 03:49:53PM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 26/05/2013 22:02, Michael S. Tsirkin ha scritto: > >> > My fault. I should have looked at linux/types.h (actually asm-generic/). > >> > >> Not really, __uX appear in the headers that were posted. >

Re: [Qemu-devel] [PATCH v2 00/11] qemu: use virtio linux headers in portable code

2013-05-26 Thread Anthony Liguori
Paolo Bonzini writes: > Il 26/05/2013 22:02, Michael S. Tsirkin ha scritto: >> > My fault. I should have looked at linux/types.h (actually asm-generic/). >> >> Not really, __uX appear in the headers that were posted. Which is a problem because this is a reserved namespace in C99. >> What I'm

[PATCH v3, part2 02/20] PCI, core: use hotplug-safe iterators to walk PCI buses

2013-05-26 Thread Jiang Liu
Enhance PCI core to use hotplug-safe iterators to walk PCI buses. In other words, replace pci_find_bus(), pci_find_next_bus() and pci_root_buses with pci_bus_exists(), pci_get_bus(), pci_get_next_bus() and pci_get_next_root_bus() etc. Signed-off-by: Jiang Liu Acked-by: Yinghai Lu Cc: Konrad Rze

[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages

2013-05-26 Thread Jiang Liu
Enhance adjust_managed_page_count() to adjust totalhigh_pages for highmem pages. And change code which directly adjusts totalram_pages to use adjust_managed_page_count() because it adjusts totalram_pages, totalhigh_pages and zone->managed_pages altogether in a safe way. Remove inc_totalhigh_pages(