From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754011AbbCPXTS (ORCPT ); Mon, 16 Mar 2015 19:19:18 -0400 Received: from mga02.intel.com ([134.134.136.20]:53969 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751247AbbCPXTR (ORCPT ); Mon, 16 Mar 2015 19:19:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,412,1422950400"; d="scan'208";a="693043793" Date: Tue, 17 Mar 2015 07:01:10 +0800 From: Wanpeng Li To: Ingo Molnar Cc: Peter Zijlstra , Juri Lelli , linux-kernel@vger.kernel.org, Wanpeng Li Subject: Re: [PATCH RESEND v10] sched/deadline: support dl task migration during cpu hotplug Message-ID: <20150316230110.GA14994@kernel> Reply-To: Wanpeng Li References: <1426231647-11966-1-git-send-email-wanpeng.li@linux.intel.com> <20150316150101.GA18521@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150316150101.GA18521@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ingo, On Mon, Mar 16, 2015 at 04:01:02PM +0100, Ingo Molnar wrote: >> + >> + /* >> + * If cannot preempt any rq, fallback to pick any >> + * online cpu. > >s/If cannot/If we cannot >s/fallback/fall back Will do. > >> + */ >> + fallback = true; >> + cpu = cpumask_any_and(cpu_active_mask, >> + tsk_cpus_allowed(p)); > >shouldn't be on separate lines - but this is also a sign that the guts Otherwise there is a "WARNING: line over 80 characters". >of this new code should be in a helper function, not inside several >layers of branches. Do you mean the whole patch should be in a helper function? > >> + if (cpu >= nr_cpu_ids) { >> + if (dl_bandwidth_enabled()) { >> + /* >> + * Fail to find any suitable cpu. >> + * The task will never come back! >> + */ >> + WARN_ON(1); > >Can this condition happen to users with a non-buggy kernel? What do you prefer? ;-) Regards, Wanpeng Li