Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1388672 > unrolled thread

Re: + mm-zswap-use-workqueue-to-destroy-pool.patch added to -mm tree

Started bySergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
First post2016-04-27 07:40 +0200
Last post2016-04-27 10:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: + mm-zswap-use-workqueue-to-destroy-pool.patch added to -mm tree Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-04-27 07:40 +0200
    Re: + mm-zswap-use-workqueue-to-destroy-pool.patch added to -mm tree Dan Streetman <ddstreet@ieee.org> - 2016-04-27 10:20 +0200

#1388672 — Re: + mm-zswap-use-workqueue-to-destroy-pool.patch added to -mm tree

FromSergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Date2016-04-27 07:40 +0200
SubjectRe: + mm-zswap-use-workqueue-to-destroy-pool.patch added to -mm tree
Message-ID<rsqmC-42B-15@gated-at.bofh.it>
Hello,

On (04/26/16 16:52), akpm@linux-foundation.org wrote:
[..]
> -static void __zswap_pool_release(struct rcu_head *head)
> +static void __zswap_pool_release(struct work_struct *work)
>  {
> -	struct zswap_pool *pool = container_of(head, typeof(*pool), rcu_head);
> +	struct zswap_pool *pool = container_of(work, typeof(*pool), work);
> +
> +	synchronize_rcu();
>  
>  	/* nobody should have been able to get a kref... */
>  	WARN_ON(kref_get_unless_zero(&pool->kref));
> @@ -674,7 +676,9 @@ static void __zswap_pool_empty(struct kr
>  	WARN_ON(pool == zswap_pool_current());
>  
>  	list_del_rcu(&pool->list);
> -	call_rcu(&pool->rcu_head, __zswap_pool_release);
> +
> +	INIT_WORK(&pool->work, __zswap_pool_release);
> +	schedule_work(&pool->work);
>  
>  	spin_unlock(&zswap_pools_lock);
>  }
> _
> 
> Patches currently in -mm which might be from ddstreet@ieee.org are
> 
> mm-zpool-use-workqueue-for-zpool_destroy.patch
> mm-zswap-use-workqueue-to-destroy-pool.patch

I think only mm-zswap-use-workqueue-to-destroy-pool.patch is
needed.

	-ss

[toc] | [next] | [standalone]


#1388774

FromDan Streetman <ddstreet@ieee.org>
Date2016-04-27 10:20 +0200
Message-ID<rssRs-6lL-5@gated-at.bofh.it>
In reply to#1388672
On Wed, Apr 27, 2016 at 1:40 AM, Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
> Hello,
>
> On (04/26/16 16:52), akpm@linux-foundation.org wrote:
> [..]
>> -static void __zswap_pool_release(struct rcu_head *head)
>> +static void __zswap_pool_release(struct work_struct *work)
>>  {
>> -     struct zswap_pool *pool = container_of(head, typeof(*pool), rcu_head);
>> +     struct zswap_pool *pool = container_of(work, typeof(*pool), work);
>> +
>> +     synchronize_rcu();
>>
>>       /* nobody should have been able to get a kref... */
>>       WARN_ON(kref_get_unless_zero(&pool->kref));
>> @@ -674,7 +676,9 @@ static void __zswap_pool_empty(struct kr
>>       WARN_ON(pool == zswap_pool_current());
>>
>>       list_del_rcu(&pool->list);
>> -     call_rcu(&pool->rcu_head, __zswap_pool_release);
>> +
>> +     INIT_WORK(&pool->work, __zswap_pool_release);
>> +     schedule_work(&pool->work);
>>
>>       spin_unlock(&zswap_pools_lock);
>>  }
>> _
>>
>> Patches currently in -mm which might be from ddstreet@ieee.org are
>>
>> mm-zpool-use-workqueue-for-zpool_destroy.patch
>> mm-zswap-use-workqueue-to-destroy-pool.patch
>
> I think only mm-zswap-use-workqueue-to-destroy-pool.patch is
> needed.

yep, please drop mm-zpool-use-workqueue-for-zpool_destroy.patch

thanks!

>
>         -ss

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web