From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752716AbdAZOYC (ORCPT ); Thu, 26 Jan 2017 09:24:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42918 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752030AbdAZOYB (ORCPT ); Thu, 26 Jan 2017 09:24:01 -0500 Message-ID: <1485440636.15964.47.camel@redhat.com> Subject: Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached From: Rik van Riel To: Ingo Molnar , linux-kernel@vger.kernel.org Cc: Andrew Morton , Andy Lutomirski , Borislav Petkov , Dave Hansen , Fenghua Yu , "H . Peter Anvin" , Linus Torvalds , Oleg Nesterov , Peter Zijlstra , Thomas Gleixner , Yu-cheng Yu Date: Thu, 26 Jan 2017 09:23:56 -0500 In-Reply-To: <1485429989-23340-2-git-send-email-mingo@kernel.org> References: <1485429989-23340-1-git-send-email-mingo@kernel.org> <1485429989-23340-2-git-send-email-mingo@kernel.org> Organization: Red Hat, Inc Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 26 Jan 2017 14:24:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > > @@ -322,6 +308,16 @@ struct fpu { >   unsigned char fpregs_active; >   >   /* > +  * @fpregs_cached: > +  * > +  * This flag tells us whether this context is loaded into a > CPU > +  * right now. Not quite. You are still checking against fpu_fpregs_owner_ctx. How about something like * This flag tells us whether this context was loaded into * its current CPU; fpu_fpregs_owner_ctx will tell us whether * this context is actually in the registers. > +  * > +  * This is set to 0 if a task is migrated to another CPU. > +  */ > + unsigned char fpregs_cached; > + > + /* >    * @state: >    * >    * In-memory copy of all FPU registers that we save/restore