From: Matt Helsley <matthltc@us.ibm.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>,
Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
Jean-Pierre Dion <jean-pierre.dion@bull.net>,
Guillaume Thouvenin <guillaume.thouvenin@bull.net>,
Badari Pulavarty <pbadari@us.ibm.com>,
Ram Pai <linuxram@us.ibm.com>,
CKRM-Tech <ckrm-tech@lists.sourceforge.net>,
Erich Focht <efocht@hpce.nec.com>,
elsa-devel <elsa-devel@lists.sourceforge.net>,
Gerrit Huizenga <gh@us.ibm.com>, Adrian Bunk <bunk@stusta.de>,
"Chandra S. Seetharaman" <sekharan@us.ibm.com>,
Jay Lan <jlan@engr.sgi.com>, Erik Jacobson <erikj@sgi.com>,
Jack Steiner <steiner@sgi.com>
Subject: Re: [PATCH] Process Events Connector
Date: Fri, 28 Oct 2005 03:03:18 -0700 [thread overview]
Message-ID: <1130493798.10680.750.camel@stark> (raw)
In-Reply-To: <1130491147.2800.15.camel@laptopd505.fenrus.org>
On Fri, 2005-10-28 at 11:19 +0200, Arjan van de Ven wrote:
> On Fri, 2005-10-28 at 01:55 -0700, Matt Helsley wrote:
>
> > +void proc_fork_connector(struct task_struct *task)
> > +{
> > + struct cn_msg *msg;
> > + struct proc_event *ev;
> > + __u8 buffer[CN_PROC_MSG_SIZE];
>
> do you really want to do this stack based?
cn_netlink_send() performs an skb_alloc() and I wanted to avoid doing
two allocations that might sleep.
On a 32-bit machine the buffer should be around 42 bytes, making the
function locals around 50 bytes. On a 64-bit machine I believe this
should be around 58 bytes. Is this generally considered to be too large?
These functions are called from:
fork:
-> do_fork -> copy_process -> proc_fork_connector -> ...
-> fork_idle (this holds a struct ptregs) -> copy_process ->
proc_fork_connector -> ...
exec:
-> do_execve -> search_binary_handler -> proc_exec_connector -> ...
id:
-> sys_set(r|e|s|fs)?[ug]id -> proc_id_connector -> ...
exit:
-> do_exit -> proc_exit_connector -> ...
Where "-> ..." signifies a call to cn_netlink_send(). So they should
only be a problem if a caller or cn_netlink_send() use too much stack
space.
Cheers,
-Matt Helsley
< matthltc @ us.ibm.com >
next prev parent reply other threads:[~2005-10-28 10:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 8:55 [PATCH] Process Events Connector Matt Helsley
2005-10-28 9:19 ` Arjan van de Ven
2005-10-28 10:03 ` Matt Helsley [this message]
2005-10-28 23:19 ` Matt Helsley
2005-10-28 23:56 ` Matt Helsley
2005-10-29 0:57 ` [ckrm-tech] " Matt Helsley
2005-10-29 10:19 ` Evgeniy Polyakov
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=1130493798.10680.750.camel@stark \
--to=matthltc@us.ibm.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=bunk@stusta.de \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=efocht@hpce.nec.com \
--cc=elsa-devel@lists.sourceforge.net \
--cc=erikj@sgi.com \
--cc=gh@us.ibm.com \
--cc=guillaume.thouvenin@bull.net \
--cc=jean-pierre.dion@bull.net \
--cc=jlan@engr.sgi.com \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxram@us.ibm.com \
--cc=pbadari@us.ibm.com \
--cc=sekharan@us.ibm.com \
--cc=steiner@sgi.com \
/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