Re: reverse link from bucket to keys

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

 



Hi Kent,

sorry to bother you again. i got another question. it's about the
bucket->pin. Can you explain what's the usage for this data member?
i see only bucket with pin value "0" can be invalidated. And only "0"
valued pin bucket's prio will be decreased within the
bch_rescale_priorities(). But every time when you write data to
bucket, you increase that bucket's pin, and i did not see when it will
be decreased. This makes me a little confused. Or do i miss anything
where you might reset it?

i am appreciated for your help.

Thanks,
Sheng

On Thu, Jul 11, 2013 at 10:41 PM, Kent Overstreet <kmo@xxxxxxxxxxxxx> wrote:
> On Thu, Jul 11, 2013 at 10:29:23PM -0400, sheng qiu wrote:
>> sure, in your btree.c code, when you do btree gc, you update the
>> bucket's used sectors by min(unsigned, GC_SECTORS_USED(b)+key_size(),
>> 1<<14-1). this might get you larger than the bucket size. since the
>> newly allocated bucket is set to bucket size already. so each round
>> you will accumulate the key_size(). i print the information at that
>> point, and see GC_SECTORS_USED > bucket size.
>
> Hey, I think you're right - btree_gc_start() is supposed to be zeroing
> out GC_SECTORS_USED() (the same place it does SET_GC_MARK(b,
> GC_MARK_RECLAIMABLE)) - but that's missing. Thanks!



-- 
Sheng Qiu
Texas A & M University
Room 332B Wisenbaker
email: herbert1984106@xxxxxxxxx
College Station, TX 77843-3259
--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux