Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4863204ybp; Mon, 7 Oct 2019 15:20:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9et+oI93Ju+3mouCO/l+JJce5L2NLG3u8us8XrY78ssX1SZmw7caZqmq0lXqScQxl+6ZC X-Received: by 2002:a50:f00c:: with SMTP id r12mr31421605edl.274.1570486830069; Mon, 07 Oct 2019 15:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570486830; cv=none; d=google.com; s=arc-20160816; b=U0FjmqQ+QRDGfeRQvV3xJ6NfWYhPCYIx0Bj6A0j6PKLQTMnIxgRTfq9P+M1pEj5Inm +Jce5tmc3pUEUk4SneIgDyZVhanLsd5du1wZCdRVF3046Im82l9ISpDUVmm09Q0x671D yyLrGpc+kxFYN/+jcRYKIgXLYr9+jDkBM6a34zcaHfYwelo5gVtx6le+G2nN+Z0jvFeM YtMsqkt07xQO84hIPh+Es0INeXndFjEU2uqPInFrJkOMBBtkCCjvhzPkrpycHc5k7TCt 9rPbYPkTgNXe41ocDthhF3o7T82Z/5lxmbkfx7hzEql/KJnkssrJ+9+6RK899RC3wGou MExQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=24wnltpbsNiSThDHipt5aPeUqzFk/94/Ub8cB2WcU3I=; b=W5yoiPNIK0OiAtwHUkXdGiS7FqSCr5iK548gF7z+aYO3cWmWFoU4KG1nYNixeQqhJy pn0HL9wK7Ae7QrOtlCm0Xud/sUSsEL9unfEHpn2DR1cpqK3b+myU8vQHVy4D4Pu0nRjl uvoZewB4CNlyZlu8kYTrj0k7NUfDSBpd3V5uf1USXSt5aHRY2OBKW5n9gFLhzoibiRXE bIQMyfVtpiw9nJ39WmahJBxlPa0/7ss3rDqtvUyg4s30VzMWR+fNg22Og9aM6EchNBZh R3RqHwmF0ak2uqiHF2Uo6qBLNQpDU12mEkD1r6jY43W3Z7xQimRZ20w9CTY9iCwEMlb2 H8BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=cOdxOZ32; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si7670290ejw.231.2019.10.07.15.20.05; Mon, 07 Oct 2019 15:20:30 -0700 (PDT) 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; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=cOdxOZ32; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729252AbfJGWRy (ORCPT + 99 others); Mon, 7 Oct 2019 18:17:54 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:46084 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbfJGWRy (ORCPT ); Mon, 7 Oct 2019 18:17:54 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x97MEP1n121984; Mon, 7 Oct 2019 22:17:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=24wnltpbsNiSThDHipt5aPeUqzFk/94/Ub8cB2WcU3I=; b=cOdxOZ32xX614k7xA+i0Ri2RSrfLJldIjb3ipoLtkDxP7KU+Tiqpjy1G2SNzD2oPF2wL 2PIYbZyPrWn0FgrOGnHx/X9E+7C45Ls1jk+BiapyHyj46pN0ntsxVkk2rNtTN7upnofY UVgbM5EwSqeSxzu3zvmMAyqTRvZInTCe17w2dSgzbGlZ6YTl/yvLMU90cweeAZQbdozf l11k1bEwTfPllmlJuhsrzuNnH9t9YeinKoYyur/4YbIyXDtCtnca8rHIQFXvnRsT9iQl bimdKQSXd+1DZDG4FgyUEY/55l+K8BGNK6RflwphF7oosdWetQc/Do7vMCsRo/JCm00J Zg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2vejku9rc1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Oct 2019 22:17:36 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x97MDncm095674; Mon, 7 Oct 2019 22:15:35 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2vg1yurgs1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 Oct 2019 22:15:35 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x97MFXYF031629; Mon, 7 Oct 2019 22:15:33 GMT Received: from [192.168.1.222] (/71.63.128.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 Oct 2019 15:15:33 -0700 Subject: Re: [rfc] mm, hugetlb: allow hugepage allocations to excessively reclaim To: David Rientjes , Michal Hocko Cc: Vlastimil Babka , Linus Torvalds , Andrea Arcangeli , Andrew Morton , Mel Gorman , "Kirill A. Shutemov" , Linux Kernel Mailing List , Linux-MM References: <20191004092808.GC9578@dhcp22.suse.cz> From: Mike Kravetz Message-ID: <3c220179-09cc-569f-8cfa-8e2ab5212faa@oracle.com> Date: Mon, 7 Oct 2019 15:15:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9403 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910070197 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9403 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910070197 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/4/19 11:02 AM, David Rientjes wrote: > On Fri, 4 Oct 2019, Michal Hocko wrote: > >> Requesting the userspace to drop _all_ page cache in order allocate a >> number of hugetlb pages or any other affected __GFP_RETRY_MAYFAIL >> requests is simply not reasonable IMHO. > > It can be used as a fallback when writing to nr_hugepages and the amount > allocated did not match expectation. Again, I'll defer all of this to > Mike when he returns: he expressed his preference, I suggested an > alternative to consider, and he can make the decision to ack or nack this > patch because he has a better understanding of that expectation from users > who use hugetlb pages. I believe these modifications to commit b39d0ee2632d are absolutely necessary to maintain expected hugetlbfs functionality. Michal's simple test in the rewritten commit message shows the type of regressions that I expect some hugetlbfs users to experience. The expectation today is that the kernel will try hard to allocate the requested number of hugetlb pages. These pages are often used for very long running processes. Therefore, the tradeoff of more reclaim (and compaction) activity up front to create the pages is generally acceptable. My apologies if the 'testing' I did in [1] was taken as an endorsement of b39d0ee2632d working well with hugetlbfs. It was a limited test that I knew did not cover all cases. Therefore, I suggested that if b39d0ee2632d went forward there should be an exception for __GFP_RETRY_MAYFAIL requests. [1] https://lkml.kernel.org/r/3468b605-a3a9-6978-9699-57c52a90bd7e@oracle.com -- Mike Kravetz