Bug 466702 - Memory usage research: checking in the experimental code
Memory usage research: checking in the experimental code
Product: 389
Classification: Community
Component: Directory Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Noriko Hosoi
Chandrasekar Kannan
Depends On:
Blocks: 249650
  Show dependency treegraph
Reported: 2008-10-12 21:22 EDT by Noriko Hosoi
Modified: 2015-01-04 18:34 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-01 13:09:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Files to be modified (1.97 KB, text/plain)
2008-10-13 16:15 EDT, Noriko Hosoi
no flags Details
cvs diffs of the modified files (147.24 KB, patch)
2008-10-13 16:19 EDT, Noriko Hosoi
no flags Details | Diff
New file: mempool.c (23.93 KB, text/plain)
2008-10-13 16:35 EDT, Noriko Hosoi
no flags Details
cvs commit message (comment #2,#3) (12.04 KB, text/plain)
2008-10-15 02:42 EDT, Noriko Hosoi
no flags Details

  None (edit)
Description Noriko Hosoi 2008-10-12 21:22:41 EDT
Summary of the memory research usage project:
Comment 1 Noriko Hosoi 2008-10-13 16:15:20 EDT
Created attachment 320224 [details]
Files to be modified
Comment 2 Noriko Hosoi 2008-10-13 16:19:50 EDT
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 16:35:10 EDT
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 
Comment 4 Noriko Hosoi 2008-10-15 02:42:42 EDT
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-05 20:01:24 EST
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;
                 PR_SetThreadPrivate (mempool_index, (void *)my_mempool);
Comment 6 Noriko Hosoi 2008-11-05 20:04:32 EST
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 Galipeau 2009-04-01 13:09:29 EDT
no need to verify - closing bug.

Note You need to log in before you can comment on or make changes to this bug.