From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753146AbbJNIns (ORCPT ); Wed, 14 Oct 2015 04:43:48 -0400 Received: from mga09.intel.com ([134.134.136.24]:18178 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753065AbbJNInm (ORCPT ); Wed, 14 Oct 2015 04:43:42 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,681,1437462000"; d="scan'208";a="792334634" Message-ID: <561E150C.9010402@intel.com> Date: Wed, 14 Oct 2015 16:40:44 +0800 From: Pan Xinhui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Michal Hocko CC: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , vbabka@suse.cz, rientjes@google.com, hannes@cmpxchg.org, nasa4836@gmail.com, mgorman@suse.de, alexander.h.duyck@redhat.com, aneesh.kumar@linux.vnet.ibm.com, "yanmin_zhang@linux.intel.com" Subject: Re: [PATCH] gfp: GFP_RECLAIM_MASK should include __GFP_NO_KSWAPD References: <561DE9F3.504@intel.com> <20151014073428.GC28333@dhcp22.suse.cz> <561E0F9B.6090305@intel.com> <20151014083827.GG28333@dhcp22.suse.cz> In-Reply-To: <20151014083827.GG28333@dhcp22.suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015年10月14日 16:38, Michal Hocko wrote: > On Wed 14-10-15 16:17:31, Pan Xinhui wrote: > [...] >> I have a look at Mel's patchset. yes, it can help fix my kswapd issue. >> :) So I just need change my kmalloc's gfp_flag to GFP_ATOMIC &~ >> __GFP_KSWAPD_RECLAIM, then slub will not wakeup kswpad. > > As pointed out in my other email __GFP_ATOMIC would be more appropriate > because you shouldn't abuse memory reserves which are implicitly used > for GFP_ATOMIC requests. > oh, yes. maybe it's better to use (__GFP_HIGH | __GFP_ATOMIC) than (GFP_ATOMIC &~ __GFP_KSWAPD_RECLAIM).. just set the gfp flags which I need in kmalloc. thanks for the suggestion. thanks xinhui