Comment 7 for bug 560548

Revision history for this message
Loïc Minier (lool) wrote :

I don't understand, why it would be "massive code changes", there's already a runtime check?

if [ "${BOOT}" = "casper" ]; then
    if [ "${TOTAL_RAM}" -gt 524288 ]; then
        exit 0
    fi
fi

modprobe -q --ignore-install ramzswap disksize_kb="$kbytes"

What I would personally find problematic in changing the runtime behavior is the current configuration interface with the COMPCACHE_SIZE variable which relies on the hardcoded 524288 TOTAL_RAM limit -- it's hard to generalize; we could introduce a COMPCACHE_LOWMEM_SIZE, and perhaps COMPACHE_RAM_LIMIT and LOWMEM_RAM_LIMIT vars to avoid hardcoding 512 MiB and 256 MiB. But I find that's a lot of changes to the config vars. I would also prefer if we'd simply change the compcache check from 512 MiB to 256 MiB, albeit one has to keep in mind that it's applied to all initrds, all images, so it will impact more environments...