From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbbEGXRR (ORCPT ); Thu, 7 May 2015 19:17:17 -0400 Received: from mga11.intel.com ([192.55.52.93]:1821 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751380AbbEGXRP (ORCPT ); Thu, 7 May 2015 19:17:15 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,386,1427785200"; d="scan'208";a="490805245" Date: Thu, 7 May 2015 16:15:41 -0700 (PDT) From: Vikas Shivappa X-X-Sender: vikas@vshiva-Udesk To: Peter Zijlstra cc: Vikas Shivappa , Vikas Shivappa , linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, tj@kernel.org, matt.fleming@intel.com, will.auld@intel.com, peter.zijlstra@intel.com, h.peter.anvin@intel.com, kanaka.d.juvva@intel.com Subject: Re: [PATCH 4/7] x86/intel_rdt: Implement scheduling support for Intel RDT In-Reply-To: <20150506074835.GS23123@twins.programming.kicks-ass.net> Message-ID: References: <1430530601-16319-1-git-send-email-vikas.shivappa@linux.intel.com> <1430530601-16319-5-git-send-email-vikas.shivappa@linux.intel.com> <20150502185131.GI3007@worktop.Skamania.guest> <20150506074835.GS23123@twins.programming.kicks-ass.net> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 May 2015, Peter Zijlstra wrote: > On Mon, May 04, 2015 at 11:39:21AM -0700, Vikas Shivappa wrote: > >>>> --- a/arch/x86/include/asm/switch_to.h >>>> +++ b/arch/x86/include/asm/switch_to.h >>>> @@ -8,6 +8,9 @@ struct tss_struct; >>>> void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, >>>> struct tss_struct *tss); >>>> >>>> +#include >>>> +#define post_arch_switch(current) rdt_sched_in(current) >>>> + >>>> #ifdef CONFIG_X86_32 >>>> >>>> #ifdef CONFIG_CC_STACKPROTECTOR >>> >>>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >>>> index f9123a8..cacb490 100644 >>>> --- a/kernel/sched/core.c >>>> +++ b/kernel/sched/core.c >>>> @@ -2241,6 +2241,7 @@ static struct rq *finish_task_switch(struct task_struct *prev) >>>> prev_state = prev->state; >>>> vtime_task_switch(prev); >>>> finish_arch_switch(prev); >>>> + post_arch_switch(current); >>>> perf_event_task_sched_in(prev, current); >>>> finish_lock_switch(rq, prev); >>>> finish_arch_post_lock_switch(); >>> >>> Not a word in the Changelog on this hook; that's double fail. >> >> will add the changelog. we want the current task which no other existing >> hook provides. > > No. > > 1) two arch hooks right after one another is FAIL > 1a) just 'fix' the existing hook > 2) current is cheap and easily obtainable without passing it as > an argument will fix to just use an existing hook in finish_task_switch and current(get_current) since the stack would already be changed .. Thanks, Vikas > 3) why do you need the hook in the first place? > 3a) why can't you put this in __switch_to()? This is very much x86 only > code. >