Re: [PATCH v2] mm, shrinker: make shrinker_list lockless

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

 



Shakeel Butt wrote:
> > If you can accept serialized register_shrinker()/unregister_shrinker(),
> > I think that something like shown below can do it.
> 
> If we assume that we will never do register_shrinker and
> unregister_shrinker on the same object in parallel then do we still
> need to do msleep & synchronize_rcu() within mutex?

Doing register_shrinker() and unregister_shrinker() on the same object
in parallel is wrong. This mutex is to ensure that we do not need to
worry about ->list.next field. synchronize_rcu() should not be slow.
If you want to avoid msleep() with mutex held, you can also apply

> > If you want parallel register_shrinker()/unregister_shrinker(), something like
> > shown below on top of shown above will do it.

change.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux