- 23 2月, 2017 2 次提交
-
-
由 Alex Williamson 提交于
Since commit 4bb571d8 ("pci/pcie: don't assume cap id 0 is reserved") removes the internal use of extended capability ID 0, the comment here becomes invalid. However, peeling back the onion, the code is still correct and we still can't seed the capability chain with ID 0, unless we want to muck with using the version number to force the header to be non-zero, which is much uglier to deal with. The comment also now covers some of the subtleties of using cap ID 0, such as transparently indicating absence of capabilities if none are added. This doesn't detract from the correctness of the referenced commit as vfio in the kernel also uses capability ID zero to mask capabilties. In fact, we should skip zero capabilities precisely because the kernel might also expose such a capability at the head position and re-introduce the problem. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Reviewed-by: NPeter Xu <peterx@redhat.com> Tested-by: NPeter Xu <peterx@redhat.com> Reported-by: NJintack Lim <jintack@cs.columbia.edu> Tested-by: NJintack Lim <jintack@cs.columbia.edu>
-
由 Alex Williamson 提交于
Currently we ignore this error, report it with error_reportf_err() Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Reviewed-by: NEric Auger <eric.auger@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
-
- 21 2月, 2017 38 次提交
-
-
由 Peter Maydell 提交于
# gpg: Signature made Tue 21 Feb 2017 15:40:05 GMT # gpg: using RSA key 0xBDBE7B27C0DE3057 # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>" # gpg: aka "Jeffrey Cody <jeff@codyprime.org>" # gpg: aka "Jeffrey Cody <codyprime@gmail.com>" # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98 D624 BDBE 7B27 C0DE 3057 * remotes/cody/tags/block-pull-request: qemu-options: Fix broken sheepdog URL mirror: do not increase offset during initial zero_or_discard phase QAPI: Fix blockdev-add example documentation iscsi: Add blockdev-add support iscsi: Add timeout option iscsi: Add header-digest option iscsi: Add initiator-name option iscsi: Handle -iscsi user/password in bdrv_parse_filename() iscsi: Split URL into individual options Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Thomas Huth 提交于
The sheepdog URL is broken twice: First it uses a duplicated http:// prefix, second the website seems to have moved to https://sheepdog.github.io/sheepdog/ instead. Signed-off-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Anton Nefedov 提交于
If explicit zeroing out before mirroring is required for the target image, it moves the block job offset counter to EOF, then offset and len counters count the image size twice. There is no harm but stats are confusing, specifically the progress of the operation is always reported as 99% by management tools. The patch skips offset increase for the first "technical" pass over the image. This should not cause any further harm. Signed-off-by: NAnton Nefedov <anton.nefedov@virtuozzo.com> Signed-off-by: NDenis V. Lunev <den@openvz.org> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1486045515-8009-1-git-send-email-den@openvz.org CC: Jeff Cody <jcody@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> CC: Max Reitz <mreitz@redhat.com> CC: Eric Blake <eblake@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Jeff Cody 提交于
Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Kevin Wolf 提交于
This adds blockdev-add support for iscsi devices. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Kevin Wolf 提交于
This was previously only available with -iscsi. Again, after this patch, the -iscsi option only takes effect if an URL is given. New users are supposed to use the new driver-specific option. All -iscsi options have a corresponding driver-specific option for the iscsi block driver now. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Kevin Wolf 提交于
This was previously only available with -iscsi. Again, after this patch, the -iscsi option only takes effect if an URL is given. New users are supposed to use the new driver-specific option. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Kevin Wolf 提交于
This was previously only available with -iscsi. Again, after this patch, the -iscsi option only takes effect if an URL is given. New users are supposed to use the new driver-specific option. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Kevin Wolf 提交于
This splits the logic in the old parse_chap() function into a part that parses the -iscsi options into the new driver-specific options, and another part that actually applies those options (called apply_chap() now). Note that this means that username and password specified with -iscsi only take effect when a URL is provided. This is intentional, -iscsi is a legacy interface only supported for compatibility, new users should use the proper driver-specific options. Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Kevin Wolf 提交于
This introduces a .bdrv_parse_filename handler for iscsi which parses an URL if given and translates it to individual options. Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com>
-
由 Peter Maydell 提交于
Changes to -drive without if= and with if=scsi # gpg: Signature made Tue 21 Feb 2017 12:22:35 GMT # gpg: using RSA key 0x3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-block-2017-02-21: hw/i386: Deprecate -drive if=scsi with PC machine types hw: Deprecate -drive if=scsi with non-onboard HBAs hw/scsi: Concentrate -drive if=scsi auto-create in one place hw: Drop superfluous special checks for orphaned -drive blockdev: Make orphaned -drive fatal blockdev: Improve message for orphaned -drive hw/arm/highbank: Default -drive to if=ide instead of if=scsi hw: Default -drive to if=none instead of scsi when scsi cannot work hw: Default -drive to if=none instead of ide when ide cannot work hw/arm/cubieboard hw/arm/xlnx-ep108: Fix units_per_default_bus hw: Default -drive to if=ide explicitly where it works Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Markus Armbruster 提交于
The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi. For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU create 25 of them. lsi53c895a is thoroughly obsolete (PCI Ultra2 SCSI, ca. 2000), and currently has no maintainer in QEMU. megasas is a better choice, except with old OSes that lack drivers. virtio-scsi is a much better choice when you have a driver, but only (newish) Linux comes with one in the box. There is no good default that works for all guests. Encourage users to pick a non-obsolete SCSI HBA that works for them by deprecating -drive if=scsi. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1487161136-9018-4-git-send-email-armbru@redhat.com> Acked-By: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Markus Armbruster 提交于
Block backends defined with "-drive if=T" with T other than "none" are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. Drives defined with if=scsi are also picked up by SCSI HBAs added with -device, unlike other interface types. Deprecate this usage, as follows. Create the frontends for onboard HBAs in machine initialization code, exactly like we do for if=ide and other interface types. Change scsi_legacy_handle_cmdline() to create a frontend only when it's still missing, and warn that this usage is deprecated. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1487161136-9018-3-git-send-email-armbru@redhat.com>
-
由 Markus Armbruster 提交于
The logic to create frontends for -drive if=scsi is in SCSI HBAs. For all other interface types, it's in machine initialization code. A few machine types create the SCSI HBAs necessary for that. That's also not done for other interface types. I'm going to deprecate these SCSI eccentricities. In preparation for that, create the frontends in main() instead of the SCSI HBAs, by calling new function scsi_legacy_handle_cmdline() there. Note that not all SCSI HBAs create frontends. Take care not to change that. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1487161136-9018-2-git-send-email-armbru@redhat.com> Acked-By: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Markus Armbruster 提交于
We've traditionally rejected orphans here and there, but not systematically. For instance, the sun4m machines have an onboard SCSI HBA (bus=0), and have always rejected bus>0. Other machines with an onboard SCSI HBA don't. Commit a66c9dc7 made all orphans trigger a warning, and the previous commit turned this into an error. The checks "here and there" are now redundant. Drop them. Note that the one in mips_jazz.c was wrong: it rejected bus > MAX_FD, but MAX_FD is the number of floppy drives per bus. Error messages change from $ qemu-system-x86_64 -drive if=ide,bus=2 qemu-system-x86_64: Too many IDE buses defined (3 > 2) $ qemu-system-mips64 -M magnum,accel=qtest -drive if=floppy,bus=2,id=fd1 qemu: too many floppy drives $ qemu-system-sparc -M LX -drive if=scsi,bus=1 qemu: too many SCSI bus to $ qemu-system-x86_64 -drive if=ide,bus=2 qemu-system-x86_64: -drive if=ide,bus=2: machine type does not support if=ide,bus=2,unit=0 $ qemu-system-mips64 -M magnum,accel=qtest -drive if=floppy,bus=2,id=fd1 qemu-system-mips64: -drive if=floppy,bus=2,id=fd1: machine type does not support if=floppy,bus=2,unit=0 $ qemu-system-sparc -M LX -drive if=scsi,bus=1 qemu-system-sparc: -drive if=scsi,bus=1: machine type does not support if=scsi,bus=1,unit=0 Cc: John Snow <jsnow@redhat.com> Cc: "Hervé Poussineau" <hpoussin@reactos.org> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1487153147-11530-9-git-send-email-armbru@redhat.com> Reviewed-by: NJohn Snow <jsnow@redhat.com>
-
由 Markus Armbruster 提交于
Block backends defined with "-drive if=T" with T other than "none" are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. If machine initialization code doesn't comply, the block backend remains unused. This triggers a warning since commit a66c9dc7, v2.2.0. Drives created by default are exempted; use -nodefaults to get rid of them. Turn this warning into an error. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1487153147-11530-8-git-send-email-armbru@redhat.com> Reviewed-by: NJohn Snow <jsnow@redhat.com>
-
由 Markus Armbruster 提交于
We warn when a -drive isn't supported by the machine type (commit a66c9dc7): $ qemu-system-x86_64 -S -display none -drive if=mtd Warning: Orphaned drive without device: id=mtd0,file=,if=mtd,bus=0,unit=0 Improve this to point to the offending bit of configuration: qemu-system-x86_64: -drive if=mtd: warning: machine type does not support if=mtd,bus=0,unit=0 Especially nice when it's hidden behind -readconfig foo.cfg: qemu-system-x86_64:foo.cfg:140: warning: machine type does not support if=mtd,bus=0,unit=0 Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <1487153147-11530-7-git-send-email-armbru@redhat.com> Reviewed-by: NJohn Snow <jsnow@redhat.com>
-
由 Markus Armbruster 提交于
These machines have no onboard SCSI HBA, and no way to plug one. -drive if=scsi therefore cannot work. They do have an onboard IDE controller (sysbus-ahci), but fail to honor if=ide. Change their default to if=ide, and add a TODO comment on what needs to be done to actually honor -drive if=ide. Cc: Rob Herring <robh@kernel.org> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-arm@nongnu.org Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <1487153147-11530-6-git-send-email-armbru@redhat.com>
-
由 Markus Armbruster 提交于
Block backends defined with -drive if=scsi are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=scsi drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused ones produce an "Orphaned drive without device" warning. A few machine types default to if=scsi, even though they don't actually have a SCSI HBA. This makes no sense. Change their default to if=none. Affected machines: * aarch64/arm: realview-pbx-a9 vexpress-a9 vexpress-a15 xilinx-zynq-a9 Cc: Peter Maydell <peter.maydell@linaro.org> Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> Cc: Alistair Francis <alistair.francis@xilinx.com> Cc: qemu-arm@nongnu.org Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com> Message-Id: <1487153147-11530-5-git-send-email-armbru@redhat.com>
-
由 Markus Armbruster 提交于
Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused ones produce an "Orphaned drive without device" warning. -drive parameter "if" is optional, and the default depends on the machine type. If a machine type doesn't specify a default, the default is "ide". Many machine types implicitly default to if=ide that way, even though they don't actually have an IDE controller. This makes no sense. Change the implicit default to if=none. Affected machines: * all targets: none * aarch64/arm: akita ast2500 canon cheetah collie connex imx25 integratorcp kzm lm3s6965evb lm3s811evb mainstone musicpal n800 n810 netduino2 nuri palmetto realview romulus sabrelite smdkc210 sx1 sx1 verdex z2 * cris: axis-dev88 * i386/x86_64: xenpv * lm32: lm32-evr lm32-uclinux milkymist * m68k: an5206 dummy mcf5208evb * microblaze/microblazeel: petalogix-ml605 petalogix-s3adsp1800 * mips/mips64/mips64el/mipsel: mipssim * moxie: moxiesim * or32: or32-sim * ppc/ppc64/ppcemb: bamboo ref405ep taihu virtex-ml507 * ppc/ppc64: mpc8544ds ppce500 * sh4/sh4eb: shix * sparc: leon3_generic * sparc64: niagara * tricore: tricore_testboard * unicore32: puv3 * xtensa/xtensaeb: kc705 lx200 lx60 ml605 sim None of these machines have an IDE controller, let alone code to honor if=ide. Cc: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-arm@nongnu.org Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: xen-devel@lists.xensource.com Cc: Michael Walle <michael@walle.cc> Cc: Laurent Vivier <laurent@vivier.eu> Cc: Anthony Green <green@moxielogic.com> Cc: Jia Liu <proljc@gmail.com> Cc: Alexander Graf <agraf@suse.de> Cc: qemu-ppc@nongnu.org Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Fabien Chouteau <chouteau@adacore.com> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Cc: Artyom Tarasenko <atar4qemu@gmail.com> Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-By: NArtyom Tarasenko <atar4qemu@gmail.com> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <1487153147-11530-4-git-send-email-armbru@redhat.com>
-
由 Markus Armbruster 提交于
Machine types cubieboard, xlnx-ep108, xlnx-zcu102 have an onboard AHCI controller, but neglect to set their MachineClass member units_per_default_bus = 1. This permits -drive if=ide,unit=1, which makes no sense for AHCI. It also screws up index=N for odd N, because it gets desugared to unit=1,bus=N/2 Doesn't really matter, because these machine types fail to honor -drive if=ide. Add the missing units_per_default_bus = 1 anyway, along with a TODO comment on what needs to be done for -drive if=ide. Also set block_default_type = IF_IDE explicitly. It's currently the default, but the next commit will change it to something more sensible, and we want to keep the IF_IDE default for these three machines. See also the previous commit. Cc: Beniamino Galvani <b.galvani@gmail.com> Cc: Alistair Francis <alistair.francis@xilinx.com> Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-arm@nongnu.org Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NAlistair Francis <alistair.francis@xilinx.com> Message-Id: <1487153147-11530-3-git-send-email-armbru@redhat.com>
-
由 Markus Armbruster 提交于
Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused ones produce an "Orphaned drive without device" warning. -drive parameter "if" is optional, and the default depends on the machine type. If a machine type doesn't specify a default, the default is "ide". Many machine types default to if=ide, even though they don't actually have an IDE controller. A future patch will change these defaults to something more sensible. To prepare for it, this patch makes default "ide" explicit for the machines that actually pick up if=ide drives: * alpha: clipper * arm/aarch64: spitz borzoi terrier tosa * i386/x86_64: generic-pc-machine (with concrete subtypes pc-q35-* pc-i440fx-* pc-* isapc xenfv) * mips64el: fulong2e * mips/mipsel/mips64el: malta mips * ppc/ppc64: mac99 g3beige prep * sh4/sh4eb: r2d * sparc64: sun4u sun4v Note that ppc64 machine powernv already sets an "ide" default explicitly. Its IDE controller isn't implemented, yet. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NThomas Huth <thuth@redhat.com> Message-Id: <1487153147-11530-2-git-send-email-armbru@redhat.com>
-
由 Peter Maydell 提交于
Pull request v2: * Rebased to resolve scsi conflicts # gpg: Signature made Tue 21 Feb 2017 11:56:24 GMT # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: (24 commits) coroutine-lock: make CoRwlock thread-safe and fair coroutine-lock: add mutex argument to CoQueue APIs coroutine-lock: place CoMutex before CoQueue in header test-aio-multithread: add performance comparison with thread-based mutexes coroutine-lock: add limited spinning to CoMutex coroutine-lock: make CoMutex thread-safe block: document fields protected by AioContext lock async: remove unnecessary inc/dec pairs aio-posix: partially inline aio_dispatch into aio_poll block: explicitly acquire aiocontext in aio callbacks that need it block: explicitly acquire aiocontext in bottom halves that need it block: explicitly acquire aiocontext in callbacks that need it block: explicitly acquire aiocontext in timers that need it aio: push aio_context_acquire/release down to dispatching qed: introduce qed_aio_start_io and qed_aio_next_io_cb blkdebug: reschedule coroutine on the AioContext it is running on coroutine-lock: reschedule coroutine on the AioContext it was running on nbd: convert to use qio_channel_yield io: make qio_channel_yield aware of AioContexts io: add methods to set I/O handlers on AioContext ... Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Paolo Bonzini 提交于
This adds a CoMutex around the existing CoQueue. Because the write-side can just take CoMutex, the old "writer" field is not necessary anymore. Instead of removing it altogether, count the number of pending writers during a read-side critical section and forbid further readers from entering. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 20170213181244.16297-7-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
All that CoQueue needs in order to become thread-safe is help from an external mutex. Add this to the API. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 20170213181244.16297-6-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
This will avoid forward references in the next patch. It is also more logical because CoQueue is not anymore the basic primitive. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 20170213181244.16297-5-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Add two implementations of the same benchmark as the previous patch, but using pthreads. One uses a normal QemuMutex, the other is Linux only and implements a fair mutex based on MCS locks and futexes. This shows that the slower performance of the 5-thread case is due to the fairness of CoMutex, rather than to coroutines. If fairness does not matter, as is the case with two threads, CoMutex can actually be faster than pthreads. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 20170213181244.16297-4-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Running a very small critical section on pthread_mutex_t and CoMutex shows that pthread_mutex_t is much faster because it doesn't actually go to sleep. What happens is that the critical section is shorter than the latency of entering the kernel and thus FUTEX_WAIT always fails. With CoMutex there is no such latency but you still want to avoid wait and wakeup. So introduce it artificially. This only works with one waiters; because CoMutex is fair, it will always have more waits and wakeups than a pthread_mutex_t. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 20170213181244.16297-3-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
This uses the lock-free mutex described in the paper '"Blocking without Locking", or LFTHREADS: A lock-free thread library' by Gidenstam and Papatriantafilou. The same technique is used in OSv, and in fact the code is essentially a conversion to C of OSv's code. [Added missing coroutine_fn in tests/test-aio-multithread.c. --Stefan] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Message-id: 20170213181244.16297-2-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-19-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Pull the increment/decrement pair out of aio_bh_poll and into the callers. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-18-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
This patch prepares for the removal of unnecessary lockcnt inc/dec pairs. Extract the dispatching loop for file descriptor handlers into a new function aio_dispatch_handlers, and then inline aio_dispatch into aio_poll. aio_dispatch can now become void. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-17-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-16-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-15-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
This covers both file descriptor callbacks and polling callbacks, since they execute related code. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-14-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-13-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
The AioContext data structures are now protected by list_lock and/or they are walked with FOREACH_RCU primitives. There is no need anymore to acquire the AioContext for the entire duration of aio_dispatch. Instead, just acquire it before and after invoking the callbacks. The next step is then to push it further down. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-12-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Paolo Bonzini 提交于
qed_aio_start_io and qed_aio_next_io will not have to acquire/release the AioContext, while qed_aio_next_io_cb will. Split the functionality and gain a little type-safety in the process. Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NFam Zheng <famz@redhat.com> Reviewed-by: NDaniel P. Berrange <berrange@redhat.com> Message-id: 20170213135235.12274-11-pbonzini@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-