linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Guilherme Carvalho <gaqc@feop.com.br>
To: linux-mm@kvack.org
Subject: Idea to improve the performance of the Kernel Memory Allocation
Date: Sun, 14 May 2000 23:34:45 -0300	[thread overview]
Message-ID: <391F6245.7D543933@feop.com.br> (raw)

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

Hi,

I had an idea to improve the performance of the Kernel Memory
Allocation...
If I am right, the buddy allocation algorithm first searches for blocks
of pages of the size requested and follows the chain of free pages that
is queued on the list element of the the free_area data structure. If no
blocks of pages of the requested size are free, blocks of the next size
are looked for...

free_area:
|  4096  | -> |  8  | -> | 1024  | -> | 8192  | -> | 2  | -> | 4  | -> |
2  | -> | 256  | -> | 512  | -> | 4  | -> | 8  | -> | 16  | ->

in this case, if we request 32 pages, the algorithm will scan the chain
4 times to find the right block.
I think this chain isn't the best structure to do it.

the idea is to make a tree of chains as it is in the attach
(arv-list.jpg).
this tree should be an AVL tree for better performance.

Each element of the tree would be an chain
Each element of the chain would be

Struct free_area_struct {
 struct page *next;
 struct page *prev;                //      <- Free area element
 unsigned int *map;
 unsigned long count;
// +
struct page *next_in_chain;       //     <- pointer to the next free
area with the same size
 };

the old pointers would remain because the deallocation process need
them, to recombine them in larger blocks.

I am a linux code beginner, so I don't know how to put it on linux (and
keep it working too).
Are Anyone interested in try it?

Guilherme Carvalho

[-- Attachment #2: arv-list.jpg --]
[-- Type: image/jpeg, Size: 21036 bytes --]

             reply	other threads:[~2000-05-15  2:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-15  2:34 Guilherme Carvalho [this message]
2000-05-15 12:39 ` Stephen C. Tweedie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=391F6245.7D543933@feop.com.br \
    --to=gaqc@feop.com.br \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox