From: "Jan Beulich" Subject: Re: [PATCH] x86/S3: Fix cpu pool scheduling after suspend/resume Date: Tue, 09 Apr 2013 15:00:44 +0100 Message-ID: <51643B2C02000078000CBC98@nat28.tlf.novell.com> References: <1365511601-31522-1-git-send-email-benjamin.guthro@citrix.com> <51642DD402000078000CBC38@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ben Guthro Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 09.04.13 at 15:17, Ben Guthro wrote: > On Tue, Apr 9, 2013 at 9:03 AM, Jan Beulich wrote: >>>>> On 09.04.13 at 14:46, Ben Guthro wrote: >>> Removing this if condition forces the CPUs to go through the expected >>> online/offline state, and be properly scheduled after S3. >> >> But this doesn't explain _why_ the code block you remove was >> wrong. And that would be vital to understand, so we can be >> reasonably sure this change won't lead to regressions elsewhere >> again. > > I would argue that there has been so many problems with the original > changeset, that the argument should be in the other direction - since > this changeset that introduced the system_state variable, nobody has > been able to successfully suspend, as has been discussed in multiple > threads over the past year. > > What is the reason that this particular callback gets bailed out of, > but not others? > Previously, the code worked, and went through this code path. > Why this one, in particular? You'd need to work this out with Juergen and Keir. I don't really recall the details of the discussion they had back then. > We have been systematically removing parts of the system_state > changeset, in regard to the S3 path. This is just another one that > puts it back to the way it was prior to that changeset (at least the > second hunk of it) But as said by Juergen - at the expense of breaking cpupools. > I'm open to other suggestions, but this was the only path that > explained the fact that all of the vcpus would end up on cpu0. Again - one of my main concerns here is that so far I was under the impression that this "all CPUs on pCPU0" was occurring sometime, not always. And with that, I would expect the problem to be a race of some sort, and the fix be dealing with a race. Which isn't the case. So the question that first needs answering is - was that impression of mine wrong? If not, the next question would be whether you spotted the race... Jan