Received: by 10.223.176.46 with SMTP id f43csp527457wra; Wed, 24 Jan 2018 01:52:50 -0800 (PST) X-Google-Smtp-Source: AH8x226d2HdP8W5nnSDe2T1Pzm2KuoSzXKpwifDpiuTfWqHk5TsNl5/bD7tR9/Wvh5wB2m5f2QpV X-Received: by 2002:a17:902:694a:: with SMTP id k10-v6mr7284440plt.301.1516787570168; Wed, 24 Jan 2018 01:52:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516787570; cv=none; d=google.com; s=arc-20160816; b=M/0IOfOziccH06NpVSC5anWkZaclsJukqD8TeLimheRsGsKUUp58tbvn7lMrnokyLF rO2mVxpi1/GdeFqqX8gCA1icLIjR/xsWE4QcvTszaS+hv7sEnKVtgv3y0/BKB8uHvbN7 EiYQU9epLdBVlLRKZ0Ugdr8tztXSvqGB6V40mjka79Bs8YaFfQNQfKn2nOKTgWF7bx/L uzah2j9a4+QQMI6DsUJ6dFreI9yzlg90hCZ3nP2Qu9aShnMcBfGoBi2p6WswRYyg3nd5 +o1WYW8SDNTPLPXohILozTOK5cDH6jQ8fMLEaPHeA2w1/tHOA74a+nArYR89+aIs0Bk6 KeUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=6XGP8C2ZOWtuKWyvUXd3SJnoTULL3U3MIAPyHorCbi8=; b=sUleW7JmxRzOxYlpd4QLmvLLTRYjUbEAcIgqCT2uQZfR7H/dvX0ZiNcNTHqTg+yw+Q lj/Z17vcaUuGOFh+5a2JT+gIqRVSvTxB/w2mmfJEQdFQR5gE7mkP1WOQHpu3tL8ryQq9 jigtZbH/0M92MWbi9RJWWyn1qORgKNZIBA3+YTXvzUM6PULVik3oknIlZNSLkeDAEaFq TcCpFj2vpUyubS9uX+OxO0JKavvukmF2hNKR8vOAZTZzsDLt0lGrIwq5LFL+x3EDjO9m yV8hP7zYcOG+HfqjAhLdSL7kkiw5plUc5Z/Kak/e5aw5ak3QWWYSQjcoaASYAxREyeNO lA/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 87si2681048pfh.330.2018.01.24.01.52.36; Wed, 24 Jan 2018 01:52:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932974AbeAXJvs (ORCPT + 99 others); Wed, 24 Jan 2018 04:51:48 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59698 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932606AbeAXJvp (ORCPT ); Wed, 24 Jan 2018 04:51:45 -0500 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0O9nTjD118072 for ; Wed, 24 Jan 2018 04:51:44 -0500 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fpky60x3q-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 24 Jan 2018 04:51:44 -0500 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 24 Jan 2018 02:51:39 -0700 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 24 Jan 2018 02:51:36 -0700 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w0O9pZ8S11534722; Wed, 24 Jan 2018 02:51:35 -0700 Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BDD93BE044; Wed, 24 Jan 2018 02:51:35 -0700 (MST) Received: from [9.124.35.86] (unknown [9.124.35.86]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP id A69D8BE039; Wed, 24 Jan 2018 02:51:33 -0700 (MST) Subject: Re: [PATCH v3 5/5] powerpc/mm: Fix growth direction for hugepages mmaps with slice To: Christophe LEROY , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <6920f6efe2dcdabf59350b2d31ee6bd4bdef57f4.1516783089.git.christophe.leroy@c-s.fr> <362a93307a09b521878c47a8999a39a228184293.1516783089.git.christophe.leroy@c-s.fr> <9aea8b6f-0d1a-b700-efe4-8efcebc5d16d@linux.vnet.ibm.com> From: "Aneesh Kumar K.V" Date: Wed, 24 Jan 2018 15:21:32 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18012409-0028-0000-0000-0000091075FE X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008418; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000247; SDB=6.00979603; UDB=6.00496530; IPR=6.00758908; MB=3.00019179; MTD=3.00000008; XFM=3.00000015; UTC=2018-01-24 09:51:38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18012409-0029-0000-0000-0000394C6593 Message-Id: <47bbd8be-7b2e-245b-08d9-24958eec2ed2@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-24_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801240133 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/24/2018 03:09 PM, Christophe LEROY wrote: > > > Le 24/01/2018 à 10:35, Aneesh Kumar K.V a écrit : >> >>> Did you try with HUGETLB_MORECORE_HEAPBASE=0x11000000 on PPC64 as I >>> suggested in my last email on this subject (22/01/2018 9:22) ? >> >> >> yes. The test ran fine for me > > You tried with 0x30000000, it works as well on PPC32. > > I'd really like you to try with 0x11000000 which is in the same slice as > the 10020000-10030000 range. > > Now that explains is better. But then the requested HEAPBASE was not free and hence topdown search got an address in the below range. 7efffd000000-7f0000000000 rw-p 00000000 00:0d 1082770 /anon_hugepage (deleted) The new range allocated is such that there is no scope for expansion of heap if we do a topdown search. But why should that require us to change from topdown/bottomup search? 10000000-10010000 r-xp 00000000 fc:00 9044312 /home/kvaneesh/a.out 10010000-10020000 r--p 00000000 fc:00 9044312 /home/kvaneesh/a.out 10020000-10030000 rw-p 00010000 fc:00 9044312 /home/kvaneesh/a.out 7efffd000000-7f0000000000 rw-p 00000000 00:0d 1082770 /anon_hugepage (deleted) 7ffff2d40000-7ffff7d60000 rw-p 00000000 00:00 0 7ffff7d60000-7ffff7f10000 r-xp 00000000 fc:00 9250090 /lib/powerpc64le-linux-gnu/libc-2.23.so 7ffff7f10000-7ffff7f20000 r--p 001a0000 fc:00 9250090 /lib/powerpc64le-linux-gnu/libc-2.23.so 7ffff7f20000-7ffff7f30000 rw-p 001b0000 fc:00 9250090 /lib/powerpc64le-linux-gnu/libc-2.23.so 7ffff7f40000-7ffff7f60000 r-xp 00000000 fc:00 10754812 /usr/lib/libhugetlbfs.so.0 7ffff7f60000-7ffff7f70000 r--p 00010000 fc:00 10754812 /usr/lib/libhugetlbfs.so.0 7ffff7f70000-7ffff7f80000 rw-p 00020000 fc:00 10754812 /usr/lib/libhugetlbfs.so.0 7ffff7f80000-7ffff7fa0000 r-xp 00000000 00:00 0 [vdso] 7ffff7fa0000-7ffff7fe0000 r-xp 00000000 fc:00 9250107 /lib/powerpc64le-linux-gnu/ld-2.23.so 7ffff7fe0000-7ffff7ff0000 r--p 00030000 fc:00 9250107 /lib/powerpc64le-linux-gnu/ld-2.23.so 7ffff7ff0000-7ffff8000000 rw-p 00040000 fc:00 9250107 /lib/powerpc64le-linux-gnu/ld-2.23.so 7ffffffd0000-800000000000 rw-p 00000000 00:00 0 [stack] For the specific test, one should pass the HEAPBASE value such that it can be expanded if required isn't it ? -aneesh