From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759110AbbA2VyB (ORCPT ); Thu, 29 Jan 2015 16:54:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45784 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752212AbbA2VyA (ORCPT ); Thu, 29 Jan 2015 16:54:00 -0500 Message-ID: <54CAABF0.3090705@redhat.com> Date: Thu, 29 Jan 2015 16:53:52 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Oleg Nesterov CC: Dave Hansen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Fenghua Yu , the arch/x86 maintainers , linux-kernel Subject: Re: [PATCH 2/3] x86, fpu: unlazy_fpu: don't do __thread_fpu_end() if use_eager_fpu() References: <54C2A245.4010307@redhat.com> <20150129210723.GA31584@redhat.com> <20150129210816.GC31584@redhat.com> <54CAA7F6.2000206@redhat.com> <20150129214948.GA1045@redhat.com> In-Reply-To: <20150129214948.GA1045@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/29/2015 04:49 PM, Oleg Nesterov wrote: > Yes. But in this case tsk != current, and we ensure that __switch_to() > was finished. wait_task_inactive(). > >> When we switch to the traced task, the __thread_fpu_end() >> that was called from init_fpu() ensures that >> switch_fpu_begin() will actually load the new FPU state >> from memory into the registers, and we will not take >> the fpu_lazy_restore() branch. > > No. in this case we rely on "tsk->thread.fpu.last_cpu = ~0" which disables > fpu_lazy_restore(). I should have known that. Especially considering I have a patch here that converts "tsk->thread.fpu.last_cpu = ~0" into a disable_lazy_restore() call...