From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757341Ab1JDNq5 (ORCPT ); Tue, 4 Oct 2011 09:46:57 -0400 Received: from mail.skyhub.de ([78.46.96.112]:59826 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757273Ab1JDNq4 (ORCPT ); Tue, 4 Oct 2011 09:46:56 -0400 Date: Tue, 4 Oct 2011 15:46:53 +0200 From: Borislav Petkov To: "Srivatsa S. Bhat" Cc: Tejun Heo , "Rafael J. Wysocki" , tigran@aivazian.fsnet.co.uk, tglx@linutronix.de, mingo@elte.hu, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Linux PM mailing list Subject: Re: [BUGFIX][PATCH] Freezer, CPU hotplug, x86 Microcode: Fix task freezing failures Message-ID: <20111004134653.GC3148@gere.osrc.amd.com> References: <4E88B5E0.6080503@linux.vnet.ibm.com> <20111002195023.GC31799@mtj.dyndns.org> <4E88C3D4.2020300@linux.vnet.ibm.com> <20111003004051.GD31799@mtj.dyndns.org> <4E894D75.808@linux.vnet.ibm.com> <20111003084754.GB4411@liondog.tnic> <20111004071508.GA15637@dhcp-172-17-108-109.mtv.corp.google.com> <4E8B06E0.2090501@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E8B06E0.2090501@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 04, 2011 at 06:45:12PM +0530, Srivatsa S. Bhat wrote: > I would like to propose a modified solution to the problem: > > Taking a CPU offline: > * Upon a CPU_DEAD notification, just like the code originally did, we free > the kernel's copy of the microcode and invalidate it. So no changes here. > > Bringing a CPU online: > * When a CPU_ONLINE or CPU_ONLINE_FROZEN notification is received, > a. If the userspace is not frozen, we request microcode from userspace and > apply it to the cpu. > > b. However if we find that the userspace is frozen at that moment, we defer > applying microcode now and register a callback function to be executed > immediately when the userspace gets thawed. This callback function would > request microcode from userspace and apply it to the cpu. No need for that if we can drop the whole re-requesting of ucode on CPU_ONLINE* (see my other mail). Let me run some tests before though. Thanks. -- Regards/Gruss, Boris.