linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: What to expect with the 2.6 VM
Date: Wed, 2 Jul 2003 19:11:59 +0200	[thread overview]
Message-ID: <20030702171159.GG23578@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.53.0307021641560.11264@skynet>

On Wed, Jul 02, 2003 at 04:57:27PM +0100, Mel Gorman wrote:
>    The second reason is avoiding the poor linear search algorithm used by
>    get_unmapped_area() when looking for a large free virtual area. With a
>    large number of mappings, this search is very expensive. It has been

this is true too. however get_unmapped_area never need to find a new
place for the granular usages since mmap is always called with MAP_FIXED for
those.

>    proposed to alter the function to perform a tree based search. This could
>    be a tree of free areas ordered by size for example but none has yet been

it can't be trivially a tree of free areas or (if naturally indexed with
the size of the hole) it would return the smallest-fitting hole, not the
leftmost-smallest-fitting-hole ;). A better solution is possible. Then
everybody will benefit w/o need of userspace changes. It's still pretty
orthogonal with remap_file_pages though.

>    implemented. In the meantime, non-linear mappings are being used to bypass
>    the VM.
> 
>    The third reason is related to frequent page faults associated with linear
>    mappings. A non-linear mapping is able to prefault in all pages that are
>    required by the mapping as it is presumed they will be needed very soon.
>    To some extent, this can be addressed by specifying the MAP_POPULATE when
>    calling mmap() for a normal mapping.

mlock already does it too.

>    This feature has a very serious drawback. The system calls truncate() and
>    mincore() are broken with respect to non-linear mappings. Both calls
>    depend on vm_area_struct>vm_pgoff, which is the offset within
>    the mapped file, but the field is meaningless within a non-linear mapping.
>    This means that truncated files will still have mapped pages that no
>    longer have a physical backing. A number of possible solutions, such as
>    allowing the pages to exist but be anonymous and private to the process,
>    have been suggested but none implemented.

the major reason you didn't mention for remap_file_pages is the rmap
avoidance. There's no rmap backing the remap_file_pages regions, so the
overhead per task is reduced greatly and the box stops running oom
(actually deadlocking for mainline thanks to the oom killer and NOFAIL
default behaviour). since there's no rmap, this in turn means either
this nonlinear vma will swap badly, or it means rmap is totally useless
to swap well. Which in short means either rmap has to go in its current
form (and the usefulness of remap_file_pages would be greatly reduced),
or nonlinear mappings would better stay pinned in ram since they'd
better not be used for the emaulator with 63G of highmem into swap on a
1G host anyways (the sysctl would fix the security detail in pinning
into ram like we're doing today with the largepages in 2.4).

Andrea
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2003-07-02 17:11 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-01  1:39 Mel Gorman
2003-06-30 17:43 ` Daniel Phillips
2003-07-01 20:10   ` Martin J. Bligh
2003-07-01 21:41   ` Mel Gorman
2003-07-01 21:51     ` Davide Libenzi
2003-07-01 21:58     ` Martin J. Bligh
2003-07-02  9:01       ` Mel Gorman
2003-07-01  2:25 ` Andrea Arcangeli
2003-07-01  3:02   ` Andrew Morton
2003-07-01  3:22     ` Andrea Arcangeli
2003-07-01  3:25       ` Andrea Arcangeli
2003-07-01  3:29       ` Rik van Riel
2003-07-01  4:04         ` Andrea Arcangeli
2003-07-01 11:01     ` Hugh Dickins
2003-07-01  3:25   ` William Lee Irwin III
2003-07-01  4:39     ` Andrea Arcangeli
2003-07-01  6:33       ` William Lee Irwin III
2003-07-01  7:49         ` Andrea Arcangeli
2003-07-01  8:59           ` William Lee Irwin III
2003-07-01  9:27             ` Andrea Arcangeli
2003-07-01 14:24             ` Martin J. Bligh
2003-07-01 16:22               ` William Lee Irwin III
2003-07-01 17:54                 ` Martin J. Bligh
2003-07-02  3:04                   ` Andrea Arcangeli
2003-07-01 14:42           ` Martin J. Bligh
2003-07-01 21:45     ` Mel Gorman
2003-07-01 22:06       ` Martin J. Bligh
2003-07-01 21:46   ` Mel Gorman
2003-07-02  3:08     ` Andrea Arcangeli
2003-07-02 15:57   ` Mel Gorman
2003-07-02 17:11     ` Andrea Arcangeli [this message]
2003-07-02 17:10       ` Martin J. Bligh
2003-07-02 17:47         ` Andrea Arcangeli
2003-07-02 17:52           ` Martin J. Bligh
2003-07-02 18:13             ` Andrea Arcangeli
2003-07-02 18:05           ` Rik van Riel
2003-07-02 20:05             ` Martin J. Bligh
2003-07-02 21:40           ` William Lee Irwin III
2003-07-02 21:48             ` Martin J. Bligh
2003-07-02 22:14               ` William Lee Irwin III
2003-07-02 22:02             ` Andrea Arcangeli
2003-07-02 22:15               ` William Lee Irwin III
2003-07-02 22:26                 ` Andrea Arcangeli
2003-07-02 23:11                   ` William Lee Irwin III
2003-07-02 23:30                     ` Andrea Arcangeli
2003-07-02 23:55                       ` William Lee Irwin III
2003-07-03 11:31                         ` Andrea Arcangeli
2003-07-03 11:46                           ` William Lee Irwin III
2003-07-03 12:58                             ` Andrea Arcangeli
2003-07-03 13:06                               ` Rik van Riel
2003-07-03 13:48                                 ` Andrea Arcangeli
2003-07-03 18:53                                 ` William Lee Irwin III
2003-07-03 19:27                                   ` Andrea Arcangeli
2003-07-03 19:32                                     ` Rik van Riel
2003-07-03 20:16                                     ` William Lee Irwin III
2003-07-04  0:40                                       ` Andrea Arcangeli
2003-07-04  1:46                                         ` William Lee Irwin III
2003-07-04  2:34                                           ` Andrea Arcangeli
2003-07-04  4:10                                             ` William Lee Irwin III
2003-07-04  5:54                                               ` Andrea Arcangeli
2003-07-04  8:15                                                 ` William Lee Irwin III
2003-07-04 23:44                                                   ` Andrea Arcangeli
2003-07-05  0:05                                                     ` William Lee Irwin III
2003-07-05  0:08                                                       ` Andrea Arcangeli
2003-07-03 18:48                               ` Jamie Lokier
2003-07-03 18:54                                 ` William Lee Irwin III
2003-07-03 19:33                                   ` Andrea Arcangeli
2003-07-03 22:21                                     ` William Lee Irwin III
2003-07-04  0:46                                       ` Andrea Arcangeli
2003-07-04  1:33                                         ` Jamie Lokier
2003-07-04  1:36                                         ` William Lee Irwin III
2003-07-03 19:06                           ` Andrew Morton
2003-07-03 19:34                             ` Andrea Arcangeli
2003-07-02 18:07         ` Rik van Riel

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=20030702171159.GG23578@dualathlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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