qemu-e2k/util
Stefan Hajnoczi 5cd9c382b7 fdmon-poll: reset npfd when upgrading to fdmon-epoll
npfd keeps track of how many pollfds are currently being monitored. It
must be reset to 0 when fdmon_poll_wait() returns.

When npfd reaches a treshold we switch to fdmon-epoll because it scales
better.

This patch resets npfd in the case where we switch to fdmon-epoll.
Forgetting to do so results in the following assertion failure:

  util/fdmon-poll.c:65: fdmon_poll_wait: Assertion `npfd == 0' failed.

Fixes: 1f050a4690 ("aio-posix: extract ppoll(2) and epoll(7) fd monitoring")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1869952
Message-Id: <20200915120339.702938-2-stefanha@redhat.com>
2020-09-23 13:45:52 +01:00
..
aio-posix.c aio-posix: keep aio_notify_me disabled during polling 2020-08-13 13:34:14 +01:00
aio-posix.h aio-posix: remove idle poll handlers to improve scalability 2020-03-09 16:45:16 +00:00
aio-wait.c
aio-win32.c tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c 2020-09-16 12:14:01 +02:00
aiocb.c
async.c async: always set ctx->notified in aio_notify() 2020-08-13 13:32:59 +01:00
atomic64.c
base64.c
bitmap.c
bitops.c
buffer.c
bufferiszero.c util/bufferiszero: improve avx2 accelerator 2020-04-01 14:24:03 -04:00
cacheinfo.c util/cacheinfo: fix crash when compiling with uClibc 2020-01-21 14:18:12 -10:00
compatfd.c util/compatfd.c: Only include <sys/syscall.h> if CONFIG_SIGNALFD 2020-07-13 14:36:10 +01:00
coroutine-sigaltstack.c coroutine: add check for SafeStack in sigaltstack 2020-06-23 15:46:05 +01:00
coroutine-ucontext.c Remove the CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE switch 2020-07-13 11:40:52 +02:00
coroutine-win32.c
crc32c.c
cutils.c util/cutils: Turn FIXME comment into QEMU_BUILD_BUG_ON() 2019-12-18 12:26:25 +01:00
dbus.c util: add dbus helper unit 2020-01-06 18:41:32 +04:00
drm.c util/drm: make portable by avoiding struct dirent d_type 2020-07-13 14:36:10 +01:00
envlist.c
error.c error: make Error **errp const where it is appropriate 2019-12-18 08:36:16 +01:00
event_notifier-posix.c
event_notifier-win32.c
fdmon-epoll.c aio-posix: support userspace polling of fd monitoring 2020-03-09 16:41:31 +00:00
fdmon-io_uring.c aio-posix: don't duplicate fd handler deletion in fdmon_io_uring_destroy() 2020-05-18 18:16:00 +01:00
fdmon-poll.c fdmon-poll: reset npfd when upgrading to fdmon-epoll 2020-09-23 13:45:52 +01:00
fifo8.c
filemonitor-inotify.c
filemonitor-stub.c
getauxval.c util/getauxval: Porting to FreeBSD getauxval feature 2020-06-26 06:45:29 -04:00
guest-random.c replay: record and replay random number sources 2020-01-07 12:08:39 +01:00
hbitmap.c block/dirty-bitmap: improve _next_dirty_area API 2020-03-18 14:03:46 -04:00
hexdump.c util/hexdump: Reorder qemu_hexdump() arguments 2020-09-11 21:25:59 +02:00
host-utils.c
id.c chardev: generate an internal id when none given 2020-01-07 16:50:09 +04:00
iov.c util/iov: add iov_discard_undo() 2020-09-23 13:41:58 +01:00
iova-tree.c
keyval.c
lockcnt.c
log.c lockable: replaced locks with lock guard macros where appropriate 2020-05-04 16:07:43 +01:00
main-loop.c stubs: Move qemu_fd_register stub to util/main-loop.c 2020-09-07 12:34:17 +02:00
memfd.c
meson.build util/meson.build: fix fdmon-io_uring build 2020-08-21 11:57:13 -04:00
mmap-alloc.c
module.c virtio-gpu: build modular 2020-09-15 14:11:49 +02:00
notify.c
nvdimm-utils.c mem: move nvdimm_device_list to utilities 2020-02-21 09:15:03 +11:00
osdep.c Pull request trivial patches 20200919 2020-09-22 15:42:23 +01:00
oslib-posix.c util: rename qemu_open() to qemu_open_old() 2020-09-16 10:33:48 +01:00
oslib-win32.c util/oslib-win32: add qemu_get_host_physmem implementation 2020-07-27 09:40:16 +01:00
pagesize.c
path.c
qdist.c
qemu-co-shared-resource.c
qemu-config.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-error.c util/qemu-error: prepend guest name to error message to identify affected VM owner 2020-07-10 18:02:15 -04:00
qemu-openpty.c util/qemu-openpty.c: Don't assume pty.h is glibc-only 2020-07-13 14:36:09 +01:00
qemu-option.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
qemu-print.c
qemu-progress.c util/: fix some comment spelling errors 2020-09-17 20:38:42 +02:00
qemu-sockets.c util/: fix some comment spelling errors 2020-09-17 20:38:42 +02:00
qemu-thread-common.h
qemu-thread-posix.c util: Added tsan annotate for thread name. 2020-06-16 14:49:05 +01:00
qemu-thread-win32.c util/: fix some comment spelling errors 2020-09-17 20:38:42 +02:00
qemu-timer-common.c Remove support for CLOCK_MONOTONIC not being defined 2020-02-12 16:23:01 +01:00
qemu-timer.c util/qemu-timer: Fix typo in description 2020-09-01 11:08:57 +02:00
qht.c util/: fix some comment spelling errors 2020-09-17 20:38:42 +02:00
qsp.c qsp: Use WITH_RCU_READ_LOCK_GUARD 2019-12-17 19:33:52 +01:00
range.c
rcu.c rcu: Implement drain_call_rcu 2020-09-16 08:41:06 +02:00
readline.c
selfmap.c linux-user: factor out reading of /proc/self/maps 2020-04-07 16:19:49 +01:00
stats64.c
sys_membarrier.c
systemd.c tools: Fix use of fcntl(F_SETFD) during socket activation 2020-05-04 14:54:35 -05:00
thread-pool.c lockable: replaced locks with lock guard macros where appropriate 2020-05-04 16:07:43 +01:00
throttle.c
timed-average.c
trace-events util/: fix some comment spelling errors 2020-09-17 20:38:42 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
unicode.c
uri.c
uuid.c
vfio-helpers.c util/vfio-helpers: Fix typo in description 2020-09-01 11:08:57 +02:00