Ask a question about size of ca->heap in bcache

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

 



Hi Mike, Coly, Kent,

As far as I known, ca->heap is used to sort buckets by bucket_prio,
and it would be pushed into ca->free_inc queue after sorting.
I find ca->heap is double the size of the ca->free_inc.
	    !init_fifo(&ca->free_inc,	free << 2, GFP_KERNEL) ||
	    !init_heap(&ca->heap,	free << 3, GFP_KERNEL) ||
I am puzzled about, we only need the size of ca->free_inc buckets, 
Why do we alloc ca->heap the double size of the ca->free_inc?


Thanks,
Tang Junhui



[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