Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp48169imu; Thu, 6 Dec 2018 15:50:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/UnlKUR/ct8f8KGWfpck691bpa/XhpfahDu7VoXCj8MUUyEoyi3ZSV2YmgNU1QGb/uLThyx X-Received: by 2002:a17:902:bd4a:: with SMTP id b10mr30376170plx.232.1544140213610; Thu, 06 Dec 2018 15:50:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544140213; cv=none; d=google.com; s=arc-20160816; b=xCdaRgN5lW+D9SY0e8K1oox8gXlzfRfxeo6opZJRQVjorK0/a63yTcyQOWPmObWc/V fmzhk43gCPoxRIU19OXgXqCvSlX36kla/rkBT0HbGr2KC+q1QCc48C3ErziIXNhIlE/Q F7nP2O11ScVMrgdl3QcV6xNqLaEYU4JouHUdsdsG8ftpM6NGLWn5pwSYqwg6dyCgCSYK vlSnOu6Xnv7YxCdFMBHN6BYaUyJbeOAghAo4ArLm+uCUYXLlYmYsiPXgN3FkqUYvzUQu lEuNzR/th6h4kOLIxTW3KYKunZ/rRQFGY5ufjcn2LLI9hx3NkJqR6pXsdGXEFJvr+Wfz s+Rw== 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=tvrXZnrlCcV4QOoUhS1S4SiZidGNghL5IzoCk6ExYiE=; b=AxZ8iHi40pYiR7fSPWv0I+OHMNky34wOIh/3fg8Q+T/F0zMm97VwOsVpfcae7br3Pj 4xfahRRbvSSSEe1n6t+gNDGE/IR+XR27jZuMh2YpQqzY4nr0oOFpB6eZpcifwU9ZFl7l ntS8VuKq/KYv0OZjV2YfYFYcJCGEWko0Pb1tum6oh/LSWaX6yeoRfyYm4SivBCp4e/Gi +1xZFL8F7oFNBBEKdrubABYGDaz1gz14nBJlqEiuqW1rK9Qi67s9l8Da9LVv/THXR9sj ASAjMja/qluj3VTAIWLhOe7lvM8Jc2z+J3h34J6x7moK5YvNnSbRJVmxDh9iZ7x4sZgS NYrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Ukk55n5S; 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 v9si1366791pgt.464.2018.12.06.15.49.57; Thu, 06 Dec 2018 15:50:13 -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=Ukk55n5S; 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 S1726264AbeLFXtH (ORCPT + 99 others); Thu, 6 Dec 2018 18:49:07 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36805 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbeLFXtH (ORCPT ); Thu, 6 Dec 2018 18:49:07 -0500 Received: by mail-pf1-f193.google.com with SMTP id b85so964654pfc.3 for ; Thu, 06 Dec 2018 15:49:06 -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=tvrXZnrlCcV4QOoUhS1S4SiZidGNghL5IzoCk6ExYiE=; b=Ukk55n5S3eOjrEZePwVRkSBt16ZGCAveeyjpN+UZFTZ4BOWmGPasuAU325r/COePgi H4bPxfDFp1kn/aSvAv5EXSrRZW4DjWDJdTFo1/5hVyMuMwy/7ygIKrjsqiZkigPH5ZvI RRLf9+yFY8bLBHLkt1+BvyC1SXIkd2DRefKkry4InRtDGrXYTAlSiA3urPz7I6a6fgje mg1uOMrk223xNk0nn818ZPMeWiJhEnIlO2xz0x8p2kH16FaIUEfFr4mtOGXoAXWPn5yK bMMmm6DYw59Jm0pvdohoWf78VeW1X2b4qmAU9aXqSdkClQVmucs2DbxkUcSlD2r1LhPL sSNg== 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=tvrXZnrlCcV4QOoUhS1S4SiZidGNghL5IzoCk6ExYiE=; b=YGs11KZHJk20bf9Yyqi1ajKh80ZCDk6qm6pHzyxb16remKdMshG/oQkFx8/MfmvINA 6WbhIlmLYlynzSa3x+Ne9/6pdBdAWhNG9HZJIh/HWmMlHGuUtswztUlzRQS8o3cry4tL zX2BBWYHMvl/60mALq3Y972DTWcCuh8aPy5W/roudlnE6DYZ8HHAVtvU2a/EA0qInUxv iDT4hk4Bi6pyfmc/+7rc1S1YdOS39CSzzpUeCf8xAJXjXa45VTaudMiNJ+qL8WGVojPz 3JrN+YfzHGiaAAr5OATnqvG6QQX3K9X2VB5W/9mdQ4I+jgqv2xTfMhZt8WnT14eQgd5I 8+Sg== X-Gm-Message-State: AA+aEWZ9ya1Je3rCGOMaR83g8iWD/PJByDhrFpi0DRA4pG/DL17lyuH8 2KcCxyuJFl3nyFGM2Wt/H2dMew== X-Received: by 2002:a62:2702:: with SMTP id n2mr31385986pfn.29.1544140146212; Thu, 06 Dec 2018 15:49:06 -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 w5sm1936375pfn.89.2018.12.06.15.49.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Dec 2018 15:49:05 -0800 (PST) Date: Thu, 6 Dec 2018 15:49:04 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Linus Torvalds , Andrea Arcangeli , mgorman@techsingularity.net, Vlastimil Babka , ying.huang@intel.com, s.priebe@profihost.ag, Linux List Kernel Mailing , alex.williamson@redhat.com, lkp@01.org, kirill@shutemov.name, Andrew Morton , zi.yan@cs.rutgers.edu Subject: Re: MADV_HUGEPAGE vs. NUMA semantic (was: Re: [LKP] [mm] ac5b2c1891: vm-scalability.throughput -61.3% regression) In-Reply-To: <20181206091405.GD1286@dhcp22.suse.cz> Message-ID: References: <20181203201214.GB3540@redhat.com> <64a4aec6-3275-a716-8345-f021f6186d9b@suse.cz> <20181204104558.GV23260@techsingularity.net> <20181205204034.GB11899@redhat.com> <20181205233632.GE11899@redhat.com> <20181206091405.GD1286@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 Thu, 6 Dec 2018, Michal Hocko wrote: > MADV_HUGEPAGE changes the picture because the caller expressed a need > for THP and is willing to go extra mile to get it. That involves > allocation latency and as of now also a potential remote access. We do > not have complete agreement on the later but the prevailing argument is > that any strong NUMA locality is just reinventing node-reclaim story > again or makes THP success rate down the toilet (to quote Mel). I agree > that we do not want to fallback to a remote node overeagerly. I believe > that something like the below would be sensible > 1) THP on a local node with compaction not giving up too early > 2) THP on a remote node in NOWAIT mode - so no direct > compaction/reclaim (trigger kswapd/kcompactd only for > defrag=defer+madvise) > 3) fallback to the base page allocation > I disagree that MADV_HUGEPAGE should take on any new semantic that overrides the preference of node local memory for a hugepage, which is the nearly four year behavior. The order of MADV_HUGEPAGE preferences listed above would cause current users to regress who rely on local small page fallback rather than remote hugepages because the access latency is much better. I think the preference of remote hugepages over local small pages needs to be expressed differently to prevent regression.