Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10011322imu; Wed, 5 Dec 2018 14:23:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/V9ztOhP4ylYijs//z74FarxFfkYAveFo8pdtWhEsF5w8CTfEw9Olmq5m2DCd7p1N3Ftu2D X-Received: by 2002:a62:6f88:: with SMTP id k130mr25863145pfc.234.1544048639391; Wed, 05 Dec 2018 14:23:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544048639; cv=none; d=google.com; s=arc-20160816; b=S7z4bLfAg/mZYkrnllbITlk22jxug64yh8HQPJU+q1nQQxMxTHJ4/xuxGgF2qTmvxV t3KpiPPuJLbu66PAxCZxzVwvmKKJxDrutDOgzovIKCiD4sXrBYzEdOSiUJFFoo3seuS3 Ij0LSTJ8kXNZfgPmfB3wYr8Ah02H8Hg4Q3TwIVnxZtKfXpd6mWsMVH5lLoE4OtpzIbfS L489RAOOzNxxh+GMKbYtgz/f+DRYLGWh5s0+VOTRbz5EnjviAtWaWFA+RK+2WJx/lJMX MXloft1/IpO0kkeTz4FvyQcaZNfhD2Fdki6167ZeZRugNzYbAkCdsCC7CofKya+HW8/I OYIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Is6wwEiXWWw9k4HSGEfYpK7k8j47vF1WpNLMbRM5hyM=; b=O3F2hAR2ybKBXei1V8hHyPeN3dov9SVmkh/pNxq7xxRthBVZrE5/Gfdr7bd5Xnabxs KJ5gYgrVQTWf1Pz8aC9qLyCGtd8oH7RsZ7e0N4HhqJVBlahYovyVpl2Czd+qC6rJEfcm mP837DNA7LBfa4+gpt8T8hR0uEeWqJdZjiLfj/+4Sa2j65yi/gXR1KysPCTt6Sx1I4Yb 2RBAFW1uDbWWjWtva508Qo0eVOxBsDYr8O6Tov/0tMeLvfXvxK4HdWvhZO6jEaS6BOE9 9vyA1NLTYcQqY2WLM4TdepKhlLjqXpDWYODNax9K1O1QkhH3WIqQwNiMqHcgIKM5I2ZQ dq5g== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si22115627plb.54.2018.12.05.14.23.42; Wed, 05 Dec 2018 14:23:59 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728331AbeLEWVw (ORCPT + 99 others); Wed, 5 Dec 2018 17:21:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45842 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727339AbeLEWVv (ORCPT ); Wed, 5 Dec 2018 17:21:51 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C7D43001E59; Wed, 5 Dec 2018 22:21:51 +0000 (UTC) Received: from sky.random (ovpn-122-73.rdu2.redhat.com [10.10.122.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9316E5C57C; Wed, 5 Dec 2018 22:21:48 +0000 (UTC) Date: Wed, 5 Dec 2018 17:21:47 -0500 From: Andrea Arcangeli To: Michal Hocko Cc: David Rientjes , Linus Torvalds , 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, Vlastimil Babka Subject: Re: [patch 1/2 for-4.20] mm, thp: restore node-local hugepage allocations Message-ID: <20181205222147.GD11899@redhat.com> References: <20181204073535.GV31738@dhcp22.suse.cz> <20181205073434.GT1286@dhcp22.suse.cz> <20181205201528.GW1286@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181205201528.GW1286@dhcp22.suse.cz> User-Agent: Mutt/1.11.0 (2018-11-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 05 Dec 2018 22:21:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 05, 2018 at 09:15:28PM +0100, Michal Hocko wrote: > If the __GFP_THISNODE should be really used then it should be applied to > all other types of pages. Not only THP. And as such done in a separate > patch. Not a part of the revert. The cleanup was meant to unify THP > allocations and that is why I object to reverting it as a part of this > work. I also wonder if using __GFP_THISNODE for all pages and not only THP may really help David's workload performance further if it's so NUMA sensitive and short lived too (plus we know it most of the time fits in a single node). It'll get rid of the cache in the local node before allocating remote memory. Of course than the swap storms and pathological performance for processes that don't fit in a node, will also materialize without THP enabled. If this is true, that'd point further to the need of a MPOL that can set __GFP_THISNODE not just for THP but for all allocations, with the only difference that if it's the regular page size failing, instead of hitting OOM it should do one last fallback to a regular page size allocation without __GFP_THISNODE set. Regardless of the above I think it's still interesting to look into adding more NUMA affinity to THP somehow, but I doubt we want to do that at the price of crippling compaction in a way it can't generate THP anymore once a node is full of cache, and certainly we don't want to cripple compaction in non-NUMA hosts too like it'd be happening with the current proposed patch. Furthermore whatever we do should work for order 8 7 6 etc.. too. If we did a order 9 specialized trick that cripples compaction effectiveness, it'd be a short term approach and it'd be tailored to David's use case that seems to be sensitive to allocation latency. Being sensitive to allocation latency doesn't make that process a good fit for MADV_HUGEPAGE to begin with.