* [PATCH 4/6] taskstats_tgid_alloc: optimization
@ 2006-10-26 23:21 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2006-10-26 23:21 UTC (permalink / raw)
To: Andrew Morton; +Cc: Shailabh Nagar, Balbir Singh, Jay Lan, linux-kernel
Every subthread (except first) does unneeded kmem_cache_alloc/kmem_cache_free.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- STATS/include/linux/taskstats_kern.h~4_alloc 2006-10-27 01:28:31.000000000 +0400
+++ STATS/include/linux/taskstats_kern.h 2006-10-27 01:39:10.000000000 +0400
@@ -32,6 +32,9 @@ static inline void taskstats_tgid_alloc(
struct taskstats *stats;
unsigned long flags;
+ if (sig->stats != NULL)
+ return;
+
stats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL);
if (!stats)
return;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-26 23:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-26 23:21 [PATCH 4/6] taskstats_tgid_alloc: optimization Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox