From: Andrew Morton <akpm@osdl.org>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: linux-kernel@vger.kernel.org, mikpe@csd.uu.se
Subject: Re: [PATCH][1/6] perfctr-2.7.3 for 2.6.7-rc1-mm1: core
Date: Tue, 22 Jun 2004 12:18:05 -0700 [thread overview]
Message-ID: <20040622121805.7c5873a8.akpm@osdl.org> (raw)
In-Reply-To: <16600.14436.344871.168096@alkaid.it.uu.se>
Mikael Pettersson <mikpe@csd.uu.se> wrote:
>
> Andrew Morton writes:
> > Random points:
> >
> >
> > - In __vperfctr_set_cpus_allowed(), is it possible for a process to
> > generate that printk deliberately, thus spamming the logs?
>
> On a HT P4, yes that's possible. Should I put in a rate limit?
Spose so - __printk_ratelimit(). Or simply turn the message off until the
next reboot.
> > - perfctr_set_cpus_allowed() does task_lock(). Should that be
> > vperfctr_task_lock() instead?
>
> vperfctr_task_lock() _is_ task_lock() when HT P4s are possible.
I know. I was asking whether that could should have used the macro rather
than open-coding the task_lock(). Whatever.
> > Please update the locking comment over task_lock() to represent this
> > new usage.
>
> You mean add a comment there to the effect that set_cpus_allowed()
> may do a task_lock()?
That comment describes what data structures are protected by task_lock().
If you're aware of missing info or if you're protecting new data via
task_lock(), please update the comment.
> > - Why does sys_vperfctr_open() call ptrace_check_attach()? (I suspect
> > I'd know that if there was API documentation?)
>
> In the remote-control case, we must check that the opening process
> has the right to control the target process. I'm using the same
> rules as ptrace(ATTACH) does, hence the ptrace_check_attach() call.
OK. The term "remote control" has not been defined by you, so I'm to
assume that it refers to one process initiating perfctr instrumentation
against another, in some fashion. Please feel my minor frustration ;)
> > These big structures should be dynamically allocated.
>
> There's room for a temp copy in the perfctr state object, which as
> you've noticed is an entire page. That should reduce stack usage.
hm, not sure I understand that, but whatever. Please fix up the big stack
users, especially those which do copy_*_user, or non-atomic memory
allocations.
next prev parent reply other threads:[~2004-06-22 19:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-31 22:18 Mikael Pettersson
2004-06-22 8:53 ` Andrew Morton
2004-06-22 8:59 ` Christoph Hellwig
2004-06-22 9:04 ` Andrew Morton
2004-06-22 9:12 ` Christoph Hellwig
2004-06-22 9:14 ` Andrew Morton
2004-06-22 9:18 ` Christoph Hellwig
2004-06-22 9:20 ` Andrew Morton
2004-06-22 14:38 ` Mikael Pettersson
2004-06-22 17:20 ` Christoph Hellwig
2004-06-22 20:35 ` Mikael Pettersson
2004-06-22 13:47 ` Mikael Pettersson
2004-06-22 19:18 ` Andrew Morton [this message]
2004-06-22 13:59 ` Mikael Pettersson
2004-06-22 19:22 ` Andrew Morton
[not found] <223si-461-9@gated-at.bofh.it>
[not found] ` <29Piu-4H4-27@gated-at.bofh.it>
2004-06-22 10:21 ` Andi Kleen
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=20040622121805.7c5873a8.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®