From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753930AbdAZQvu (ORCPT ); Thu, 26 Jan 2017 11:51:50 -0500 Received: from mail-ua0-f180.google.com ([209.85.217.180]:34919 "EHLO mail-ua0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752735AbdAZQvt (ORCPT ); Thu, 26 Jan 2017 11:51:49 -0500 MIME-Version: 1.0 In-Reply-To: <1485442458.15964.50.camel@redhat.com> References: <1485429989-23340-1-git-send-email-mingo@kernel.org> <1485429989-23340-2-git-send-email-mingo@kernel.org> <1485442458.15964.50.camel@redhat.com> From: Andy Lutomirski Date: Thu, 26 Jan 2017 08:51:27 -0800 Message-ID: Subject: Re: [PATCH 1/7] x86/fpu: Simplify the fpu->last_cpu logic and rename it to fpu->fpregs_cached To: Rik van Riel Cc: Ingo Molnar , "linux-kernel@vger.kernel.org" , Andrew Morton , Borislav Petkov , Dave Hansen , Fenghua Yu , "H . Peter Anvin" , Linus Torvalds , Oleg Nesterov , Peter Zijlstra , Thomas Gleixner , Yu-cheng Yu Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 26, 2017 at 6:54 AM, Rik van Riel wrote: > On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote: > >> index c56fb57f2991..7eb2f3041fde 100644 >> --- a/kernel/sched/core.c >> +++ b/kernel/sched/core.c >> @@ -1253,6 +1253,8 @@ void set_task_cpu(struct task_struct *p, >> unsigned int new_cpu) >> p->sched_class->migrate_task_rq(p); >> p->se.nr_migrations++; >> perf_event_task_migrate(p); >> + >> + arch_task_migrate(p); >> } >> > > Does it really count as a "simplification" if you add a > scheduler callback? > > This code does not seem any easier to understand than > the old code... I think I lean toward liking Ingo's version better. The old code most likely saved an instruction, but the new code gets the point across quite nicely.