diff options
author | Stefano Stabellini <stefano.stabellini@xilinx.com> | 2020-05-21 12:26:26 -0700 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2020-05-25 11:45:39 +0200 |
commit | a4c4d462729466c4756bac8a0a8d77eb63b21ef7 (patch) | |
tree | 6a772717fd64b378495b2285f9a20490b3dc9612 /.gitlab-ci-opensbi.yml | |
parent | cf45183b718f02b1369e18c795dc51bc1821245d (diff) |
xen/9pfs: yield when there isn't enough room on the ring
Instead of truncating replies, which is problematic, wait until the
client reads more data and frees bytes on the reply ring.
Do that by calling qemu_coroutine_yield(). The corresponding
qemu_coroutine_enter_if_inactive() is called from xen_9pfs_bh upon
receiving the next notification from the client.
We need to be careful to avoid races in case xen_9pfs_bh and the
coroutine are both active at the same time. In xen_9pfs_bh, wait until
either the critical section is over (ring->co == NULL) or until the
coroutine becomes inactive (qemu_coroutine_yield() was called) before
continuing. Then, simply wake up the coroutine if it is inactive.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20200521192627.15259-2-sstabellini@kernel.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to '.gitlab-ci-opensbi.yml')
0 files changed, 0 insertions, 0 deletions