Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932190AbVIGSWx (ORCPT ); Wed, 7 Sep 2005 14:22:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932183AbVIGSWx (ORCPT ); Wed, 7 Sep 2005 14:22:53 -0400 Received: from e6.ny.us.ibm.com ([32.97.182.146]:45720 "EHLO e6.ny.us.ibm.com") by vger.kernel.org with ESMTP id S932190AbVIGSWw (ORCPT ); Wed, 7 Sep 2005 14:22:52 -0400 Date: Wed, 7 Sep 2005 11:22:48 -0700 From: Nishanth Aravamudan To: Srivatsa Vaddagiri Cc: Tony Lindgren , Con Kolivas , linux-kernel@vger.kernel.org, akpm@osdl.org, ck list , rmk+lkml@arm.linux.org.uk, schwidefsky@de.ibm.com Subject: Re: [PATCH 1/3] dynticks - implement no idle hz for x86 Message-ID: <20050907182248.GF22849@us.ibm.com> References: <20050905053225.GA4294@in.ibm.com> <20050905054813.GC25856@us.ibm.com> <20050905063229.GB4294@in.ibm.com> <20050905064416.GD25856@us.ibm.com> <20050906205112.GA3038@us.ibm.com> <20050907081303.GC5804@atomide.com> <20050907155352.GD4590@us.ibm.com> <20050907170703.GA28387@in.ibm.com> <20050907172315.GB22849@us.ibm.com> <20050907181445.GD28387@in.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050907181445.GD28387@in.ibm.com> X-Operating-System: Linux 2.6.13 (i686) User-Agent: Mutt/1.5.10i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4072 Lines: 94 On 07.09.2005 [23:44:45 +0530], Srivatsa Vaddagiri wrote: > On Wed, Sep 07, 2005 at 10:23:15AM -0700, Nishanth Aravamudan wrote: > > > > #define DYN_TICK_MIN_SKIP 2 > > > > Another point. Why is this 2? I guess if you're going to make it 2, why > > bother defining/checking it at all? > > I think that should be arch-specific. Yes, I agree, will perhaps add a min_skip member to the structure. > > > > void (*disable_dyn_tick) (void); > > > > unsigned long (*reprogram) (unsigned long); /* return number of ticks skipped */ > > > > > > How will it be able to return the number of ticks skipped? Or are you > > > referring to max_skip here? > > > > Yes, maybe this can be a void function... I was thinking more along the > > lines of you can send whatever request you want to reprogram(), it does > > what it can with the request (cuts it short if too long, ignores it if > > too short) and then returns what it actually did. > > Looks fine in that case to have a non-void return. Ok, I agree. > > > In x86-like architectures, there can be multiple ticksources that can > > > be simultaneously active - ex: APIC and PIT. So one > > > "current_ticksource" doesnt capture that fact? > > > > Not really, though, right? Only one is registered to do the timer > > callbacks? > > True. Thanks for confirming, I wasn't sure if that was the case or not. > > So, for x86, if you use the PIT ticksource, you only need to > > be PIT aware, but if you use the APIC ticksource, then it needs to be > > aware of the APIC and PIT (I believe you mentioned they are tied to each > > other), but that's ticksource-specific. CMIIW, though, please. > > I was going more by what meaning 'current_ticksource' may give - from > a pure "ticksource" perspective, both (PIT/APIC) are tick sources! > Thats why current_ticksource may not be a good term. Ah, true. maybe current_dyn_tick_source or something to that effect? Because there should only be one dyn_tick_timer, yes? > > Maybe you are right. I don't like having a separate struct for the > > state, though, and the dyn_tick_timer struct doesn't have a > > recover_time() style member. If you look closely, my structure is > > I agree we can remove the separate struct for state and have > recover_time member. Although in x86, it may have to be a wrapper > around mark_offset() since mark_offset does not recover time > completely (it expect the callee to recover one remaining tick). Yes, certainly, in fact, I think some of these functions may provide impetus to eventually clean up other code. > > basically exactly what the x86 work has, just some different names > > (don't need arch_ prefix, for instance, because it's clearly > > dyn_tick_timer specific, etc.) I also would like to hear from the s390 > > folks about their issues/opinions. > > Martin Schwidefsky (whom I have CC'ed) may be the person who can comment on > behalf of s390. Thanks, I forwarded him the first plan I submitted a few days ago, but didn't add him to the Cc. > > Yes, true. I'm wondering, do we need to make the > > current_ticksource/current_dyn_tick_timer per-CPU? I am just wondering > > how to gracefully handle the SMP case. Or is that not a problem? > > I don't see that current_ticksource/current_dyn_tick_timer to be write-heavy. > In fact I see them to be initialied during bootup and after that mostly > read-only. That may not warrant a per-CPU structure. I meant more for making sure we can manage that one CPU may have access to the PIT, but others may not (CPU0)? More along the lines of diverse h/w setups where perhaps the HPET is tied to one chip, but not the other. So, actually different hardware per-cpu. If that can't be the case (at least not currently), then the nohz_mask and spin_lock is enough to guarantee we don't muck with cpus accidentally. Thanks, Nish - 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/