Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756606AbbHDNqw (ORCPT ); Tue, 4 Aug 2015 09:46:52 -0400 Received: from mail-am1on0094.outbound.protection.outlook.com ([157.56.112.94]:31888 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756584AbbHDNqu (ORCPT ); Tue, 4 Aug 2015 09:46:50 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=cmetcalf@ezchip.com; Subject: Re: [tip:sched/core] sched, tile: Remove finish_arch_switch To: , , , , , , , References: From: Chris Metcalf Message-ID: <55C0C23D.7020501@ezchip.com> Date: Tue, 4 Aug 2015 09:46:37 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [173.76.21.154] X-ClientProxiedBy: BY2PR07CA077.namprd07.prod.outlook.com (10.141.251.52) To VI1PR02MB0781.eurprd02.prod.outlook.com (25.162.14.143) X-Microsoft-Exchange-Diagnostics: 1;VI1PR02MB0781;2:0bgfukMOh+P9MaLgWIFv0gnqnMNkW2SSgE84Lsp7QDvz4ZrZ2M38T48aGOFJHo8t6jAAm9aXrLr2y6QZyMFQt2v1XkHgieJ6AXXW7nUDcE68UA8BE6dmiLtvlQgfnGuxqXAYJj0vYPCZTusXX5qKqjN3TMom4KoCza4RrxFiXmw=;3:WNwGp+sjDuz2wDPtEngYGWwg43uMkIAIrgxAy1kTNZ787qva2UeH5lbrWuKXgbsIHasLHLeArlTVx12kPkMI20Ro/B4eye3fn+wdLCQEwPsXNX//YnwMR73AIVXz5W4gZNV3SqbBcfa7tCc2I3zNjQ==;25:Q6cSqNEV2RcFfBEjwkkrVSfShNowTqkWEn+R4uL5SZEOSNQzte/oOSLmwMY5NI6T4BJNKnxY6VYaQSZW7zTNxyyflbETIL3UUiataO7swo/Wg40fYunNWvQbUxoCLoS58xl7qOujrAdgVk391RDkGbKmQQIbNVC5J+tTeKJxVCjENjvPz88bXhrf55nTan3upZp72G+tt890PoytUSgW8xSh0UqME0tT5mFtNZx3LthivkhEA5vB34t7OThP2kfkarmZRn1Ny85dHegsxNNPYw==;20:MzQ4HiZNyZ1MXpZEhb61Xjtdsmxk+TglQAQxHjBs8tBSre8WKv8V55IJ0NzQ6FX9aIxGJuGQY0O6GgN1bPUIrT+zyRfU8UKGX1r1iuJDSlF7dJeWm8NHm84xECYkAP39iqEtX1Z5al7WWG4HHg+Zn8pK+yfjXGovlr6RK4+ukoM= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0781; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:VI1PR02MB0781;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0781; X-Microsoft-Exchange-Diagnostics: 1;VI1PR02MB0781;4:IyqTBfp1bFwKPI5XHUsstFb0SL9EbibExYOdlLJF8Er0AjKCjcqenDScaBbKbWdsTLEUQSrzm/YqkZb0+TLduqol72Haz3lllOri23cDESeORf9atWFSH7aiHYkFQffuzyYLqCKKnUpbhQhwVJLN/L148hX3+qGfmEFN0nr94iB95gEJTLXfMoc+rQj7P5u+LzsWUVCOheXV7/AU2CU3dmMVGQGPMkM+GxRfN5sdt8tlZ2W4pvemnfk8cnZXOCvmwdJjcYJ5tJ5uzvltt9icQ7FN9OB1qR6Sn8ZpWKB/DNo= X-Forefront-PRVS: 0658BAF71F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(189002)(479174004)(24454002)(377454003)(199003)(101416001)(62966003)(122386002)(77156002)(106356001)(105586002)(42186005)(19580395003)(64126003)(87976001)(23676002)(86362001)(117156001)(2201001)(40100003)(59896002)(64706001)(107886002)(5001960100002)(66066001)(36756003)(5001770100001)(2950100001)(19580405001)(189998001)(87266999)(15975445007)(83506001)(5001830100001)(77096005)(65956001)(68736005)(46102003)(47776003)(5001920100001)(33656002)(92566002)(97736004)(81156007)(1720100001)(4001350100001)(50986999)(50466002)(76176999)(4001540100001)(65806001)(54356999)(5001860100001)(80316001)(65816999)(7059030)(2101003)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR02MB0781;H:[192.168.1.154];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjAyTUIwNzgxOzIzOjB4NEcxdVRLWnVqZ2xjMmppamRWMmhEZDIw?= =?utf-8?B?UTNYbmZPczZEbC9ISmFMa3ZKV0tjZHZWbi9tUEZ2K0NUMlpuNXZHb280VTFD?= =?utf-8?B?YXJ1c3o5OFRrNURsSmhhN0p2aXlGSkg3Zitubks2V3UyUCtmR0JRV3hMSkNq?= =?utf-8?B?Y0o2NW4zb3lQK05JbjNkaFpxSmYrZVFXZGRQL3ZRRVAxdWJBZlVMd0xGa0pa?= =?utf-8?B?MHVtSU1VR1FheXlBOGRDdHlWQWhlUldnUmFQZ3M2NHVzSlNmTWppbmZCR0pO?= =?utf-8?B?WVVBbnRUdFNydm5peHNhUi9GYXdJV1ZDc0liVytGYVc1Y2c2eUJRcEpaWVR3?= =?utf-8?B?cUl0L3UrRXE3K1ptTW1wNTZNaHAvcys1MXhNTngxRUlmZU1rallzMHQ0dzhN?= =?utf-8?B?VWxDL09XOGpQSmJRWXM5ei8yV2V1QjR4UWlTdUtraTVYdStLcTZ5UENRTERC?= =?utf-8?B?OHVzUFFaTFl0RHRGaXdKb21Ec3hQdDlPQmFhUWxDeGhEODFld1FNMkZsK0dY?= =?utf-8?B?bEZCeC8zc3JDcDlNYkpndTRodnFzSy9YbFdINXp3UFhmY3ZoWnJVM1RXQzNJ?= =?utf-8?B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1C3SOiSDmd/Sszp1AsAfJ2CKoFJWd1rUU3FB4tOWs+UBgig== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2015 13:46:43.1727 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB0781 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4123 Lines: 97 Ingo, I already have the appended commit in a modified form in the linux-tile tree ready to be pushed to 4.3. Can you drop it from your series? Thanks! On 8/4/2015 4:50 AM, tip-bot for Chris Metcalf wrote: > Commit-ID: fe363adb922583bacfbd5a30a4c773ccff9bb393 > Gitweb: http://git.kernel.org/tip/fe363adb922583bacfbd5a30a4c773ccff9bb393 > Author: Chris Metcalf > AuthorDate: Wed, 29 Jul 2015 13:06:29 -0400 > Committer: Ingo Molnar > CommitDate: Tue, 4 Aug 2015 09:38:18 +0200 > > sched, tile: Remove finish_arch_switch > > Move the simulator bits into switch_to() and use > finish_arch_post_lock_switch() for the homecache migration bits. > > Signed-off-by: Chris Metcalf > Signed-off-by: Peter Zijlstra (Intel) > Cc: Linus Torvalds > Cc: Mike Galbraith > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Ingo Molnar > --- > arch/tile/include/asm/switch_to.h | 10 +++------- > arch/tile/kernel/process.c | 17 +++++++++++++++-- > 2 files changed, 18 insertions(+), 9 deletions(-) > > diff --git a/arch/tile/include/asm/switch_to.h b/arch/tile/include/asm/switch_to.h > index b8f888c..422842a 100644 > --- a/arch/tile/include/asm/switch_to.h > +++ b/arch/tile/include/asm/switch_to.h > @@ -53,15 +53,11 @@ extern unsigned long get_switch_to_pc(void); > * Kernel threads can check to see if they need to migrate their > * stack whenever they return from a context switch; for user > * threads, we defer until they are returning to user-space. > + * We defer homecache migration until the runqueue lock is released. > */ > -#define finish_arch_switch(prev) do { \ > - if (unlikely((prev)->state == TASK_DEAD)) \ > - __insn_mtspr(SPR_SIM_CONTROL, SIM_CONTROL_OS_EXIT | \ > - ((prev)->pid << _SIM_CONTROL_OPERATOR_BITS)); \ > - __insn_mtspr(SPR_SIM_CONTROL, SIM_CONTROL_OS_SWITCH | \ > - (current->pid << _SIM_CONTROL_OPERATOR_BITS)); \ > +#define finish_arch_post_lock_switch() do { \ > if (current->mm == NULL && !kstack_hash && \ > - current_thread_info()->homecache_cpu != smp_processor_id()) \ > + current_thread_info()->homecache_cpu != raw_smp_processor_id()) \ > homecache_migrate_kthread(); \ > } while (0) > > diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c > index a452137..1087375 100644 > --- a/arch/tile/kernel/process.c > +++ b/arch/tile/kernel/process.c > @@ -448,11 +448,24 @@ struct task_struct *__sched _switch_to(struct task_struct *prev, > > /* > * Switch kernel SP, PC, and callee-saved registers. > + * Pass the value to use for SYSTEM_SAVE_K_0 when we reset our sp. > + * Once we return from this function we will have changed stacks > + * and be running with current == next. > + */ > + __switch_to(prev, next, next_current_ksp0(next)); > + > + /* Notify the simulator of task switch and task exit. */ > + if (unlikely(prev->state == TASK_DEAD)) > + __insn_mtspr(SPR_SIM_CONTROL, SIM_CONTROL_OS_EXIT | > + (prev->pid << _SIM_CONTROL_OPERATOR_BITS)); > + __insn_mtspr(SPR_SIM_CONTROL, SIM_CONTROL_OS_SWITCH | > + (next->pid << _SIM_CONTROL_OPERATOR_BITS)); > + > + /* > * In the context of the new task, return the old task pointer > * (i.e. the task that actually called __switch_to). > - * Pass the value to use for SYSTEM_SAVE_K_0 when we reset our sp. > */ > - return __switch_to(prev, next, next_current_ksp0(next)); > + return prev; > } > > /* -- Chris Metcalf, EZChip Semiconductor http://www.ezchip.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/