Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753745AbaATN7t (ORCPT ); Mon, 20 Jan 2014 08:59:49 -0500 Received: from mail-vb0-f41.google.com ([209.85.212.41]:35218 "EHLO mail-vb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbaATN7p (ORCPT ); Mon, 20 Jan 2014 08:59:45 -0500 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 20 Jan 2014 21:59:44 +0800 Message-ID: Subject: Re: [QUERY]: Is using CPU hotplug right for isolating CPUs? From: Lei Wen To: Viresh Kumar Cc: =?ISO-8859-1?Q?Fr=E9d=E9ric_Weisbecker?= , Kevin Hilman , Lists linaro-kernel , Peter Zijlstra , Linux Kernel Mailing List , Steven Rostedt , Linaro Networking Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Viresh, On Wed, Jan 15, 2014 at 5:27 PM, Viresh Kumar wrote: > Hi Again, > > I am now successful in isolating a CPU completely using CPUsets, > NO_HZ_FULL and CPU hotplug.. > > My setup and requirements for those who weren't following the > earlier mails: > > For networking machines it is required to run data plane threads on > some CPUs (i.e. one thread per CPU) and these CPUs shouldn't be > interrupted by kernel at all. > > Earlier I tried CPUSets with NO_HZ by creating two groups with > load_balancing disabled between them and manually tried to move > all tasks out to CPU0 group. But even then there were interruptions > which were continuously coming on CPU1 (which I am trying to > isolate). These were some workqueue events, some timers (like > prandom), timer overflow events (As NO_HZ_FULL pushes hrtimer > to long ahead in future, 450 seconds, rather than disabling them > completely, and these hardware timers were overflowing their > counters after 90 seconds on Samsung Exynos board). > > So after creating CPUsets I hotunplugged CPU1 and added it back > immediately. This moved all these interruptions away and now > CPU1 is running my single thread ("stress") for ever. I have one question regarding unbounded workqueue migration in your case. You use hotplug to migrate the unbounded work to other cpus, but its cpu mask would still be 0xf, since cannot be changed by cpuset. My question is how you could prevent this unbounded work migrate back to your isolated cpu? Seems to me there is no such mechanism in kernel, am I understand wrong? Thanks, Lei > > Now my question is: Is there anything particularly wrong about using > hotplugging here ? Will that lead to a disaster :) > > Thanks in Advance. > > -- > viresh > > _______________________________________________ > linaro-kernel mailing list > linaro-kernel@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/linaro-kernel -- 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/