[RFC][PATCH] zram: drop partial_io support
From: Sergey Senozhatsky
Date: Mon Dec 14 2015 - 07:40:39 EST
Hello,
I've been thinking about this for some time, but didn't have a chance
to properly investigate so far. My question is: why do we even bother
with partial IO in zram?
We set zram->disk->queue->limits.discard_granularity to PAGE_SIZE,
just like the rest of queue configuration, e.g.
blk_queue_physical_block_size(zram->disk->queue, PAGE_SIZE)
etc.
And it's only blk_queue_logical_block_size() that has !PAGE_SIZE
configuration (on systems where PAGE_SIZE != ZRAM_LOGICAL_BLOCK_SHIFT).
The only requirement enforced on blk_queue_logical_block_size() from
zram/zsmalloc side seems to be that it should be less than or equal
to ZS_MAX_ALLOC_SIZE, which is:
#define ZS_MAX_ALLOC_SIZE PAGE_SIZE
We talk to compressing backends with PAGE_SIZE-d buffers,
zsmalloc understands PAGE_SIZE allocations and we can simplify
things if we will be able to drop this partial IO support thing.
So why do we keep it?
What am I missing? Sorry if there is something obvious.
** NOT TESTED ON SYSTEMS WITH PAGE_SIZE OTHER THAN 4K **
Will try to do this later this week (well, if it makes sense).
===8<===8<===