Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1145586imu; Fri, 7 Dec 2018 15:16:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/VvigzqBOrUCSvyiWDakVsMS43IQ2jIcAKj0tbwatRoOHs40M23vl3VdQ6oidz0H1uqwj51 X-Received: by 2002:a63:4342:: with SMTP id q63mr3610224pga.63.1544224598825; Fri, 07 Dec 2018 15:16:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544224598; cv=none; d=google.com; s=arc-20160816; b=ajyqssSa6e19mTU0Ac2h/lL4EVxmOD75UCvhcDB2IatN8JILzQr6pNUJ9Y7dLu8PGx AaI/Jh0VIWfcPjU3E2TRoysxNTi0gTIXqH9oHv3b/v3+Asbs2TEeh6sZ4p5rOjVcyrac XOlLMSJo3UOYb753knDHA479jLMEdjddxxjvStdev8BafScVJnxh1anokWwvzj/DFvvG +tnVMFwdT3B3RhzJcsniYSOlPgSYQAxUBuzdSgbJkglV2iWo4zK7a9LkdGTNEnvSiM+j Z/D999HxfSnvIuYKZYBZq6AjHLmqFtBsDG/33W3BNjJCvZfgFJNH2xSuWCaPZZL9LI3B A/TA== 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=QUkms/DVJEKkHxhV0riKAPj/37mf5Vv4TDTyEJSUMhk=; b=ZMZyajNjdFcW+S5uYCSMHou5ahw6PJg0z15j4qTuFAAtbacthzb6RtZmYW+/r7mw0j NiG4gBEH09cXnCgrK4hReVP4nNOm+XHnSkXlVyU8JfS0JpsDDGhA3aVQpo+LTzMjKJuQ 3WsQ3YXg4bG7hmdZlSSrmxepgdw4qIEDIll7YrcYtbNVqfzB+HDoH5LeMYZPQ0NwXoQX Ej9k/JK76gl4LpbFW8/Y3doHO5LUB7TWvPE3eseaA5tN7ZdrD6PvZkONT/9EoBZePShE 5bmAeBCBRHmbUmXrAa8C6stOZNlX3Khy2C03+oQR0yCkIaPYfmA/MV2gGP7U2/UOpQ/6 t03w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mmwKln+s; 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 i20si3803893pgh.187.2018.12.07.15.16.23; Fri, 07 Dec 2018 15:16:38 -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=mmwKln+s; 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 S1726084AbeLGXPk (ORCPT + 99 others); Fri, 7 Dec 2018 18:15:40 -0500 Received: from mail-pf1-f177.google.com ([209.85.210.177]:44549 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbeLGXPk (ORCPT ); Fri, 7 Dec 2018 18:15:40 -0500 Received: by mail-pf1-f177.google.com with SMTP id u6so2608694pfh.11 for ; Fri, 07 Dec 2018 15:15:39 -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=QUkms/DVJEKkHxhV0riKAPj/37mf5Vv4TDTyEJSUMhk=; b=mmwKln+sZzjUrKXqKL7+e+5HbPmGyDw9iQ6z65MC+pQo5ex5/XAvvWktIF1bhELfcZ dXXtSath4sJ8FCl/xT0b1rdpOqAh/XaU1em8tZ/dahuTg/tNkntq95xkUb1VeqlSWuZP jzr0yYeNQPx8seu730Uf46ydZKgLHz/Nzr6mFv6caPCL3uicOE9WcmcsCJxI9rOnroXX dNJZXd8ZSjwReI2vlJUKEaX9pmlneLNouvk7Pu8xcGgVRaJeulwSMQACQJ9IYiEfNV7Q f1ymI4McAclm1ZoFH4FL39+vVtlgpkXJL85sITtDsj0YPGvLC4ovTH0C6l9uoMeObfbl 0ydg== 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=QUkms/DVJEKkHxhV0riKAPj/37mf5Vv4TDTyEJSUMhk=; b=sTBoIoJtTiBvxVI8YBks0jRYB9raPBhEvCIgxZH6vwRhSrYxA9z9Pfp2jx/JaNX3y3 1j50tGFif0wZnxVizN9PZpwt2O4qdd6jWSd9j8kwX5X1xgQDjeTA3t8HROms3fYcw7wp FoMd3qp6SQPITdZxPhHp0vQeSAY+t5t43TPmSNCNVnJnuk+QBXWSlP4w3msWyunRqjXk du+j8XeZe7v9gMa7wzKNvIujvWFUPBDxwoBv+88Ifm974T8nA4aNaiR/S0JBT1DZZUGq tFC8OJry2dFqfGSQ79mHHoN1YR1O9f1XjCtKn41vSS9cVkGiahk3z6SCtGwGqgckfW7V ZQrg== X-Gm-Message-State: AA+aEWbiXPJP3mJNs2TuuOqjTi9khzDv5oFVMRQWf+WSt9HBy5w6xg3n X9S0BWvsJtIic7jgd8IP2TyRsA== X-Received: by 2002:aa7:8758:: with SMTP id g24mr4002576pfo.250.1544224539240; Fri, 07 Dec 2018 15:15:39 -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 m76sm6497986pfi.102.2018.12.07.15.15.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Dec 2018 15:15:38 -0800 (PST) Date: Fri, 7 Dec 2018 15:15:37 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Vlastimil Babka cc: Michal Hocko , Linus Torvalds , Andrea Arcangeli , mgorman@techsingularity.net, 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: <779efc07-cac0-5d36-72fc-11d99060cac7@suse.cz> Message-ID: References: <64a4aec6-3275-a716-8345-f021f6186d9b@suse.cz> <20181204104558.GV23260@techsingularity.net> <20181205204034.GB11899@redhat.com> <20181205233632.GE11899@redhat.com> <20181206091405.GD1286@dhcp22.suse.cz> <20181207074954.GR1286@dhcp22.suse.cz> <779efc07-cac0-5d36-72fc-11d99060cac7@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 Fri, 7 Dec 2018, Vlastimil Babka wrote: > >> But *that* in turn makes for other possible questions: > >> > >> - if the reason we couldn't get a local hugepage is that we're simply > >> out of local memory (huge *or* small), then maybe a remote hugepage is > >> better. > >> > >> Note that this now implies that the choice can be an issue of "did > >> the hugepage allocation fail due to fragmentation, or due to the node > >> being low of memory" > > How exactly do you tell? Many systems are simply low on memory due to > > caching. A clean pagecache is quite cheap to reclaim but it can be more > > expensive to fault in. Do we consider it to be a viable target? > > Compaction can report if it failed (more precisely: was skipped) due to > low memory, or for other reasons. It doesn't distinguish how easily > reclaimable is the memory, but I don't think we should reclaim anything > (see below). > Note that just reclaiming when the order-0 watermark in __compaction_suitable() fails is unfortunately not always sufficient: it needs to be accessible to isolate_freepages(). For order-9 memory, it's possible for isolate_migratepages_block() to skip over a top of free pages that were just reclaimed if there are unmovable pages preventing the entire pageblock from being freed.