From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751156AbdAYAYO (ORCPT ); Tue, 24 Jan 2017 19:24:14 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35547 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750902AbdAYAYN (ORCPT ); Tue, 24 Jan 2017 19:24:13 -0500 Date: Wed, 25 Jan 2017 09:24:26 +0900 From: Sergey Senozhatsky To: Dan Streetman Cc: Linux-MM , Andrew Morton , Seth Jennings , Michal Hocko , Sergey Senozhatsky , Minchan Kim , linux-kernel@vger.kernel.org, Dan Streetman Subject: Re: [PATCH 2/3] zswap: allow initialization at boot without pool Message-ID: <20170125002426.GA2234@jagdpanzerIV.localdomain> References: <20170124200259.16191-1-ddstreet@ieee.org> <20170124200259.16191-3-ddstreet@ieee.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170124200259.16191-3-ddstreet@ieee.org> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org just a note, On (01/24/17 15:02), Dan Streetman wrote: [..] > @@ -692,6 +702,15 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp, > */ > list_add_tail_rcu(&pool->list, &zswap_pools); > put_pool = pool; > + } else if (!zswap_has_pool) { > + /* if initial pool creation failed, and this pool creation also > + * failed, maybe both compressor and zpool params were bad. > + * Allow changing this param, so pool creation will succeed > + * when the other param is changed. We already verified this > + * param is ok in the zpool_has_pool() or crypto_has_comp() > + * checks above. > + */ > + ret = param_set_charp(s, kp); > } > > spin_unlock(&zswap_pools_lock); looks like there still GFP_KERNEL allocation from atomic section: param_set_charp()->kmalloc_parameter()->kmalloc(GFP_KERNEL), under `zswap_pools_lock'. -ss