From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH, v2] reduce 'd' debug key's global impact Date: Thu, 6 May 2010 10:15:03 +0100 Message-ID: References: <4BE2A2FE020000780000186C@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4BE2A2FE020000780000186C@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 06/05/2010 10:07, "Jan Beulich" wrote: >>>> Keir Fraser 06.05.10 10:01 >>> >> Although I suppose the event-check vector has a cleaner interface for >> calling it and should be implemented for all architectures. If you add >> whatever new flag you need to irq_cpustat_t then it would be cheap to check, >> being a definite cache hit. I suppose each cpu would > > Actually, in smp_event_check_interrupt(), irq_cpustat isn't being used > so far, so placing the new field there wouldn't be a definite cache hit. > Instead (if that has to remain, which I doubt) co-locating it with > __irq_regs would help here. The most interesting exit path out of the handler via ret_from_intr will pass through test_all_events (because that indicates a busy CPU running a guest, and in that case we are most likely to have interrupted guest context). In that case we pull in the irqstat cacheline to check softirq_pending. Other exit paths indicate idle CPU (don't care so much about that) or interrupted hypervisor context (should be rarer than running in guest context for a non-idle CPU). > Otoh it seems like I will should add irq_enter()/irq_exit() now that the > function calls something non-trivial... Yes, most definitely. They are cheap and should be added unconditionally to the handler if you go this route. -- Keir