Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755623AbaDXJZg (ORCPT ); Thu, 24 Apr 2014 05:25:36 -0400 Received: from imx12.toshiba.co.jp ([61.202.160.132]:61149 "EHLO imx12.toshiba.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754866AbaDXJZ2 (ORCPT ); Thu, 24 Apr 2014 05:25:28 -0400 X-Greylist: delayed 6829 seconds by postgrey-1.27 at vger.kernel.org; Thu, 24 Apr 2014 05:25:28 EDT Message-Id: <201404240924.s3O9OYCC021688@toshiba.co.jp> Date: Thu, 24 Apr 2014 18:24:33 +0900 From: Daniel Sangorrin User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Viresh Kumar , Daniel Sangorrin Cc: Thomas Gleixner , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYg==?= =?UTF-8?B?ZWNrZXI=?= , Peter Zijlstra , Ingo Molnar , Tejun Heo , Li Zefan , Lists linaro-kernel , Linux Kernel Mailing List , Cgroups Subject: Re: [RFC 0/4] Migrate timers away from cpuset on setting cpuset.quiesce References: <201404240725.s3O7PrUv003720@toshiba.co.jp> <201404240832.s3O8WHd0011014@toshiba.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2014/04/24 17:41, Viresh Kumar wrote: > On 24 April 2014 14:01, Daniel Sangorrin wrote: >> In kernel/cpuset.c:quiesce_cpuset() you are using the function >> 'smp_call_function_any' which asks CPU cores in 'cpumask' to >> execute the functions 'hrtimer_quiesce_cpu' and 'timer_quiesce_cpu'. >> >> In the case above, 'cpumask' corresponds to core 0. Since I'm forcing >> the call to be executed from core 1 (by using taskset), >> an inter-processor interrupt is sent to core 0 for those functions >> to be executed. > > Ahh, I understood that now :) .. So we are setting cpuset.quiesce from CPU1 > which will do a IPI to get migrate_timers called on CPU0.. I was setting quiesce > from CPU0 only in my tests :) > > But how does this work fine on x86 then? There we should have exactly same > problem, isn't it? Yeah, I'm not sure why it is working on 3.15 x86_64 but not in 3.10 x86_64. Perhaps it's related to this patch: https://lkml.org/lkml/2013/9/19/349 >> Ok, thank you! I see that you have already fixed the problem. I tested >> your tree on ARM and now it seems to work correctly. > > Yeah, I just pushed your changes as well at the time I wrote last mail :) Oh, I see! Why didn't you just apply the patch on top of your tree so that the information included in the git commit (e.g: my name and mail) remains? This part: cpuset: quiesce: change irq disable/enable by irq save/restore The function __migrate_timers can be called under interrupt context or thread context depending on the core where the system call was executed. In case it executes under interrupt context, it seems a bad idea to leave interrupts enabled after migrating the timers. In fact, this caused kernel errors on the ARM architecture and on the x86_64 architecture with the 3.10 kernel (backported version of the cpuset-quiesce patch). Signed-off-by: Daniel Sangorrin Signed-off-by: Yoshitake Kobayashi Thanks, Daniel -- Toshiba Corporate Software Engineering Center Daniel SANGORRIN E-mail: daniel.sangorrin@toshiba.co.jp -- 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/