Re: Ok, making ready for pre-2.4 and code-freeze..

Linus Torvalds (torvalds@transmeta.com)
Sun, 19 Dec 1999 20:21:01 -0800 (PST)


On Mon, 20 Dec 1999, Chris Wedgwood wrote:
>
> Perhaps I'm missing something -- but is this not a screwy API then for
> what is essentially a 64-bit mmap? Can we not pass a u_int64_t or
> something?

No.

Basically, I don't like "long long". I use it only when I absolutely
_have_ to, and we didn't have to in this case.

The kernel internally doesn't use "long long" values for the offset
anyway, so I didn't want to export a "long long" interface - especially as
that version would not have fit in the x86 registers.

> I know this sucks from many angles -- especially I register starved
> x86, but its not like your going to do this 100 times a second?

The shift from "long long" to a 32-bit "index" has to be done somewhere
anyway - the 32-bit index is the internal kernel way of doing things, and
makes perfect sense. So why not just do it in user space - that way people
who want to be clever CAN be clever (imagine a compiler that inlined the
shift and combined it with some other operation done on that argument).

The reason I don't like "long long" is that (a) gcc has historically had
tons of bugs in code generation for it and (b) it makes the generated code
impossible to read. The memory management is one of the areas where I
still =do= read the generated assembly every once in a while..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/