Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9877262imu; Wed, 5 Dec 2018 11:51:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/XBzhjuu3D2SvnjnDNZvbWqn0N0Ml8tZjupwBv9lyn1IpJmtB8DyhXiNP4h0YHu4FQbhyEP X-Received: by 2002:a17:902:20e9:: with SMTP id v38mr24390747plg.250.1544039486099; Wed, 05 Dec 2018 11:51:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544039486; cv=none; d=google.com; s=arc-20160816; b=cHqQIAK1EzLo/mbA9Y5Coi3xMLpELAnraOYcVXR05mkBkidEWS9JcRc3r7NMxGv5NM /A0YpGDGNXU7UV7uwoWjnWzqZDvONa+vyJDl8Qx9y1LZl4QZcLtX+NIVQgfL8uy1sPmc 6t9GFcJaHeuGQsduKMNvk4K02ET6CzCg921XxFRNdWiBC7Ltj9f0alv3ogWa5QqRDzGX qJJ3VzHK0LxBg+um8TSUNGyrLBuTUZ4r11CyJu+b7/mzBj96/9J2Dpd2ApMIgpCE58KM gPuBmBI3nW+ymJNm/YyAe4cXWcP0bKa+9rs/5NVYhLE9RztRkI4BazmipT24qRz8aZoL SIIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=D9D99FYJdZo2uJ7xtjuViYCT1QHw85VOll4TTwRjMIA=; b=sL806Vijol0t2LM2G7V3sosFLwSQrrrz7F+WTlQfJZvyOIm7O8qIrFaqW1+mCRKxeX knTdQNAwVp7+13XIbal4hWvqjfTA462DYXh24C3PV8GK28yAtVUJjeb+ZRebWrW3WkDB g3dL5Rssko8AMuRsGq8iomOzliw5/egLuFi3uiGOoOVGYtQEc6FI2wOnlnJCVj+u2O8e GZYvrVvFerhEQ6MiVXcn/Ydb6E2k67TOavUwRo0+6ttKGwjti4zX6AXV749ZvAIEmhmm xnne+A2NgKkIfh/ktV0wxYKRJZD5D8I/tUyds0+6PYefIv30iyH5JbMyMezhbPCwF9JX Eq4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="jJj09i/7"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6si18631954pgl.561.2018.12.05.11.51.11; Wed, 05 Dec 2018 11:51:26 -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; dkim=pass header.i=@google.com header.s=20161025 header.b="jJj09i/7"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728460AbeLETt3 (ORCPT + 99 others); Wed, 5 Dec 2018 14:49:29 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41946 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727523AbeLETt3 (ORCPT ); Wed, 5 Dec 2018 14:49:29 -0500 Received: by mail-pg1-f196.google.com with SMTP id 70so9486852pgh.8 for ; Wed, 05 Dec 2018 11:49:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=D9D99FYJdZo2uJ7xtjuViYCT1QHw85VOll4TTwRjMIA=; b=jJj09i/76kNT4ioMKbTLgHHVxQu51JbSHE0FaNFywijTbcps2Seg/+R0KKxZ0O341v pl5n7kDJSFSrevjyjlw5KzmOFuv/d4aYfejgC/XdvnAf42x+ABB67ATJxuzFFtXdaLPS PGI5DG0yI6bOAO7j1Aoo4kkpNxy/G9Z9Y5wc3P5JXR4oZ7xkRUVsK6lYSIX8RS2bWcNL AR3g+yNg9aapdlheEHm0ncQP217O7gH/wnNoTdwhLotbLeMNvcBVsv57MWh3W8sv+qPf bT31+79beZmC06zcs7l0J8VlepxcbVYYAVw7/mWl24erGpEcrhr7/1fLJtqN6MW0QeXu 09SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=D9D99FYJdZo2uJ7xtjuViYCT1QHw85VOll4TTwRjMIA=; b=YPl1WZTZSI8sYdaXQ8QjQT7sRJjHTsiD3pvNmgsZomDgFXeBODvBHjzDv7L7KnsTyc XDthbuYJ48P17scmozOLy2SVqs3kUqHhXUjT04dBwwz98GhLHY4w9/dNnTyfS/GhybN4 VnU3npvfq8lgvM+LpWJ4+lFo2tsDPiFOLJvlG3tP7ThLFvmjzzs+uZCVBUmnJ2G7bygO JIt1rLHyTCppTMx64FFde7S0Puf0HZwdbv+RDS4kMOepiGhv/uNMZksBHhEmO57Bp4/F IBE36WW1AWy5vkKpUEjkm6kWkuFz1nzFYuCGIOkjls+kutudEtmMqbGsKpuKc9KxJvc0 4/pg== X-Gm-Message-State: AA+aEWaB1jXnjqRQsGDkAPahzU+Isc2zfHCYiOpCy6QdvKPzBOHD2T+w bZu8bGoM2DHFaX/v78HIDBkxyQ== X-Received: by 2002:a62:6a88:: with SMTP id f130mr25972743pfc.201.1544039368101; Wed, 05 Dec 2018 11:49:28 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id k129sm40161436pgk.29.2018.12.05.11.49.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 11:49:27 -0800 (PST) Date: Wed, 5 Dec 2018 11:49:26 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Vlastimil Babka , Linus Torvalds , Andrea Arcangeli , ying.huang@intel.com, s.priebe@profihost.ag, mgorman@techsingularity.net, Linux List Kernel Mailing , alex.williamson@redhat.com, lkp@01.org, kirill@shutemov.name, Andrew Morton , zi.yan@cs.rutgers.edu Subject: Re: [patch 0/2 for-4.20] mm, thp: fix remote access and allocation regressions In-Reply-To: <20181205090554.GX1286@dhcp22.suse.cz> Message-ID: References: <20181205090554.GX1286@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 Dec 2018, Michal Hocko wrote: > > The revert is certainly needed to prevent the regression, yes, but I > > anticipate that Andrea will report back that patch 2 at least improves the > > situation for the problem that he was addressing, specifically that it is > > pointless to thrash any node or reclaim unnecessarily when compaction has > > already failed. This is what setting __GFP_NORETRY for all thp fault > > allocations fixes. > > Yes but earlier numbers from Mel and repeated again [1] simply show > that the swap storms are only handled in favor of an absolute drop of > THP success rate. > As we've been over countless times, this is the desired effect for workloads that fit on a single node. We want local pages of the native page size because they (1) are accessed faster than remote hugepages and (2) are candidates for collapse by khugepaged. For applications that do not fit in a single node, we have discussed possible ways to extend the API to allow remote faulting of hugepages, absent remote fragmentation as well, then the long-standing behavior is preserved and large applications can use the API to increase their thp success rate. > Yes, this is understood. So we are getting worst of both. We have a > numa locality side effect of MADV_HUGEPAGE and we have a poor THP > utilization. So how come this is an improvement. Especially when the > reported regression hasn't been demonstrated on a real or repeatable > workload but rather a very vague presumably worst case behavior where > the access penalty is absolutely prevailing. > High thp utilization is not always better, especially when those hugepages are accessed remotely and introduce the regressions that I've reported. Seeking high thp utilization at all costs is not the goal if it causes workloads to regress.