Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10130283imu; Wed, 5 Dec 2018 16:59:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/W5OWPQggD2CggPoNOd1nKm9fr0SLmant0MA30A4VWMBvUyytsyUR4O3efSd2khbB3IpkBn X-Received: by 2002:a63:1c09:: with SMTP id c9mr22018587pgc.200.1544057956437; Wed, 05 Dec 2018 16:59:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544057956; cv=none; d=google.com; s=arc-20160816; b=IGMOIMcABgPNtuRqACr+nH5TdjwZeTkmMq3JKVZ0VayetS3nMForckFUrMH6aK1fwd 9+JJkWMc7zWGdygQis+V9d3sKZATOa2Xk32+LPPvtPNurseRYgQX1eis4UYSmdbLm9PA bRGD3a9g/Yig8Cas5XDVuSYHhc3u1HUsY3wNap0dmQCTgkdo/mBt2mVys5vqsSgLpmju VgHlTrvAK2IWUMBidSmOmgbvLzypKWSk15IaRycn0x1ydQss/4mqGzfWXUhKTTj5kOzC qyOBXT66i7VVPuii/Dm1epcwFOgYce98MHKUGwcMQW8aSxNXqZbLry8jcd9NXDMQjBjQ Scpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aMhC0HqWli534yYkvp/Kknwo+jaBjSunFiEWH9es4FM=; b=hqucWoa+XpjX80Hy+u4iuj1HmSQ+qPimZcGVwtYv7BVqf5k9b8k1nLr9qL2fC9STfl Uo+nFRaWCrctJQk42RrhgJ4OanAedn+FqajQu/qHGMqrZwvA3UtX9PkQcJv2h4cmaEWK G8xmOjqD+Al9tzfOiv9ZeSxZLchVNeUtYI8lBUV9x+1PuZX8gQ2MO1jtf4Ee6XKBC6TR eFK9lcEskm78w7lND7KOeJRkGDdMtQ+gFxmCW9fbYc+WK/LCJ5sBtqxqSTPJFDJBpT8r qOlJAN6uzVqyRYN3UTAbx3HV7LtEFdWxQvloZj10nTatNE4g1y7Abvj8sf96Hjf0XB7x JROQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fDei5UCr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si20322011pll.179.2018.12.05.16.58.58; Wed, 05 Dec 2018 16:59:16 -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=@linux-foundation.org header.s=google header.b=fDei5UCr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728219AbeLFA6X (ORCPT + 99 others); Wed, 5 Dec 2018 19:58:23 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46488 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727358AbeLFA6X (ORCPT ); Wed, 5 Dec 2018 19:58:23 -0500 Received: by mail-lj1-f196.google.com with SMTP id v15-v6so20071010ljh.13 for ; Wed, 05 Dec 2018 16:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aMhC0HqWli534yYkvp/Kknwo+jaBjSunFiEWH9es4FM=; b=fDei5UCrq9gB/BQr0VvXmN2VjiVxs3z7f8NhHC6M/5jjcMS62iAeVzo0Uhox8MEzT+ bwX7MsKMCrqQNYNvoWUX8ZR4XRj3X0RSrd5cfhwVrEUu/8JQol6ylAMrwz8cGLqGgIkD csxbLgtM9895m1/i9YaOIW/tHsTu6/lRIENV0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aMhC0HqWli534yYkvp/Kknwo+jaBjSunFiEWH9es4FM=; b=qiGVKq979w9rnzZ2WpCR/t8+0mvEjvv1wxFojVZW+Dul9Q4Pj/wbr4jNAN/S3PgwID SYBWBNPQFkPSQNSz3TDIxTZKCw93yUwa7xoffLsATfzo6ZWYz58BGcHt6gM6ui/j844M GxoxYtWF81qCJbU/DAMjvj5Kir1vW7H4OPULayl6tMQ5S/vFxxok7/VNl764IOuGznXR ibbfKRcNd7XYL3rW8fUrY/DtpKJW1ErXg/tTtvVz4j6qyQj8yM+cxzGi7z7HCD9DvoBF Ataz5NB86MhKLgaeRTowUUdVPUBZTgg8AbyxxCxhma/sI4jIpBOOEXuvCPVVEJNQcXAl vNew== X-Gm-Message-State: AA+aEWZjT1+oX4nRYmNZ5llJsCJc4qIB3mWe34aLci4hCn0rh7fMdK8o Be23z61L5ch8UdKsIjcQuGuzc6k3XBM= X-Received: by 2002:a2e:2c02:: with SMTP id s2-v6mr17251186ljs.118.1544057900205; Wed, 05 Dec 2018 16:58:20 -0800 (PST) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id i127-v6sm3990546lji.3.2018.12.05.16.58.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 16:58:19 -0800 (PST) Received: by mail-lf1-f53.google.com with SMTP id i26so16186112lfc.0 for ; Wed, 05 Dec 2018 16:58:19 -0800 (PST) X-Received: by 2002:a19:cb94:: with SMTP id b142mr16309011lfg.117.1544057898543; Wed, 05 Dec 2018 16:58:18 -0800 (PST) MIME-Version: 1.0 References: <20181203185954.GM31738@dhcp22.suse.cz> <20181203201214.GB3540@redhat.com> <64a4aec6-3275-a716-8345-f021f6186d9b@suse.cz> <20181204104558.GV23260@techsingularity.net> <20181205204034.GB11899@redhat.com> <20181205233632.GE11899@redhat.com> In-Reply-To: From: Linus Torvalds Date: Wed, 5 Dec 2018 16:58:02 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [LKP] [mm] ac5b2c1891: vm-scalability.throughput -61.3% regression To: Andrea Arcangeli Cc: mgorman@techsingularity.net, Vlastimil Babka , mhocko@kernel.org, ying.huang@intel.com, s.priebe@profihost.ag, Linux List Kernel Mailing , alex.williamson@redhat.com, lkp@01.org, David Rientjes , kirill@shutemov.name, Andrew Morton , zi.yan@cs.rutgers.edu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 5, 2018 at 3:51 PM Linus Torvalds wrote: > > Ok, I've applied David's latest patch. > > I'm not at all objecting to tweaking this further, I just didn't want > to have this regression stand. Hmm. Can somebody (David?) also perhaps try to state what the different latency impacts end up being? I suspect it's been mentioned several times during the argument, but it would be nice to have a "going forward, this is what I care about" kind of setup for good default behavior. How much of the problem ends up being about the cost of compaction vs the cost of getting a remote node bigpage? That would seem to be a fairly major issue, but __GFP_THISNODE affects both. It limits compaction to just this now, in addition to obviously limiting the allocation result. I realize that we probably do want to just have explicit policies that do not exist right now, but what are (a) sane defaults, and (b) sane policies? For example, if we cannot get a hugepage on this node, but we *do* get a node-local small page, is the local memory advantage simply better than the possible TLB advantage? Because if that's the case (at least commonly), then that in itself is a fairly good argument for "hugepage allocations should always be THISNODE". But David also did mention the actual allocation overhead itself in the commit, and maybe the math is more "try to get a local hugepage, but if no such thing exists, see if you can get a remote hugepage _cheaply_". So another model can be "do local-only compaction, but allow non-local allocation if the local node doesn't have anything". IOW, if other nodes have hugepages available, pick them up, but don't try to compact other nodes to do so? And yet another model might be "do a least-effort thing, give me a local hugepage if it exists, otherwise fall back to small pages". So there are different combinations of "try compaction" vs "local-remote". Linus