* Re: [PATCH][TRIVIAL] Allocate kprobe_table at runtime [not found] ` <20050627055150.GA10659@in.ibm.com.suse.lists.linux.kernel> @ 2005-06-27 6:14 ` Andi Kleen 2005-06-27 13:01 ` [PATCH v2][TRIVIAL] " Jeff Sipek 0 siblings, 1 reply; 3+ messages in thread From: Andi Kleen @ 2005-06-27 6:14 UTC (permalink / raw) To: Prasanna S Panchamukhi; +Cc: jeffpc, linux-kernel Prasanna S Panchamukhi <prasanna@in.ibm.com> writes: > Jeff, > > On Sun, Jun 26, 2005 at 06:37:29PM +0000, Jeff Sipek wrote: > > Allocates kprobe_table at runtime. > > - /* FIXME allocate the probe table, currently defined statically */ > > + kprobe_table = kmalloc(sizeof(struct hlist_head)*KPROBE_TABLE_SIZE, GFP_ATOMIC); > > Memory allocation using GFP_KERNEL has more chances of success as compared to > GFP_ATOMIC. Why can't we use GFP_KERNEL here? I don't see any sense in the change anyways. Just using BSS should be fine. Jeff, when you submit a patch you should add a small blurb describing why you think it is a good idea. -Andi ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2][TRIVIAL] Allocate kprobe_table at runtime 2005-06-27 6:14 ` [PATCH][TRIVIAL] Allocate kprobe_table at runtime Andi Kleen @ 2005-06-27 13:01 ` Jeff Sipek 2005-06-27 19:52 ` Luca Falavigna 0 siblings, 1 reply; 3+ messages in thread From: Jeff Sipek @ 2005-06-27 13:01 UTC (permalink / raw) To: Andi Kleen; +Cc: Prasanna S Panchamukhi, linux-kernel, trivial [-- Attachment #1: Type: text/plain, Size: 1420 bytes --] On Mon, Jun 27, 2005 at 08:14:12AM +0200, Andi Kleen wrote: > Prasanna S Panchamukhi <prasanna@in.ibm.com> writes: > > > Jeff, > > > > On Sun, Jun 26, 2005 at 06:37:29PM +0000, Jeff Sipek wrote: > > > Allocates kprobe_table at runtime. > > > - /* FIXME allocate the probe table, currently defined statically */ > > > + kprobe_table = kmalloc(sizeof(struct hlist_head)*KPROBE_TABLE_SIZE, GFP_ATOMIC); > > > > Memory allocation using GFP_KERNEL has more chances of success as compared to > > GFP_ATOMIC. Why can't we use GFP_KERNEL here? > > I don't see any sense in the change anyways. Just using BSS > should be fine. > > Jeff, when you submit a patch you should add a small blurb > describing why you think it is a good idea. That patch was somewhat impulsive...I was looking at some code and saw a FIXME that required minimal work. I agree that BSS is good enough. Patch below removes the FIXME notice. Pick one ;-) (Patch Monkey is CC'd). Jeff. Remove useless FIXME. Signed-off-by: Josef "Jeff" Sipek diff --git a/kernel/kprobes.c b/kernel/kprobes.c --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -261,7 +261,6 @@ static int __init init_kprobes(void) { int i, err = 0; - /* FIXME allocate the probe table, currently defined statically */ /* initialize all list heads */ for (i = 0; i < KPROBE_TABLE_SIZE; i++) INIT_HLIST_HEAD(&kprobe_table[i]); [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2][TRIVIAL] Allocate kprobe_table at runtime 2005-06-27 13:01 ` [PATCH v2][TRIVIAL] " Jeff Sipek @ 2005-06-27 19:52 ` Luca Falavigna 0 siblings, 0 replies; 3+ messages in thread From: Luca Falavigna @ 2005-06-27 19:52 UTC (permalink / raw) To: Jeff Sipek; +Cc: Andi Kleen, Prasanna S Panchamukhi, linux-kernel, trivial -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > I agree that BSS is good enough. Alternatively, you can implement dynamic allocation of each element of kprobe_table in register_kprobe function. You will be able to free them by calling unregister_kprobe function later on. Regards, - -- Luca -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQEVAwUBQsBY/8zkDT3RfMB6AQJBGQf+PUMdOIpAfq4Q5lI77P7uSx1vdq2905Dp UwowzJpBLhQoZWI94xmhp7zx2unu5IqKBoXl62sjqOLgT9/K417ReEKFKfN3SSex shtulBOFxHfimNZX1mYhtmgJxKMU3jb3jyjXQg4oufL15Khl5PqkIxWewcVGB8LB bciH1242moxl7jKmEJXqm8IU4ZezOpfRoBYnvaxVrr1zL/zQzUgISgBfb2GkYpSP ErXg+w8ggUJ/TDlkZyGjT1OmjhLmb1ekYxzUE/K+dYnP5GGC/sGx5t/YgLxiKXjL nfNM7oF8qP43eArFmbQlUpMAXpkCWOGr7v5Ifcq8hJRfo99B9GL5uA== =fBGJ -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-06-28 17:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20050626183049.GA22898@optonline.net.suse.lists.linux.kernel>
[not found] ` <20050627055150.GA10659@in.ibm.com.suse.lists.linux.kernel>
2005-06-27 6:14 ` [PATCH][TRIVIAL] Allocate kprobe_table at runtime Andi Kleen
2005-06-27 13:01 ` [PATCH v2][TRIVIAL] " Jeff Sipek
2005-06-27 19:52 ` Luca Falavigna
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox