mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Huang <mmpgouride@gmail.com>
To: Bilal Hashim <AeeSec@126.com>
Cc: Li Coly <colyli@fygo.io>,
	Kent Overstreet <kent.overstreet@linux.dev>,
	linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bcache: wait for RCU grace period before rehashing btree node
Date: Fri, 4 Dec 2026 16:43:27 +0800	[thread overview]
Message-ID: <31F313B9-BB63-4ACF-A4A5-58474E550A76@gmail.com> (raw)
In-Reply-To: <179634506403.33844.7693480372006052259@126.com>

Hi Bilal,

If the find doesn’t find a node that actually exists in the hlist(due to move), it will re-find under bucket lock.

If the find does find one node, the key will be re-validated under b->lock.

Thanks,
Alan

> 在 2026年12月4日,08:44,Bilal Hashim <AeeSec@126.com> 写道:
> 
> Hi Coly,
> 
> I'm a real person, sorry for the overly formal patch wording — I'm still
> getting used to kernel mailing list conventions.
> 
> I ran into the hlist_del_init_rcu() / hlist_add_head_rcu() reuse in
> mca_alloc() while reading through the btree cache path and tested the
> change in QEMU with lockdep enabled. If synchronize_rcu() here isn't
> acceptable due to latency or if there's a better way to handle this
> in bcache, I'm happy to look into an alternative approach or drop it
> based on your feedback.
> 
> Thanks,
> Bilal
> 
> 

      reply	other threads:[~2026-12-04  8:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 16:34 Bilal Hashim
2026-12-03 15:25 ` Coly Li
2026-12-04  0:44   ` Bilal Hashim
2026-12-04  8:43     ` Alan Huang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31F313B9-BB63-4ACF-A4A5-58474E550A76@gmail.com \
    --to=mmpgouride@gmail.com \
    --cc=AeeSec@126.com \
    --cc=colyli@fygo.io \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®