Bug 712653

Summary: make guest mode entry to be rcu quiescent state
Product: Red Hat Enterprise Linux 6 Reporter: Gleb Natapov <gleb>
Component: kernelAssignee: Gleb Natapov <gleb>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.2CC: cww, dhoward, juzhang, knoel, skito, tburke, tmuneda
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.32-160.el6 Doc Type: Bug Fix
Doc Text:
When a CPU is about to modify data protected by the RCU (Read Copy Update) mechanism, it has to wait for other CPUs in the system to pass a quiescent state. Previously, the guest mode was not considered a quiescent state. As a consequence, if a CPU was in the guest mode for a long time, another CPU had to wait a long time in order to modify RCU-protected data. With this update, the rcu_virt_note_context_switch() function, which marks the guest mode as a quiescent state, has been added to the kernel, thus resolving this issue.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 13:38:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 740352    

Description Gleb Natapov 2011-06-12 07:50:39 UTC
KVM does not hold any references to rcu protected data when it switches
CPU into a guest mode. In fact switching to a guest mode is very similar
to exiting to userspase from rcu point of view. In addition CPU may stay
in a guest mode for quite a long time (up to one time slice). Lets treat
guest mode as quiescent state, just like we do with user-mode execution.

Comment 2 RHEL Program Management 2011-06-13 16:10:21 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.

Comment 3 juzhang 2011-06-16 07:51:33 UTC
Tested on 2.6.32-156.el6.x86_64 with qemu-kvm-0.12.1.2-2.165.el6.x86_64, marked as qa_ack+

steps
1. boot guest with virtio devices and vcpu=4
2. in guest
#halt

Result:
guest just pause for a couple of seconds after printing "Disabling non-boot CPUs"

Please note:
guest should be rhel6.X

Comment 4 Aristeu Rozanski 2011-06-27 19:04:43 UTC
Patch(es) available on kernel-2.6.32-160.el6

Comment 10 juzhang 2011-10-13 05:18:13 UTC
Verified this issue on kernel 2.6.32-206.el6.x86_64 with qemu-kvm-0.12.1.2-2.195.el6.x86_64.,I tried three times.

1.boot guest with boot guest with virtio devices and vcpu=4
2.in guest
#half

Results:
No pause after printing "Disabling non-boot
CPUs"




Guest kernel
2.6.32-206.el6.x86_64

Comment 11 juzhang 2011-10-13 05:19:02 UTC
According to comment3 and comment10,set this issue as verified.

Comment 12 Tomas Capek 2011-11-23 15:25:58 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:
When a CPU is about to modify data protected by the RCU (Read Copy Update) mechanism, it has to wait for other CPUs in the system to pass a quiescent state. Previously, the guest mode was not considered a quiescent state. As a consequence, if a CPU was in the guest mode for a long time, another CPU had to wait a long time in order to modify RCU-protected data. With this update, the rcu_virt_note_context_switch() function, which marks the guest mode as a quiescent state, has been added to the kernel, thus resolving this issue.

Comment 13 errata-xmlrpc 2011-12-06 13:38:43 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-1530.html