Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757088AbdCULKL (ORCPT ); Tue, 21 Mar 2017 07:10:11 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:56111 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756133AbdCULKJ (ORCPT ); Tue, 21 Mar 2017 07:10:09 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.249.26 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Tue, 21 Mar 2017 20:10:05 +0900 From: Minchan Kim To: CC: Andrew Morton , Sergey Senozhatsky , , , Joonsoo Kim Subject: Re: [PATCH 1/4] mm/zsmalloc: always set movable/highmem flag to the zspage Message-ID: <20170321111005.GA28016@bbox> References: <1489632398-31501-1-git-send-email-iamjoonsoo.kim@lge.com> <1489632398-31501-2-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 In-Reply-To: <1489632398-31501-2-git-send-email-iamjoonsoo.kim@lge.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB06/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/21 20:10:05, Serialize by Router on LGEKRMHUB06/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/21 20:10:05, Serialize complete at 2017/03/21 20:10:05 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 990 Lines: 19 Hi Joonsoo, On Thu, Mar 16, 2017 at 11:46:35AM +0900, js1304@gmail.com wrote: > From: Joonsoo Kim > > Zspage is always movable and is used through zs_map_object() function > which returns directly accessible pointer that contains content of > zspage. It is independent on the user's allocation flag. > Therefore, it's better to always set movable/highmem flag to the zspage. > After that, we don't need __GFP_MOVABLE/__GFP_HIGHMEM clearing in > cache_alloc_handle()/cache_alloc_zspage() since there is no zs_malloc > caller who specifies __GFP_MOVABLE/__GFP_HIGHMEM. Hmm, I wanted this when you pointed out to me firstly but when I think again, I don't see it's improvement. Sorry for that. The zs_malloc is exported symbol and it has gfp_t argument so user can do whatever he want with any zone modifiers flags. IOW, if someuser want to allocate pages from {normal|dma} zone by whatever reason, he can omit __GFP_HIGHMEM from the gfp flag to fullfill the goal.