Skip to contentSkip to conversation

question about ZRAM_HUGE flag

DISCUSSION Vasily Averin 1 participant 1 message Nov 6, 2023 Block layer

lore
Share & tools
lore
#0 lore raw

ZRAM_HUGE flag doubles most significant bit in zram size.
I had an idea to redefine it, but do not fully understand how to do it correctly. I'm sure that MSB = PAGE_SHIFT on BIG_ENDIAN but do not understand what's happen on LITTLE_ENDIAN? Is MSB = 0 in this case? Could it have some other unpredictable value?
In any case I think we can always replace ZRAM_HUGE bit check by BIT(PAGE_SHIFT) test.

Thank you,
Vasily Averin