Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752086AbbFZMrN (ORCPT ); Fri, 26 Jun 2015 08:47:13 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:55451 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751969AbbFZMrB (ORCPT ); Fri, 26 Jun 2015 08:47:01 -0400 X-Helo: d03dlp01.boulder.ibm.com X-MailFrom: preeti@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Message-ID: <558D49B6.3050805@linux.vnet.ibm.com> Date: Fri, 26 Jun 2015 18:16:46 +0530 From: Preeti U Murthy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Thomas Gleixner CC: Sudeep Holla , "linux-kernel@vger.kernel.org" , Suzuki Poulose , Lorenzo Pieralisi , Catalin Marinas , "Rafael J. Wysocki" Subject: Re: [PATCH] clockevents: return error from tick_broadcast_oneshot_control if !GENERIC_CLOCKEVENTS_BROADCAST References: <1435228065-2428-1-git-send-email-sudeep.holla@arm.com> <558C1E97.4020206@arm.com> <558CDE57.3050008@linux.vnet.ibm.com> <558D46C5.8080307@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15062612-0021-0000-0000-00000C059631 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1850 Lines: 48 On 06/26/2015 06:08 PM, Thomas Gleixner wrote: > On Fri, 26 Jun 2015, Preeti U Murthy wrote: >> On 06/26/2015 01:17 PM, Thomas Gleixner wrote: >>> if (state == TICK_BROADCAST_ENTER) { >>> + /* >>> + * If the current CPU owns the hrtimer broadcast >>> + * mechanism, it cannot go deep idle and we do not add >>> + * the CPU to the broadcast mask. We don't have to go >>> + * through the EXIT path as the local timer is not >>> + * shutdown. >>> + */ >>> + ret = broadcast_needs_cpu(bc, cpu); >>> + >>> + /* >>> + * If the hrtimer broadcast check tells us that the >>> + * cpu cannot go deep idle, or if the broadcast device >>> + * is in periodic mode, we just return. >>> + */ >>> + if (ret || tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC) >>> + goto out; >> >> The check on PERIODIC mode is good, but I don't see the point of moving >> broadcast_needs_cpu() up above. broadcast_shutdown_local() calls >> broadcast_needs_cpu() internally. >> >> Besides, by jumping to 'out', we will miss programming the broadcast >> hrtimer in tick_broadcast_set_event() below, if the cpu happen to be the >> broadcast cpu(which is why it was not allowed to go to deep idle). > > Hmm. Need to think a bit more about this convoluted maze ... I think you cover all cases just by having that check on periodic mode. This covers the nohz_full=n,highres=n, TICK_ONESHOT=y and GENERIC_CLOCKEVENTS_BROADCAST=y. broadcast_needs_cpu() should remain where it was though. And of course, the additional patch on tick_broadcast_device.evtdev == NULL in BROADCAST_ON. Regards Preeti U Murthy > -- 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/