Page 1 of 1

Just a very quick question about paging of linux

Posted: Wed Sep 30, 2020 8:31 am
by clementttttttttt
Did Linux identity mapped the pages to the whole memory(paging)?

Re: Just a very quick question about paging of linux

Posted: Wed Sep 30, 2020 8:44 am
by nullplan
That terse question deserves an equally terse answer: No.

At least, if I understand your horribly phrased question right. Linux does not, in fact, identity map anything, except maybe a trampoline on boot up. That will then get mapped out.

Re: Just a very quick question about paging of linux

Posted: Wed Sep 30, 2020 10:38 am
by bzt
clementttttttttt wrote:Did Linux identity mapped the pages to the whole memory(paging)?
Original Linux identity mapped the first 8M (all the RAM Linus had) during boot. See head.s.
Then as tasks were started, the mm replaced the identity mapping with per-task mappings.

Cheers,
bzt

Re: Just a very quick question about paging of linux

Posted: Wed Sep 30, 2020 10:48 am
by sj95126
bzt wrote:
clementttttttttt wrote:Did Linux identity mapped the pages to the whole memory(paging)?
Original Linux identity mapped the first 8M (all the RAM Linus had) during boot. See head.s.
And by the way, this technique wasn't just used in the very early versions (the link goes to the original release 0.0.1). 2.x kernels continued to do this in the kernel bootstrap code.