All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zaitsev <pz@spylog.ru>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Andrea Arcangeli <andrea@suse.de>,
	Andrew Morton <akpm@zip.com.au>,
	theowl@freemail.c3.hu, <theowl@freemail.hu>,
	<linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@transmeta.com>
Subject: Re[3]: your mail on mmap() to the kernel list
Date: Wed, 5 Dec 2001 17:36:45 +0300	[thread overview]
Message-ID: <19181290892.20011205173645@spylog.ru> (raw)
In-Reply-To: <Pine.LNX.4.33L.0112041439210.4079-100000@imladris.surriel.com>
In-Reply-To: <Pine.LNX.4.33L.0112041439210.4079-100000@imladris.surriel.com>

Hello Rik,

Tuesday, December 04, 2001, 7:42:28 PM, you wrote:


>> Well. Really you can't do this, because you can not really track all of
>> the mappings in user program as glibc and probably other libraries
>> use mmap for their purposes.

RvR> There's no reason we couldn't do this hint in kernel space.

Yes. This cache will probably give a good hit rate. It of course does
not decrease mathematical complexity but speeding the things up couple
of times is good anyway :)

RvR> In arch_get_unmapped_area we can simply keep track of the
RvR> lowest address where we found free space, while on munmap()
RvR> we can adjust this hint if needed.

RvR> OTOH, I doubt it would help real-world workloads where the
RvR> application maps and unmaps areas of different sizes and
RvR> actually does something with the memory instead of just
RvR> mapping and unmapping it ;)))


Well this is quite simple I think. Database may use mmap to access the
data in files, as you can't map everything to 32bit address space you
will have to map just parts of the files, therefore as you can't have
to much mapped chunks you will have different chunk sizes to merge
continuos mmaped areas. Other thing some databases support different
physical page sizes so this will be true even without merging.

One more thing: fread at least in some cases does mmap of the file -
so if you use it aggressively you will get in the problem.

Anyway in most cases even then mmaped chunks are different sizes most
of them should be around the same size in the most cases.





-- 
Best regards,
 Peter                            mailto:pz@spylog.ru


  parent reply	other threads:[~2001-12-05 14:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C082244.8587.80EF082@localhost>
2001-12-01  8:31 ` Re[2]: your mail on mmap() to the kernel list Peter Zaitsev
2001-12-01  9:37   ` Andrew Morton
2001-12-02 23:07     ` Re[2]: " Peter Zaitsev
2001-12-02 23:34       ` Andrew Morton
2001-12-03 10:10         ` Re[2]: " Peter Zaitsev
2001-12-04 14:18         ` Andrea Arcangeli
2001-12-04 14:15     ` Andrea Arcangeli
2001-12-04 15:36       ` Re[2]: " Peter Zaitsev
2001-12-04 16:42         ` Rik van Riel
2001-12-04 16:55           ` Andrea Arcangeli
2001-12-05 14:38             ` Re[2]: " Peter Zaitsev
2001-12-05 14:36           ` Peter Zaitsev [this message]
2001-12-04 16:48         ` Andrea Arcangeli
2001-12-05 16:12           ` Re[2]: " Peter Zaitsev
2001-12-05 16:23             ` Andrea Arcangeli

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=19181290892.20011205173645@spylog.ru \
    --to=pz@spylog.ru \
    --cc=akpm@zip.com.au \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    --cc=theowl@freemail.c3.hu \
    --cc=theowl@freemail.hu \
    --cc=torvalds@transmeta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.