From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A7C131A1F3D for ; Thu, 22 Sep 2016 03:58:31 -0700 (PDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8MAwTf4105417 for ; Thu, 22 Sep 2016 06:58:29 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 25mcan4wx4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Sep 2016 06:58:29 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Sep 2016 06:58:19 -0400 From: "Aneesh Kumar K.V" Subject: Re: [PATCH 1/2] shmem: fix tmpfs to handle the huge= option properly In-Reply-To: <1473459863-11287-2-git-send-email-toshi.kani@hpe.com> References: <1473459863-11287-1-git-send-email-toshi.kani@hpe.com> <1473459863-11287-2-git-send-email-toshi.kani@hpe.com> Date: Thu, 22 Sep 2016 16:28:10 +0530 MIME-Version: 1.0 Message-Id: <8737ksw69p.fsf@linux.vnet.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Toshi Kani , akpm@linux-foundation.org Cc: linux-nvdimm@lists.01.org, mawilcox@microsoft.com, hughd@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kirill.shutemov@linux.intel.com List-ID: Toshi Kani writes: > shmem_get_unmapped_area() checks SHMEM_SB(sb)->huge incorrectly, > which leads to a reversed effect of "huge=" mount option. > > Fix the check in shmem_get_unmapped_area(). > > Note, the default value of SHMEM_SB(sb)->huge remains as > SHMEM_HUGE_NEVER. User will need to specify "huge=" option to > enable huge page mappings. > Any update on getting this merged ? Reviewed-by: Aneesh Kumar K.V > Reported-by: Hillf Danton > Signed-off-by: Toshi Kani > Cc: Andrew Morton > Cc: Kirill A. Shutemov > Cc: Hugh Dickins > --- > mm/shmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index fd8b2b5..aec5b49 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -1980,7 +1980,7 @@ unsigned long shmem_get_unmapped_area(struct file *file, > return addr; > sb = shm_mnt->mnt_sb; > } > - if (SHMEM_SB(sb)->huge != SHMEM_HUGE_NEVER) > + if (SHMEM_SB(sb)->huge == SHMEM_HUGE_NEVER) > return addr; > } > > > -- > 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 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755960AbcIVK63 (ORCPT ); Thu, 22 Sep 2016 06:58:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36936 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755511AbcIVK60 (ORCPT ); Thu, 22 Sep 2016 06:58:26 -0400 From: "Aneesh Kumar K.V" To: Toshi Kani , akpm@linux-foundation.org Cc: dan.j.williams@intel.com, mawilcox@microsoft.com, hughd@google.com, kirill.shutemov@linux.intel.com, toshi.kani@hpe.com, linux-nvdimm@ml01.01.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] shmem: fix tmpfs to handle the huge= option properly In-Reply-To: <1473459863-11287-2-git-send-email-toshi.kani@hpe.com> References: <1473459863-11287-1-git-send-email-toshi.kani@hpe.com> <1473459863-11287-2-git-send-email-toshi.kani@hpe.com> Date: Thu, 22 Sep 2016 16:28:10 +0530 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092210-0040-0000-0000-000001676ADD X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005802; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000185; SDB=6.00760193; UDB=6.00361576; IPR=6.00534683; BA=6.00004747; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012748; XFM=3.00000011; UTC=2016-09-22 10:58:18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092210-0041-0000-0000-0000055A73F6 Message-Id: <8737ksw69p.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-22_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=8 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609220203 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Toshi Kani writes: > shmem_get_unmapped_area() checks SHMEM_SB(sb)->huge incorrectly, > which leads to a reversed effect of "huge=" mount option. > > Fix the check in shmem_get_unmapped_area(). > > Note, the default value of SHMEM_SB(sb)->huge remains as > SHMEM_HUGE_NEVER. User will need to specify "huge=" option to > enable huge page mappings. > Any update on getting this merged ? Reviewed-by: Aneesh Kumar K.V > Reported-by: Hillf Danton > Signed-off-by: Toshi Kani > Cc: Andrew Morton > Cc: Kirill A. Shutemov > Cc: Hugh Dickins > --- > mm/shmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index fd8b2b5..aec5b49 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -1980,7 +1980,7 @@ unsigned long shmem_get_unmapped_area(struct file *file, > return addr; > sb = shm_mnt->mnt_sb; > } > - if (SHMEM_SB(sb)->huge != SHMEM_HUGE_NEVER) > + if (SHMEM_SB(sb)->huge == SHMEM_HUGE_NEVER) > return addr; > } > > > -- > 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: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id E79D96B026E for ; Thu, 22 Sep 2016 06:58:36 -0400 (EDT) Received: by mail-pf0-f198.google.com with SMTP id n24so158163395pfb.0 for ; Thu, 22 Sep 2016 03:58:36 -0700 (PDT) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id d9si1653496pag.62.2016.09.22.03.58.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2016 03:58:36 -0700 (PDT) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8MAwXB0124230 for ; Thu, 22 Sep 2016 06:58:35 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 25mcrrbrc9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Sep 2016 06:58:34 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 22 Sep 2016 06:58:19 -0400 From: "Aneesh Kumar K.V" Subject: Re: [PATCH 1/2] shmem: fix tmpfs to handle the huge= option properly In-Reply-To: <1473459863-11287-2-git-send-email-toshi.kani@hpe.com> References: <1473459863-11287-1-git-send-email-toshi.kani@hpe.com> <1473459863-11287-2-git-send-email-toshi.kani@hpe.com> Date: Thu, 22 Sep 2016 16:28:10 +0530 MIME-Version: 1.0 Content-Type: text/plain Message-Id: <8737ksw69p.fsf@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Toshi Kani , akpm@linux-foundation.org Cc: dan.j.williams@intel.com, mawilcox@microsoft.com, hughd@google.com, kirill.shutemov@linux.intel.com, linux-nvdimm@lists.01.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Toshi Kani writes: > shmem_get_unmapped_area() checks SHMEM_SB(sb)->huge incorrectly, > which leads to a reversed effect of "huge=" mount option. > > Fix the check in shmem_get_unmapped_area(). > > Note, the default value of SHMEM_SB(sb)->huge remains as > SHMEM_HUGE_NEVER. User will need to specify "huge=" option to > enable huge page mappings. > Any update on getting this merged ? Reviewed-by: Aneesh Kumar K.V > Reported-by: Hillf Danton > Signed-off-by: Toshi Kani > Cc: Andrew Morton > Cc: Kirill A. Shutemov > Cc: Hugh Dickins > --- > mm/shmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/shmem.c b/mm/shmem.c > index fd8b2b5..aec5b49 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -1980,7 +1980,7 @@ unsigned long shmem_get_unmapped_area(struct file *file, > return addr; > sb = shm_mnt->mnt_sb; > } > - if (SHMEM_SB(sb)->huge != SHMEM_HUGE_NEVER) > + if (SHMEM_SB(sb)->huge == SHMEM_HUGE_NEVER) > return addr; > } > > > -- > 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 -- 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