From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by kanga.kvack.org (Postfix) with ESMTP id 237AA6B0038 for ; Fri, 10 Oct 2014 10:35:44 -0400 (EDT) Received: by mail-pd0-f173.google.com with SMTP id g10so1757236pdj.18 for ; Fri, 10 Oct 2014 07:35:43 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com. [134.134.136.65]) by mx.google.com with ESMTP id tz10si4050799pac.23.2014.10.10.07.35.42 for ; Fri, 10 Oct 2014 07:35:43 -0700 (PDT) Message-ID: <5437EEA3.50705@intel.com> Date: Fri, 10 Oct 2014 07:35:15 -0700 From: Dave Hansen MIME-Version: 1.0 Subject: Re: [PATCH] smaps should deal with huge zero page exactly same as normal zero page References: <5436B98E.1070407@intel.com> <20141010132027.GB25038@gmail.com> In-Reply-To: <20141010132027.GB25038@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Fengwei Yin Cc: LKML , linux-mm@kvack.org, fengguang.wu@intel.com, "Kirill A. Shutemov" On 10/10/2014 06:21 AM, Fengwei Yin wrote: > @@ -787,6 +788,9 @@ check_pfn: > return NULL; > } > > + if (is_huge_zero_pfn(pfn)) > + return NULL; > + That looks a lot better. One thing, why not put the is_huge_zero_pfn() check next to the is_zero_pfn() check? -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754462AbaJJOfp (ORCPT ); Fri, 10 Oct 2014 10:35:45 -0400 Received: from mga09.intel.com ([134.134.136.24]:63081 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbaJJOfn (ORCPT ); Fri, 10 Oct 2014 10:35:43 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,692,1406617200"; d="scan'208";a="586743167" Message-ID: <5437EEA3.50705@intel.com> Date: Fri, 10 Oct 2014 07:35:15 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Fengwei Yin CC: LKML , linux-mm@kvack.org, fengguang.wu@intel.com, "Kirill A. Shutemov" Subject: Re: [PATCH] smaps should deal with huge zero page exactly same as normal zero page References: <5436B98E.1070407@intel.com> <20141010132027.GB25038@gmail.com> In-Reply-To: <20141010132027.GB25038@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/10/2014 06:21 AM, Fengwei Yin wrote: > @@ -787,6 +788,9 @@ check_pfn: > return NULL; > } > > + if (is_huge_zero_pfn(pfn)) > + return NULL; > + That looks a lot better. One thing, why not put the is_huge_zero_pfn() check next to the is_zero_pfn() check?