Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752640AbbKXBFY (ORCPT ); Mon, 23 Nov 2015 20:05:24 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33067 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332AbbKXBFX (ORCPT ); Mon, 23 Nov 2015 20:05:23 -0500 Date: Tue, 24 Nov 2015 10:06:22 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Andrew Morton , Kyeongdon Kim , ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] zram: try vmalloc() after kmalloc() Message-ID: <20151124010622.GB705@swordfish> References: <1448259675-29888-1-git-send-email-kyeongdon.kim@lge.com> <20151123145226.63df6232c1f74898a980fdf2@linux-foundation.org> <20151123232857.GB3882@blaptop> <20151123154029.ec1cb910a827ddf51aa986c4@linux-foundation.org> <20151124003500.GD3882@blaptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151124003500.GD3882@blaptop> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 34 On (11/24/15 09:35), Minchan Kim wrote: [..] > > We can use __GFP_RECLAIM (used to be __GFP_WAIT). That permits the > > allocation to wait for in-flight IO to complete and to reclaim clean > > pagecache. > > Generally, you're right but in case of zram, it would be unfortunate. > > It would be void *most of time* because it is called in reclaim context > and reclaim path bails out to avoid recursion of direct reclaim > by PF_MEMALLOC without trying reclaim. > However, the reason I said *most of time* is we has another context > the funcion could be called. > > "disksize_store"->zcomp_create > > In the place, we should make sure the successful allocation to work > zram at least so that path should use another gfp. > I will work for that. Hm... is it really worth it? passing a bool to zcomp_strm_alloc() (so it can decide what gfp flags to use) or gfp flags directly is just a bit complicated. what's the problem with GFP_NOIO (__GFP_RECLAIM) in the first place (sorry if I'm missing something terribly obvious)? alternatively, we can just remove the 'dynamic' streams allocation part and allocate all of the streams via sysfs store path only. -ss -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/