Re: [patch 35/56] openmosix/openmosix-simplify-kcomd_thread-code.patch

Florian Delizy <[email protected]> Mon, 13 Nov 2006 16:10:12 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
Vincent Hanquez wrote:
> On Thu, Nov 02, 2006 at 10:56:53PM +0100, Florian Delizy wrote:
>   
>> Index: linux/hpc/kcomd.c
>> ===================================================================
>> --- linux.orig/hpc/kcomd.c	2006-11-02 22:52:22.000000000 +0100
>> +++ linux/hpc/kcomd.c	2006-11-02 22:52:24.000000000 +0100
>> @@ -424,6 +424,70 @@
>>  	return 0;
>>  }
>>  
>> +static void kcomd_thread_free_ressources(void);
>> +
>> +/**
>> + * kcomd_thread_initialize
>> + *
>> + * Description:
>> + *    initialize caches for kcomd_thread function
>> + **/
>> +
>> +static void kcomd_thread_initialize(void)
>> +{
>> +	kcom_data_cachep=kmem_cache_create("kcom_data_cache", 1024, 0, 0, NULL, NULL); /* for now help chase down memory leaks*/
>> +	kcom_pkt_cachep =kmem_cache_create("kcom_pkt_cache", sizeof(struct kcom_pkt), 0, 0, NULL, NULL);
>> +	kcom_task_cachep=kmem_cache_create("kcom_task_cache", sizeof(struct kcom_task), 0, 0, NULL, NULL);
>> +	kcom_node_cachep=kmem_cache_create("kcom_node_cache", sizeof(struct kcom_node), 0, 0, NULL, NULL);
>> +	/* kcom_saddr_cachep=kmem_cache_create("kcom_saddr_cache", sizeof(struct sockaddr), 0, 0, NULL, NULL);*/
>> +}
>>     
>
> I already told that thoses slab cache were unnecessary.
> allocated memory through kmalloc is fine for all thoses structures; the
> only structure that might benefit the slab is pkt. certainly not the
> others.
>   

Well, you probably told Matt, not me, (this is his code ... please do 
remember I only integrate kcomd and fix it ... ),

For packets they are of use yes, after reading the code, I agree that 
nodes, and thus sockaddrs are not created that often .... But I don't 
agree for tasks, in a high intensive task creation cluster, creating 
tasks from a slab would reduce memory fragmentation and speed up (ok, 
very little, but still...) the task creation/migration. I think it 
deserves it ...


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642