From: Andrea Arcangeli <andrea@suse.de>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.rutgers.edu, quintela@fi.udc.es
Subject: Re: classzone-VM + mapped pages out of lru_cache
Date: Thu, 4 May 2000 12:00:23 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.21.0005041125050.664-100000@alpha.random> (raw)
In-Reply-To: <200005040042.RAA02046@pizda.ninka.net>
On Wed, 3 May 2000, David S. Miller wrote:
> Date: Wed, 3 May 2000 18:26:19 +0200 (CEST)
> From: Andrea Arcangeli <andrea@suse.de>
>
> ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.3/2.3.99-pre7-pre3/classzone-18.gz
>
>Btw, the path seem to be incorrect. It should be:
>
>/pub/linux/kernel/people/andrea/patches/v2.3/2.3.99-pre7-pre3/classzone-18.gz
>
>:-)
Correct, I'm sorry for the mistake. All single patches are in the
andrea/patches directory indeed.
>One note after initial study. I wish we could get rid of the
>"map_count" thing you added to the page struct. Currently, when
I understand your point. My only problem is that if we'll drop the
map_count then I must be allowed to say "map_count = page_count(page) -
1". That's definitely not always true (just look the middle of
shrink_mmap).
Then all the places that does __find_lock_page are non trivial and they
should all be audited and they would break if somebody won't be carefuul
about the dependency on the map count and page count. Also the msync path
increases the page count for a very minor reason: only to have a common
exit path for the invalidate case. That trick is currently sane since the
page count can be increased at any time for any reason as far as memory
doesn't leak but such trick breaks the invariant I would need to enforce
in order to drop map_count.
So I need further information anyway (the PageOutLru bitflag wouldn't be
enough either) and so I thought I can as well grab an integer for its
dedicated purpose.
The above are the only reasons that made me to add the map_count. I
preferred to not break the current relaxed page->count semantic and to
allow everybody to grab as many times they want the page_count as now, and
the page count will remain relevant only to the freelist, and it have no
meaning respect to the number of ptes where the page is mapped to.
Basically using page_count(page) for the map count seems a pain and
something we don't want to do as far I can see.
If you have clever idea on how to get rid of the map_count they will be
very appreciated indeed. Thanks.
>we turn off wait queue debugging, the page struct is an exact power
>of 2 on both 64-bit and 32-bit architectures. With the map_count
>there now, it will not be an exact power of two in size on 32-bit
>machines :-(
I seen the problem with 32bit archs since the first place (and the problem
is not only alignment but memory waste in general) but my argument here is
that we'd better choose to drop page->virtual if HIGHMEM is disabled (that
field is very less useful than map_count when HIGHMEM is disabled and so
it should go away from the binary image first IMHO ;-). (and page->virtual
should be dropped unconditionally on 64bit archs... even when HIGHMEM is
enabled)
On 64bit archs the map_count doesn't waste memory anyway because it gets
packeted in the same word with the 32bit page->count (both count and
map_count are 32bits wide) while the page->virtual instead waste lots of
memory even now on 64bit archs.
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-05-04 10:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-03 16:26 Andrea Arcangeli
2000-05-04 0:42 ` David S. Miller
2000-05-04 10:00 ` Andrea Arcangeli [this message]
2000-05-04 14:40 ` Juan J. Quintela
2000-05-04 15:19 ` Andrea Arcangeli
2000-05-04 15:23 ` Andrea Arcangeli
2000-05-04 15:38 ` Rik van Riel
2000-05-04 17:59 ` Andrea Arcangeli
2000-05-04 19:24 ` Rik van Riel
2000-05-04 16:34 ` Manfred Spraul, Andrea Arcangeli
2000-05-04 16:48 ` Trond Myklebust
2000-05-04 18:43 ` Andrea Arcangeli
2000-05-04 19:32 ` Trond Myklebust
2000-05-04 20:15 ` Andrea Arcangeli
2000-05-05 7:01 ` Trond Myklebust
2000-05-04 16:34 ` Juan J. Quintela
2000-05-04 18:27 ` Chris Evans
[not found] <3911ECCD.BA1BB24E@arcormail.de>
2000-05-04 23:44 ` Andrea Arcangeli
2000-05-05 0:03 ` Jens Axboe
2000-05-05 3:04 ` David S. Miller
2000-05-05 8:43 ` Russell King
2000-05-05 14:56 ` Andrea Arcangeli
2000-05-06 13:37 ` 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=Pine.LNX.4.21.0005041125050.664-100000@alpha.random \
--to=andrea@suse.de \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=quintela@fi.udc.es \
/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