Bug 430310

Summary: [RHEL5.2]: In a domU, all tasks are taskset to cpu 0 by default
Product: Red Hat Enterprise Linux 5 Reporter: Chris Lalancette <clalance>
Component: kernel-xenAssignee: Chris Lalancette <clalance>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: bmarson, ddutile, dshaks, jturner, riel, xen-maint
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0314 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:08:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Patch to fix the problem where init is only set to vcpu 0 none

Description Chris Lalancette 2008-01-25 23:58:17 UTC
Description of problem:
When doing some performance testing, Barry noticed that running his applications
inside a 5.2 domU resulted in poor performance.  After some debugging, it was
determined that the reason his applications had poor performance is that all
processes in a domU were being pinned to vCPU 0, so scalability was tanking. 
This is not a hypervisor problem, as just changing the domU kernel from -75 back
to -53 makes the problem go away.  Bisecting kernels, it looks like -58 kernel
is fine, but -59 kernel is where the problem starts.  I'm going to start looking
at patches in the -59 kernel.

Comment 1 Bill Burns 2008-01-26 00:34:46 UTC
Setting flags


Comment 2 Chris Lalancette 2008-01-26 00:44:58 UTC
It looks like the "force /sbin/init off isolated cpus" patch is probably the
culprit here.  There is an additional upstream changeset:

http://git2.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e5e5673f828623e58a401862b33173591faaeaff

That we do *not* have in the RHEL-5 kernel; this uses cpu_possible_map instead
of cpu_online_map to figure out isolated CPUs, which seems to fix the issue in
my limited testing.  I'm going to produce a real patch, then run it through brew
and get some testing on it.

Chris Lalancette

Comment 3 Chris Lalancette 2008-01-26 00:48:40 UTC
Created attachment 293025 [details]
Patch to fix the problem where init is only set to vcpu 0

Comment 4 Rik van Riel 2008-01-26 00:54:04 UTC
Barry, I think we have a winner.

Comment 5 Barry Marson 2008-01-26 01:57:00 UTC
Rik, do you want to rebuild your other test kernel with this fix ? Or is my
workaround (using taskset) enough ?

Barry

Comment 6 Rik van Riel 2008-01-26 11:03:33 UTC
Barry, the taskset workaround is good enough for you, but too easy to forget for
the folks at the SAP workshop.

I just kicked off http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1134361
 and will update the kernels on my page once the build finishes.

Comment 7 Barry Marson 2008-01-27 21:24:06 UTC
I verified the patch works in Rik's kernel

Barry

Comment 10 Don Zickus 2008-01-30 17:02:04 UTC
in 2.6.18-76.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 13 errata-xmlrpc 2008-05-21 15:08:03 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0314.html