From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx137.postini.com [74.125.245.137]) by kanga.kvack.org (Postfix) with SMTP id 4784A6B0062 for ; Tue, 19 Jun 2012 04:32:57 -0400 (EDT) Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jun 2012 08:23:34 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5J8Wm0F7668052 for ; Tue, 19 Jun 2012 18:32:49 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5J8WmEO016769 for ; Tue, 19 Jun 2012 18:32:48 +1000 Message-ID: <4FE0392E.3090300@linux.vnet.ibm.com> Date: Tue, 19 Jun 2012 16:32:46 +0800 From: Xiao Guangrong MIME-Version: 1.0 Subject: [PATCH 01/10] zcache: fix preemptable memory allocation in atomic context Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Seth Jennings , Dan Magenheimer , LKML , linux-mm@kvack.org zcache_do_preload uses ZCACHE_GFP_MASK to allocate memory that will be sleep, but zcache_do_preload is called in zcache_put_page where IRQ is disabled Fix it by use GFP_ATOMIC flag Signed-off-by: Xiao Guangrong --- drivers/staging/zcache/zcache-main.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 03f690b..d215fb4 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -45,13 +45,8 @@ #include #endif -#if 0 /* this is more aggressive but may cause other problems? */ #define ZCACHE_GFP_MASK (GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN) -#else -#define ZCACHE_GFP_MASK \ - (__GFP_FS | __GFP_NORETRY | __GFP_NOWARN | __GFP_NOMEMALLOC) -#endif #define MAX_POOLS_PER_CLIENT 16 -- 1.7.7.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org