Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 466702

Summary: Memory usage research: checking in the experimental code
Product: [Retired] 389 Reporter: Noriko Hosoi <nhosoi>
Component: Directory ServerAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED NOTABUG QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.1.3CC: benl, jgalipea, nkinder, rmeggins
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-01 17:09:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 249650    
Attachments:
Description Flags
Files to be modified
none
cvs diffs of the modified files
none
New file: mempool.c
none
cvs commit message (comment #2,#3) none

Description Noriko Hosoi 2008-10-13 01:22:41 UTC
Summary of the memory research usage project:
http://directory.fedoraproject.org/wiki/Memory_Usage_Research

Comment 1 Noriko Hosoi 2008-10-13 20:15:20 UTC
Created attachment 320224 [details]
Files to be modified

Comment 2 Noriko Hosoi 2008-10-13 20:19:50 UTC
Created attachment 320225 [details]
cvs diffs of the modified files

Change description:
. replaced malloc, calloc, realloc, strdup and free with the corresponding function implemented in ch_malloc.c
. mempool experimental code is added in #ifdef MEMPOOL_EXPERIMENTAL.

Tested on F-9 and RHEL4.

Comment 3 Noriko Hosoi 2008-10-13 20:35:10 UTC
Created attachment 320226 [details]
New file: mempool.c

The file mempool.c contains the mempool implementation and modified slapi_ch_* functions. Currently, all the contents of the file is in ifdef MEMPOOL_EXPERIMENTAL.  Also, the file is not supposed to put in Makefile.am.  (The code is compilable and the works as a standalone server.  See also http://directory.fedoraproject.org/wiki/Memory_Usage_Research#Issues.2FLeftovers)

Description of slapi_ch_* and mempool functions:
"2. Per thread memory pool combined with slapd malloc functions" in 
http://directory.fedoraproject.org/wiki/Memory_Usage_Research#Experiments:_modification_made_on_the_server

Comment 4 Noriko Hosoi 2008-10-15 06:42:42 UTC
Created attachment 320393 [details]
cvs commit message (comment #2,#3)

Reviewed by Nathan and Rich (Thank you!!!)

Checked in into CVS HEAD.

Comment 5 Noriko Hosoi 2008-11-06 01:01:24 UTC
Somehow, one line was missing...

Index: mempool.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/mempool.c,v
retrieving revision 1.1
diff -t -w -U 4 -r1.1 mempool.c
--- mempool.c	15 Oct 2008 06:30:05 -0000	1.1
+++ mempool.c	6 Nov 2008 00:59:54 -0000
@@ -233,8 +233,9 @@
         maxfreelist = config_get_mempool_maxfreelist();
         if ((maxfreelist > 0) && (my_mempool[type].mempool_count > maxfreelist)) {
                 return LDAP_UNWILLING_TO_PERFORM;
         } else {
+                ((struct mempool_object *)object)->mempool_next = mempool[type].mempool_head;
                 my_mempool[type].mempool_head = (struct mempool_object *)object;
                 my_mempool[type].mempool_cleanup_fn = cleanup;
                 my_mempool[type].mempool_count++;
                 PR_SetThreadPrivate (mempool_index, (void *)my_mempool);

Comment 6 Noriko Hosoi 2008-11-06 01:04:32 UTC
Note: since the code I checked in is purely experimental and there is no way to build unless manually modify the build files, there is no need to be verified.

Comment 7 Jenny Severance 2009-04-01 17:09:29 UTC
no need to verify - closing bug.