RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 709397 - virtio-serial unthrottling needs to use a bottomhalf to avoid recursion
Summary: virtio-serial unthrottling needs to use a bottomhalf to avoid recursion
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Alon Levy
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-31 15:33 UTC by Alon Levy
Modified: 2014-08-04 22:08 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.172.el6
Doc Type: Bug Fix
Doc Text:
I don't think a technical note is required. This is not user visible (not easily, not in the bug description).
Clone Of:
Environment:
Last Closed: 2011-12-06 15:41:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 0 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-06 01:23:30 UTC

Description Alon Levy 2011-05-31 15:33:49 UTC
Description of problem:
current virtio serial unthrottling callback does a straight call to the callback,
which can lead to a second call to the user on the same stack, which should be avoided.
qemu already has a bottomhalf mechanism for this. It is implemented to call all bh before going back to select in the mainloop, so no wait is involved (except for a few instructions).

Comment 4 juzhang 2011-06-01 05:11:19 UTC
Hi,Alon

  Would you please give our qe efficient way to reproduce & verify this issue? thanks

Comment 5 Alon Levy 2011-06-01 05:38:52 UTC
Hi Juzhang,

 There is none.. this is not user visible at all, it just changes the way the callback for sending queued messages to the chardev inside qemu code is called. Without this patch is was called directly, with this patch it is called from the qemu event loop (main_loop) via the bh (bottom half) mechanism. This is basically to cleanup some code that was overly complicated in spice_qemu_char.c (the spicevmc chardev). The patch for the later has not been sent yet. I'll probably open another bug just for it. Maybe there is some flag I should put on the bug to indicate "code cleanup bug"?

Alon

Comment 6 Amit Shah 2011-06-01 07:05:03 UTC
I'd recommend QE to test guest->host file transfer with a very large file (2+GB) and ensure they receive the entire file fine on the host.  That will ensure the throttling code is executed and this path hasn't regressed.

Comment 7 juzhang 2011-06-08 02:34:40 UTC
Mark this issue qa_ack+

We will verify this issue according to comment6 and check source code whether apply in fixed version

Comment 11 FuXiangChun 2011-09-01 07:28:43 UTC
verified on qemu-kvm-0.12.1.2-2.184.el6.x86_64

steps to verify:
1./usr/libexec/qemu-kvm -M pc -enable-kvm -m 4G -smp 4 -name rhel6-32 -uuid ddcbfb49-3411-1701-3c36-6bdbc00bedb9 -rtc base=utc,clock=host,driftfix=slew -boot c -drive file=/dev/migrate/data1,if=none,id=drive-virtio-0-1,format=qcow2,cache=none,werror=ignore,rerror=ignore -device virtio-blk-pci,drive=drive-virtio-0-1,id=virt0-0-1 -netdev tap,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:19:3b:80 -spice disable-ticketing,port=5913  -monitor stdio  -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x6 -chardev socket,id=channel0,path=/tmp/port0,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port0

2.dd if=/dev/zero of=2Gfile bs=1M count=2000 and md5sum 2Gfile in guest
3.cat 2Gfile >/dev/vport0p1  in guest
4.nc -U /tmp/port0 >2Gfile.out
5.md5sum 2Gfile 
6.compare md5sum values

actual result:
two 2Gfile values are same.

check source code:
  below is part changelog of build qemu-kvm-0.12.1.2-2.172.el6
Changelog
- kvm-virtio-serial-bus-use-bh-for-unthrottling.patch [bz#709397] 
- Resolves: bz#709397 
 build qemu-kvm-0.12.1.2-2.172.el6 have included the patch.

base on above, this bug has been fixed.

Comment 13 Alon Levy 2011-11-17 17:54:11 UTC
adding note that technical note is not required.

Comment 14 Alon Levy 2011-11-17 17:54:11 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
I don't think a technical note is required. This is not user visible (not easily, not in the bug description).

Comment 15 errata-xmlrpc 2011-12-06 15:41:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1531.html


Note You need to log in before you can comment on or make changes to this bug.