Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754142AbdHXX7F (ORCPT ); Thu, 24 Aug 2017 19:59:05 -0400 Received: from LGEAMRELO13.lge.com ([156.147.23.53]:38712 "EHLO lgeamrelo13.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753203AbdHXX7E (ORCPT ); Thu, 24 Aug 2017 19:59:04 -0400 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Fri, 25 Aug 2017 08:59:30 +0900 From: Joonsoo Kim To: Vlastimil Babka Cc: Andrew Morton , Minchan Kim , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mel Gorman Subject: Re: [PATCH] mm/mlock: use page_zone() instead of page_zone_id() Message-ID: <20170824235930.GB29701@js1304-P5Q-DELUXE> References: <1503559211-10259-1-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1404 Lines: 34 On Thu, Aug 24, 2017 at 01:05:15PM +0200, Vlastimil Babka wrote: > +CC Mel > > On 08/24/2017 09:20 AM, js1304@gmail.com wrote: > > From: Joonsoo Kim > > > > page_zone_id() is a specialized function to compare the zone for the pages > > that are within the section range. If the section of the pages are > > different, page_zone_id() can be different even if their zone is the same. > > This wrong usage doesn't cause any actual problem since > > __munlock_pagevec_fill() would be called again with failed index. However, > > it's better to use more appropriate function here. > > Hmm using zone id was part of the series making munlock faster. Too bad > it's doing the wrong thing on some memory models. Looks like it wasn't > evaluated in isolation, but only as part of the pagevec usage (commit > 7a8010cd36273) but most likely it wasn't contributing too much to the > 14% speedup. I roughly checked that patch and it seems that performance improvement of that commit isn't related to page_zone_id() usage. With page_zone(), we would have more chance that do a job as a batch. > > > This patch is also preparation for futher change about page_zone_id(). > > Out of curiosity, what kind of change? > I prepared one more patch that prevent another user of page_zone_id() since it is too tricky. However, I don't submit it. That description should be removed. :/ Thanks.