All of lore.kernel.org
 help / color / mirror / Atom feed
From: "K.Prasad" <prasad@linux.vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Li Zefan <lizf@cn.fujitsu.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Jan Kiszka <jan.kiszka@web.de>, Jiri Slaby <jirislaby@gmail.com>,
	Avi Kivity <avi@redhat.com>, Paul Mackerras <paulus@samba.org>,
	Mike Galbraith <efault@gmx.de>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	Paul Mundt <lethal@linux-sh.org>,
	Arjan van de Ven <arjan@linux.intel.com>
Subject: Re: [PATCH 5/7] hw-breakpoints: Rewrite the hw-breakpoints layer on top of perf events
Date: Mon, 16 Nov 2009 19:58:11 +0530	[thread overview]
Message-ID: <20091116142811.GA24341@in.ibm.com> (raw)
In-Reply-To: <20091112151947.GC5237@nowhere>

On Thu, Nov 12, 2009 at 04:19:52PM +0100, Frederic Weisbecker wrote:
> On Sun, Nov 08, 2009 at 11:01:07PM +0530, K.Prasad wrote:
> > 
> > A few more observations....
> > 
> > int reserve_bp_slot(struct perf_event *bp)
> > {
> > ...
> > ....
> > 	if (!bp->attr.pinned) {
> > 		/*
> > 		 * If there are already flexible counters here,
> > 		 * there is at least one slot reserved for all
> > 		 * of them. Just join the party.
> > 		 *
> > 		 * Otherwise, check there is at least one free slot
> > 		 */
> > 		if (!slots.flexible && slots.pinned == HBP_NUM) {
> > 			ret = -ENOSPC;
> > 			goto end;
> > 		}
> > 
> > 	/* Flexible counters need to keep at least one slot */
> > 	} else if (slots.pinned + (!!slots.flexible) == HBP_NUM) {
> > 		ret = -ENOSPC;
> > 		goto end;
> > 	}
> > ..
> > ...
> > }
> > 
> > It appears that you're reserving one slot for the non-pinned breakpoint
> > requests, which I'm afraid wouldn't play well with PPC64 (having one
> > DABR).
> 
> I don't understand what you mean. PPC64 has only one DABR, or...?
> 

Yes, PPC64 has just one DABR. And so this scheme will allow the first
request (be it 'pinned' or 'unpinned') to use the debug register? Sounds
fine.

Thanks,
K.Prasad


  reply	other threads:[~2009-11-16 14:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06  2:28 [GIT PULL v5] hw-breakpoints: Rewrite on top of perf events v5 Frederic Weisbecker
2009-11-06  2:28 ` [PATCH 1/7] perf/core: Provide a kernel-internal interface to get to performance counters Frederic Weisbecker
2009-11-06  2:28 ` [PATCH 2/7] x86/hw-breakpoints: Actually flush thread breakpoints in flush_thread() Frederic Weisbecker
2009-11-06  2:28 ` [PATCH 3/7] perf/core: Add a callback to perf events Frederic Weisbecker
2009-11-06  2:28 ` [PATCH 4/7] hw-breakpoint: Move asm-generic/hw_breakpoint.h to linux/hw_breakpoint.h Frederic Weisbecker
2009-11-06  2:29 ` [PATCH 5/7] hw-breakpoints: Rewrite the hw-breakpoints layer on top of perf events Frederic Weisbecker
2009-11-08 17:31   ` K.Prasad
2009-11-12 15:19     ` Frederic Weisbecker
2009-11-16 14:28       ` K.Prasad [this message]
2009-11-17  1:40         ` Frederic Weisbecker
2009-11-06  2:29 ` [PATCH 6/7] hw-breakpoints: Arbitrate access to pmu following registers constraints Frederic Weisbecker
2009-11-06  2:41   ` [PATCH 6/7 v6] " Frederic Weisbecker
2009-11-06  2:29 ` [PATCH 7/7] ksym_tracer: Remove KSYM_SELFTEST_ENTRY Frederic Weisbecker
2009-11-08 17:29 ` [GIT PULL v5] hw-breakpoints: Rewrite on top of perf events v5 K.Prasad
2009-11-12 14:33   ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091116142811.GA24341@in.ibm.com \
    --to=prasad@linux.vnet.ibm.com \
    --cc=acme@redhat.com \
    --cc=arjan@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=efault@gmx.de \
    --cc=fweisbec@gmail.com \
    --cc=jan.kiszka@web.de \
    --cc=jirislaby@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.