* RE: Porting to from Solaris 64bit to Linux 32B - 36B.
@ 2002-11-20 17:36 Jon Goldberg
2002-11-20 18:31 ` Rik van Riel
0 siblings, 1 reply; 4+ messages in thread
From: Jon Goldberg @ 2002-11-20 17:36 UTC (permalink / raw)
To: Andrew Morton, Rik van Riel; +Cc: linux-mm
Andrew,
Will that return a 64 bit offset pointer to the file or just let me map 3-4GB in a 10 BG file with a 64 bit offset pointer. What I would like to do is mmap the full 10GB file and walk it with a 64 bit pointer knowing that not more that 2GB can be in memory.
Thanks for all the help!
Jon
-----Original Message-----
From: Andrew Morton [mailto:akpm@digeo.com]
Sent: Wednesday, November 20, 2002 1:34 AM
To: Rik van Riel
Cc: Jon Goldberg; linux-mm@kvack.org
Subject: Re: Porting to from Solaris 64bit to Linux 32B - 36B.
Rik van Riel wrote:
>
> On Tue, 19 Nov 2002, Jon Goldberg wrote:
>
> > We are currently at porting to Linux 2.4 kernel and I am having
> > troubles finding information on VM. Since the 2.4 Kernel support large
> > amount of swap < 1TB and Physical Ram < 64GB. Is there a way to get
> > memory functions like mmap to use a 64 bit pointer instead of the 32bit
> > pointer. Since a memory mapped file the file is used as swap I should
> > be able to have it map a file larger than 4GB and have the OS do the
> > page management.
>
> No, this is not possible because of fundamental reasons.
>
I think he's asking "where is mmap64()"?
--
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Porting to from Solaris 64bit to Linux 32B - 36B.
2002-11-20 17:36 Porting to from Solaris 64bit to Linux 32B - 36B Jon Goldberg
@ 2002-11-20 18:31 ` Rik van Riel
0 siblings, 0 replies; 4+ messages in thread
From: Rik van Riel @ 2002-11-20 18:31 UTC (permalink / raw)
To: Jon Goldberg; +Cc: Andrew Morton, linux-mm
On Wed, 20 Nov 2002, Jon Goldberg wrote:
> Will that return a 64 bit offset pointer to the file or just let
> me map 3-4GB in a 10 BG file with a 64 bit offset pointer. What I would
> like to do is mmap the full 10GB file and walk it with a 64 bit pointer
> knowing that not more that 2GB can be in memory.
How exactly do you think the mythical mmap64() would ever work
on 32 bit machines ?
It is impossible to map 10 GB of file into 2-3 GB of virtual
address space.
Maybe there is a userspace library to emulate things with (slow)
64 bit pointers, etc... but it is fundamentally impossible to do
in kernel space.
regards,
Rik
--
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/ http://guru.conectiva.com/
Current spamtrap: <a href=mailto:"october@surriel.com">october@surriel.com</a>
--
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Porting to from Solaris 64bit to Linux 32B - 36B.
2002-11-20 0:24 ` Rik van Riel
@ 2002-11-20 8:33 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2002-11-20 8:33 UTC (permalink / raw)
To: Rik van Riel; +Cc: Jon Goldberg, linux-mm
Rik van Riel wrote:
>
> On Tue, 19 Nov 2002, Jon Goldberg wrote:
>
> > We are currently at porting to Linux 2.4 kernel and I am having
> > troubles finding information on VM. Since the 2.4 Kernel support large
> > amount of swap < 1TB and Physical Ram < 64GB. Is there a way to get
> > memory functions like mmap to use a 64 bit pointer instead of the 32bit
> > pointer. Since a memory mapped file the file is used as swap I should
> > be able to have it map a file larger than 4GB and have the OS do the
> > page management.
>
> No, this is not possible because of fundamental reasons.
>
I think he's asking "where is mmap64()"?
--
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Porting to from Solaris 64bit to Linux 32B - 36B.
[not found] <C5BF7C2C6ADF24448763CC46235FB3A691C82E@ulysses.neocore.com>
@ 2002-11-20 0:24 ` Rik van Riel
2002-11-20 8:33 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Rik van Riel @ 2002-11-20 0:24 UTC (permalink / raw)
To: Jon Goldberg; +Cc: linux-mm
On Tue, 19 Nov 2002, Jon Goldberg wrote:
> We are currently at porting to Linux 2.4 kernel and I am having
> troubles finding information on VM. Since the 2.4 Kernel support large
> amount of swap < 1TB and Physical Ram < 64GB. Is there a way to get
> memory functions like mmap to use a 64 bit pointer instead of the 32bit
> pointer. Since a memory mapped file the file is used as swap I should
> be able to have it map a file larger than 4GB and have the OS do the
> page management.
No, this is not possible because of fundamental reasons.
Every page of virtual address space (3 GB, or .75 million pages)
can point to exactly 1 page in the file. This means that you
cannot map more than 3 GB of file into a process and have the
kernel do "automatic switching", since the kernel has no way to
know which page the process wants to access.
The only way to work around that is to map/unmap by hand from
your process.
> Is there a way of doing this in i386 or i686 version of kernel or do I
> have run Linux on IA-64 or other 64-bit chips to do this?
If you really want to map in more than 3 GB at once, you will
need to use a 64-bit architecture.
regards,
Rik
--
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/ http://guru.conectiva.com/
Current spamtrap: <a href=mailto:"october@surriel.com">october@surriel.com</a>
--
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-20 18:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 17:36 Porting to from Solaris 64bit to Linux 32B - 36B Jon Goldberg
2002-11-20 18:31 ` Rik van Riel
[not found] <C5BF7C2C6ADF24448763CC46235FB3A691C82E@ulysses.neocore.com>
2002-11-20 0:24 ` Rik van Riel
2002-11-20 8:33 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox