Re: [PATCH v3 0/3] m68k/mm: switch from DISCONTIGMEM to SPARSEMEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mike,

On 23/08/20 8:06 PM, Mike Rapoport wrote:
20 kB more total memory with sparsemem. Less memory used when booting
to FastRAM, more used when booting to ST-RAM (checked right after boot
on an idle system). The latter probably isn't significant.
When booting to FastRAM we still discard ST-RAM and only use it as
device memory for the framebuffer. So the total memory map size will be
smaller.
Makes sense, but I was still surprised that replacing discontigmem by
sparsemem saves 20 kB regardless of whether or not ST-RAM is used.
The problem with sparse, however, is the memory wasted for empty memmap.
For example, if the section size is 16M and there is, say, 17M of
FastRAM, the memory map will be created for 32M. This means that there
will be 3840 unused 'struct page' objects. :(

No such thing as a free lunch - that would be a case for the 1G VM limit (which I admit, I did not test!)?

In my case, ST-RAM is 14 MB, so only half of the last 4 MB wasted. Note that the top of the 16 MB physical area is mapped by early kernel startup as noncacheable (hardware registers). I hope this mapping is left alone by sparsemem.

Now what would be required to allow use of the ST-RAM chunk (or any other memory area mapped out of order) by the kernel memory allocators?

Cheers,

    Michael



How many FastRAM do you have in your configuration?
Only 256 MB. Can't use much more on my old Powerbook.

Cheers,

	Michael




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux