Re: Re: [for-416 PATCH 1/3] bcache: writeback: collapse contiguous IO better

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 27, 2017 at 7:47 PM,  <tang.junhui@xxxxxxxxxx> wrote:
> From: Tang Junhui <tang.junhui@xxxxxxxxxx>
>
> More importantly,
>> +    while (!kthread_should_stop() && next) {
>> ...
>> +            if (nk != 0 && !keys_contiguous(dc, keys[nk-1], next))
>> +                break;
>> +
>> +            size += KEY_SIZE(&next->key);
>> +            keys[nk++] = next;
>> +        } while ((next = bch_keybuf_next(&dc->writeback_keys)));
>
> if the "next" key does not satisfy the contiguous condition, does this
> key not write-back to the backend device?

I believe the current code is correct--- it is not written back *this
time* (since it is not contiguous), but will be written back the next
time through the loop (next is not changed).

Mike



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux