Re: 2G file size limitation question

Linus Torvalds (torvalds@transmeta.com)
7 Jan 1998 23:43:58 GMT


In article <199801072004.PAA29820@dcl.MIT.EDU>,
Theodore Y. Ts'o <tytso@MIT.EDU> wrote:
>
>It would require massive restructuring of the virtual memory management
>layer for the i386, since file I/O is done through the page cache, which
>also has the 32 bit limitation.

Actually, this isn't really a major problem. The page cache has a
32-bit byte offset field, but it could easily be made a 32-bit "sector"
offset, for example, giving you 41 bits to play with. It could also be
a 32-bit "page" offset, at which time you have 44 bits covered, but then
you couldn't do 1kB-aligned file mappings any more (and those are used
by some older binary formats).

>Gnu libc fortunately already has made provision for a larger off_t, so
>the main issue is the VM layer.

If that is really the main issue then we have no problems at all. By
the time 44 bits is a problem for files I sincerely hope that we can
ditch the old 32-bit architecture. All of these things are so much
easier on a 64-bit machine.

Linus