Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function

2021-04-15 Thread Daniel Vetter
On Thu, Apr 15, 2021 at 01:56:23PM +0200, Christian König wrote: > To be able to switch to a spinlock and reduce lock contention in the TTM > shrinker we don't want to hold a mutex while unmapping and freeing pages > from the pool. > > But then we somehow need to prevent a race between (for exampl

[PATCH 1/2] mm/vmscan: add sync_shrinkers function

2021-04-15 Thread Christian König
To be able to switch to a spinlock and reduce lock contention in the TTM shrinker we don't want to hold a mutex while unmapping and freeing pages from the pool. But then we somehow need to prevent a race between (for example) the shrinker trying to free pages and hotplug trying to remove the devic

Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function

2021-04-09 Thread Christian König
Am 09.04.21 um 13:00 schrieb Vlastimil Babka: On 4/9/21 9:17 AM, Christian König wrote: To be able to switch to a spinlock and reduce lock contention in the TTM shrinker we don't want to hold a mutex while unmapping and freeing pages from the pool. Does using spinlock instead of mutex really re

Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function

2021-04-09 Thread Vlastimil Babka
On 4/9/21 9:17 AM, Christian König wrote: > To be able to switch to a spinlock and reduce lock contention in the TTM > shrinker we don't want to hold a mutex while unmapping and freeing pages > from the pool. Does using spinlock instead of mutex really reduce lock contention? > But then we someho

[PATCH 1/2] mm/vmscan: add sync_shrinkers function

2021-04-09 Thread Christian König
To be able to switch to a spinlock and reduce lock contention in the TTM shrinker we don't want to hold a mutex while unmapping and freeing pages from the pool. But then we somehow need to prevent a race between (for example) the shrinker trying to free pages and hotplug trying to remove the devic