Received: by 10.192.165.148 with SMTP id m20csp855001imm; Fri, 27 Apr 2018 08:34:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqJXzHxze3UvnJIFDhS5gKM1TIka58GIrxLJtK76vUXKYMrLDcI1pm1h/yx+b9dWPSAazT/ X-Received: by 10.98.80.145 with SMTP id g17mr2576333pfj.71.1524843261896; Fri, 27 Apr 2018 08:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524843261; cv=none; d=google.com; s=arc-20160816; b=sJlyuzD6uISqaQzh1ihV/3geS3wzmlVmN0/S1gF0HSlm7ystu4JoQEwS2aBM41omOD EzktdXnTaMkOi8xezwtVIbjFEj/d6n2IjugFTsJlo/UyVTEH/+NhC7Al8f9gkjaw7xfD kOveMA4is5Yhdi7uQGeo3LAHV2pyvPgiTew1R+fFSHDTd7VkzrLGhlTnfdiAbJpok1mO olTexQV8Ohm8rs2snvhfLWc1e4k+v/7YM4hr4cBBUQ+tTgIPVuTyTAlE+1DY10dRog/H 3QkIrS5Fe9M6kNJB3gFqwaihuVvB8I3sfFzYS6etQ8B7XhGuFbRtrZlYrwcY7W/6/OGj dsXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=8OuOqsvVnhl1jAUC7UQiK4zCCuqoxJ95257DoZxvGKY=; b=ZRqQjrzDDgUHFoA0CUv2J3yN8KNAlP9avX0Jdd+Qs8D2cCJvxkh/AKV8bQaWxcPGVC Bq9EAvLmbuBu2QVRyOKUEjwwHu78K9R7hxl8pkSFIUrrhaMIxFy2ZfNsbAZOxwhjb2po 29xR9oxl+Gq8KZiklsZ1f9dpic7BFI0yne27RmLLwFSc112X+Z8AyPqwSTuOpid9I9LV mRz6iU0JluOPP2mz4TnZV944RtFLZFQYlKNizcnB+8edtS11qc95eGo/44gtpq5z3uks t3BhtKmGDnrgOL2kmUTnY1H8UpDoslyS15ohVPahmdGsN8dQJR9FvSlX8MIQXAbduPYW yiTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12-v6si1435868pli.419.2018.04.27.08.34.07; Fri, 27 Apr 2018 08:34:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933127AbeD0Pc4 (ORCPT + 99 others); Fri, 27 Apr 2018 11:32:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:47884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932893AbeD0OAn (ORCPT ); Fri, 27 Apr 2018 10:00:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AD20F21895; Fri, 27 Apr 2018 14:00:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD20F21895 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chen Feng , Lu bing , Laura Abbott , Greg Hackmann Subject: [PATCH 4.4 04/50] staging: ion : Donnot wakeup kswapd in ion system alloc Date: Fri, 27 Apr 2018 15:58:06 +0200 Message-Id: <20180427135655.905352203@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135655.623669681@linuxfoundation.org> References: <20180427135655.623669681@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chen Feng commit 2ef230531ee171a475fc3ddad5516dd7e09a8a77 upstream. Since ion alloc can be called by userspace,eg gralloc. When it is called frequently, the efficiency of kswapd is to low. And the reclaimed memory is too lower. In this way, the kswapd can use to much cpu resources. With 3.5GB DMA Zone and 0.5 Normal Zone. pgsteal_kswapd_dma 9364140 pgsteal_kswapd_normal 7071043 pgscan_kswapd_dma 10428250 pgscan_kswapd_normal 37840094 With this change the reclaim ratio has greatly improved 18.9% -> 72.5% Signed-off-by: Chen Feng Signed-off-by: Lu bing Reviewed-by: Laura Abbott Cc: Greg Hackmann Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/ion/ion_system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -27,7 +27,7 @@ #include "ion_priv.h" static gfp_t high_order_gfp_flags = (GFP_HIGHUSER | __GFP_ZERO | __GFP_NOWARN | - __GFP_NORETRY) & ~__GFP_DIRECT_RECLAIM; + __GFP_NORETRY) & ~__GFP_RECLAIM; static gfp_t low_order_gfp_flags = (GFP_HIGHUSER | __GFP_ZERO | __GFP_NOWARN); static const unsigned int orders[] = {8, 4, 0}; static const int num_orders = ARRAY_SIZE(orders);