From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752819AbcD0Fie (ORCPT ); Wed, 27 Apr 2016 01:38:34 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33339 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752841AbcD0Fic (ORCPT ); Wed, 27 Apr 2016 01:38:32 -0400 Date: Wed, 27 Apr 2016 14:40:04 +0900 From: Sergey Senozhatsky To: akpm@linux-foundation.org Cc: ddstreet@ieee.org, dan.streetman@canonical.com, yuzhao@google.com, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: + mm-zswap-use-workqueue-to-destroy-pool.patch added to -mm tree Message-ID: <20160427054004.GA7601@swordfish> References: <571fff47.caCgiy6gTD/vCFnv%akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <571fff47.caCgiy6gTD/vCFnv%akpm@linux-foundation.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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