Skip to contentSkip to conversation

Question about sequential large write IO bypass

DISCUSSION Kent Overstreet 1 participant 1 message Apr 25, 2017 1 message not in the archive bcache (block layer cache)

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 27 lines · On Tue, Apr 25, 2017 at 12:38:54PM +0800, [email protected] wrote:

Hello all,

We test sequential write IO with bs=1M by FIO,

and the bcache cache_mode is writeback,

we expect these IOs to be bypassed cache,

but actually they not.

We debug the code, and find in check_should_bypass():

    if (!congested &&

        mode == CACHE_MODE_WRITEBACK &&

        op_is_write(bio_op(bio)) &&

        (bio->bi_opf & REQ_SYNC))

        goto rescale

that means, If in writeback mode, a write IO with REQ_SYNC flag

Quoted 7 lines

will not be bypassed though it is a sequential large IO.

So, my question is: why do not we bypass these IOs ?

We planned to remove these codes. Does the modification do any harm?

You can remove that check, it won't break anything.