Re: [PATCH] convert parisc to sparsemem (was Re: [PATCH v3] mm:make expand_downwards symmetrical to expand_upwards)
From: Dave Hansen
Date: Wed Apr 27 2011 - 12:37:00 EST
On Sat, 2011-04-23 at 13:34 -0500, James Bottomley wrote:
> This is the preliminary conversion. It's very nasty on parisc because
> the memory allocation isn't symmetric anymore: under DISCONTIGMEM, we
> push all memory into bootmem and then let free_all_bootmem() do the
> magic for us;
Urg, that's unfortunate. I bet we could fairly easily teach the bootmem
allocator to allow a couple of bootmem_data's to hang off of an
individual pgdat. Put each pmem_ranges in one of those instead of a
pgdat. That would at least help with the bitmap size explosion and
extra loops.
> now we have to do separate initialisations for ranges
> because SPARSEMEM can't do multi-range boot memory. It's also got the
> horrible hack that I only use the first found range for bootmem. I'm
> not sure if this is correct (it won't be if the first found range can be
> under about 50MB because we'll run out of bootmem during boot) ... we
> might have to sort the ranges and use the larges, but that will involve
> us in even more hackery around the bootmem reservations code.
>
> The boot sequence got a few seconds slower because now all of the loops
> over our pfn ranges actually have to skip through the holes (which takes
> time for 64GB).
Which iterations were these, btw? All of the ones I saw the patch touch
seemed to be running over just a single pmem_range.
> All in all, I've not been very impressed with SPARSEMEM over
> DISCONTIGMEM. It seems to have a lot of rough edges (necessitating
> exception code) which DISCONTIGMEM just copes with.
We definitely need to look at extending it to cover bootmem-time a bit.
Is that even worth it these days with the no-bootmem bits around?
-- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/