# Re: \[PATCH 7/9\] rhashtable: Per bucket locks \& deferred expansion/shrinking

- From: Paul E. McKenney \<hidden\>
- Date: 2015-01-21 05:29:14 
- List: netdev
- Page: https://ratatoskr.run/netdev/2015/01/10975855
- Thread: https://ratatoskr.run/netdev/2014/12/10972989/t.md

```text
On Wed, Jan 21, 2015 at 04:23:33PM +1100, Herbert Xu wrote:
> On Mon, Jan 19, 2015 at 01:01:21AM -0800, Paul E. McKenney wrote:
> >
> > One unconventional way of handling this is to associate the scan with
> > a one-to-one resize operation.  This can be implemented to have the
> > effect of taking a snapshot of the table.
> 
> The problem is that in general (not for netfilter, but certainly
> other rhashtable users such as netlink) dumps/walks can be started
> by ordinary users and I don't think we can afford creating a
> snapshot for each one, or can we?

Well, you -could- batch them up, so that a single snapshot covered
several users, and once that set was done and memory reclaimed, a second
snapshot could cover any additional users that requested dumps/walks in
the meantime.  Or are users allowed to walk arbitrarily slowly through
the table?

							Thanx, Paul
```
